Commit Graph

34015 Commits

Author SHA1 Message Date
Jason Orendorff
fb97c241d9 Bug 645416, part 9 - Implement the symbol registry and Symbol.for(). r=terrence,r=efaust.
--HG--
extra : rebase_source : df06d065f70756dea63dfd8e9df56610ff46d393
2014-06-23 10:56:49 -05:00
Jason Orendorff
a1ade24149 Bug 645416, part 8 - Support passing symbols across compartment boundaries. r=terrence.
Trivial. Since symbols are always allocated in the atoms compartment and all
compartments are allowed to have direct references to them, Compartment::wrap
on a symbol is a no-op.

--HG--
extra : rebase_source : 2f51ff0b3870885de8c6ef6a82efa7398e17d5e8
2014-06-23 10:56:49 -05:00
Jason Orendorff
95d4e7497f Bug 645416, part 7 - Support symbols as Map keys. r=terrence.
--HG--
extra : rebase_source : 5e40fe2514e7eb9ca874b1c271ed4a4e11f9c2ff
2014-06-23 10:56:48 -05:00
Jason Orendorff
2f69141de3 Bug 645416, part 6 - JIT support for symbol values. r=jandem.
Symbols are not yet supported as property keys at this point in the stack. The
work here is to pass symbol pointers around in Ion JIT code unboxed.

The baseline compiler doesn't need much new code. A few kinds of ICs need to
know all the primitive types.

--HG--
extra : rebase_source : 3addcd18e913e5879b0ee3700ecf9660b14b1e05
2014-06-23 10:56:18 -05:00
Jason Orendorff
58ffd8ea68 Bug 645416, part 5 - Add the Symbol constructor and Symbol wrapper objects. r=efaust.
This exposes a new primitive type to scripts for the first time since
JavaScript first shipped in Netscape 2, over 13 years ago.

The tests focus on identity, equality, and being able to pass a symbol around
as a value. Of course the point of symbols is that they can be property keys,
but that will have to wait for a later patch in this series.

--HG--
extra : rebase_source : c22cf4b774cca8e7c9f6c757079e054a6eb0f307
2014-06-23 10:55:52 -05:00
Jason Orendorff
fc567d7487 Bug 645416, part 4 - Rename DefinePropertiesAndBrand -> DefinePropertiesAndFunctions. r=bhackett.
--HG--
extra : rebase_source : beadd475b66cb17c7fe6f74766a5d90767817cf0
2014-06-23 10:55:52 -05:00
Jason Orendorff
0bfce2ba30 Bug 645416, part 3 - Symbol layout and GC support for allocating them. r=terrence.
Layout: js/src/vm/Symbol.h defines the new class JS::Symbol. JS::Symbol is the
same size as JSString on all platforms, because the allocator does not support
smaller allocations.

Allocation: Since the purpose of symbols is to serve as property keys, they are
always allocated in the atoms compartment.

We take a lock when allocating. This could probably be replaced with a
main-thread-only assertion. However, if atom allocation is not already a
bottleneck, symbol allocation probably never will be.

Symbols are given their own finalize-class in the GC. This means we allocate a
page per zone for symbols, even though they are only ever allocated in the
atoms zone. Terrence thought this could be easily fixed later. It should be; we
never touch the page, but a 32-bit virtual address space does not just have
infinite pages to spare.

A jsapi-test exercises the new symbol allocation code. A few oddities in
jsapi-tests are fixed in passing.

Discussion after review led to some new assertions about minimum object size in
AllocateObject and AllocateNonObject.

--HG--
extra : rebase_source : 45abb651d3b1b493d77a5dd0eb554f96b058c63a
2014-06-23 10:55:51 -05:00
Jason Orendorff
c4d2ca3a88 Bug 645416, part 2 - Add support for symbols to JS::Value. r=luke.
The API for symbol Values is much like the API for strings.

The implementation behind all this is in a later patch. Here, a class
JS::Symbol is declared, but not defined anywhere yet.

The constants being deleted from js/public/Value.h probably haven't been used
since Tracemonkey days.

--HG--
extra : rebase_source : 5b2d0cc4d99223483e850ee80913eef3854c427c
2014-06-23 10:55:51 -05:00
Jason Orendorff
c3317f9be6 Bug 645416, part 1 - Add an enum for symbols to JSValueType. r=nbp.
JSVAL_TYPE_SYMBOL is inserted between STRING and NULL, rather than added at the
end, in order to preserve all the inequality relations on JSValueTypes used
throughout Value.h. (Search the header for the operators < > <= >=.)

Otherwise, this pretty much just works. Some details of Ion snapshot layout
had to change to accommodate 4-bit types.

--HG--
extra : rebase_source : e3141e6a9ee32ef563dab43a4942a9e67d234865
2014-06-23 10:55:51 -05:00
Benoit Jacob
083f0e0cc1 Bug 1028588 - Fix dangerous public destructors in js/xpconnect - r=bholley 2014-06-23 14:49:08 -04:00
Nick Fitzgerald
59dc6af800 Bug 1027157 - Make warnings reported with JSEXN_NONE so that they don't appear as errors in the console. r=Waldo 2014-06-19 15:44:00 -04:00
Douglas Crosher
8b763ac4fa Bug 1027441 - OdinMonkey: Fix use of size() with pending pool entries. r=luke 2014-06-23 14:12:16 +10:00
Nick Fitzgerald
f79fcccd5f Bug 1000967 - Add source notes for |new| expression and function calls to improve source maps and debugging. r=ejpbruel 2014-06-20 13:09:00 -04:00
Luke Wagner
a3d2e05151 Bug 1027674 - OdinMonkey: small Ion FFI optimization (r=dougc)
--HG--
extra : rebase_source : 95b909bffa35ec045286430e537583a4421ec6ea
2014-06-23 09:57:45 -05:00
Jan de Mooij
2b7ee170f0 Bug 1027528 part 13 - Remove JSString::hasPureChars etc, and refactor callers. r=njn 2014-06-23 16:20:57 +02:00
Nicolas B. Pierron
dac5dc5d41 Bug 1003801 - Sort functions based on Bug 1003801 order. r=Vash 2014-06-23 04:41:40 -07:00
Rémi Weng
82f36c0664 Bug 1024589 - IonMonkey: Implement FromCharCode Recover Instruction. r=nbp 2014-06-23 04:41:40 -07:00
Guillaume Maudoux
681ba345c5 Bug 1028556 part 2 - IonMonkey: Fix RPow test case. r=nbp 2014-06-23 04:41:40 -07:00
Guillaume Maudoux
bd9ddb6860 Bug 1028662 - IonMonkey: Implement PowHalf Recover Instruction. r=nbp 2014-06-23 04:41:39 -07:00
Douglas Crosher
ff7ec9890d Bug 1027476 - IonMonkey: (ARM) remove an unnecessary no-pool region in buildOOLFakeExitFrame(). r=jandem 2014-06-19 14:50:13 +10:00
Peter Van der Beken
7785f47487 Bug 1027095 - Convert XPathResult to WebIDL bindings - add WebIDL API and switch. r=bz. 2013-07-04 17:40:06 +02:00
Carsten "Tomcat" Book
45f76b3c25 Backed out changeset 214719d6c99c (bug 1000182) for fixing failing jit tests on a CLOSED TREE 2014-06-23 10:14:33 +02:00
Carsten "Tomcat" Book
a7818c0574 Backed out changeset f35c977b4b21 (bug 1000182) for failing jit tests on a CLOSED TREE 2014-06-23 10:12:12 +02:00
Bob Owen
d5b1972d3b Bug 1025476 - Part 1: Add compulsory Init functions to AutoJSAPI. r=bholley 2014-06-19 08:21:14 +01:00
823ecbf857 Bug 1026858 - "search for "stdio.h" exactly". r=mshal 2014-06-18 17:19:00 +02:00
Jan Beich
570d6f212a Bug 1028745 - Avoid using foreign ASSERT() macro in JS code. r=bhackett 2014-06-23 07:16:51 +02:00
Jan Beich
0f8b987a2f Bug 1025674 - Unbreak non-unified build of --disable-ion after bug 976446. r=bhackett 2014-06-23 07:16:16 +02:00
Paali Tandia
3506a15324 Bug 1024895 - Implementing Floor recover on bailout. r=nbp 2014-06-22 11:14:00 -07:00
David Moreira
494e623000 Bug 1028573 - Implement RInstruction for MathFunction::round. r=nbp 2014-06-22 11:14:00 -07:00
Guillaume Maudoux
12e818afee Bug 1028658 - Fix indentation of RMod functions. r=nbp 2014-06-22 11:13:59 -07:00
Guillaume Maudoux
08e9171836 Bug 1028556 - IonMonkey: Implement Pow Recover Instruction. r=nbp 2014-06-22 11:13:59 -07:00
Guillaume Turri
01a51381bb Bug 1024896 - IonMonkey: Implement Round Recover Instruction. r=nbp 2014-06-22 11:13:58 -07:00
Bill McCloskey
78c2618e3d Bug 990729 - Add compartmentPerAddon option for XUL overlays (r=bholley) 2014-06-21 11:55:15 -07:00
Bill McCloskey
1ddea0f108 Bug 990729 - No longer store addonId in sandbox metadata (r=bholley) 2014-06-21 11:54:37 -07:00
Bill McCloskey
61a6099aec Bug 1019181 - Don't use JSPROP_PERMANENT for JSOP_DEFCONST (r=jorendorff) 2014-06-21 11:54:36 -07:00
Bill McCloskey
14ad05f2a2 Bug 990729 - Tests for writeToGlobalPrototype (r=bholley) 2014-06-21 11:54:36 -07:00
Bill McCloskey
699e653a64 Bug 990729 - Add writeToGlobalPrototype option for sandboxes (r=bholley) 2014-06-21 11:54:36 -07:00
Bill McCloskey
92f929818a Bug 990729 - Fix nullptr/JS_PropertyStub mistake in js::CheckDefineProperty (r=jorendorff) 2014-06-21 11:54:30 -07:00
Bill McCloskey
75435b477c Bug 990729 - Don't consider JSAddonId* to be a rooting hazard (r=terrence) 2014-06-21 11:54:25 -07:00
Bill McCloskey
08dc80ac48 Bug 1017302 - Expose add-on IDs to JS engine (r=bholley) 2014-06-21 11:54:22 -07:00
Jan de Mooij
64f87ae0f9 Bug 1026438 part 8 - Make irregexp GetCaseIndependentLetters work with Latin1 strings. r=bhackett 2014-06-21 19:56:32 +02:00
Jan de Mooij
2d3dff50ad Bug 1026438 part 7 - Make irregexp CheckSpecialCharacterClass, CheckNotBackReference work with Latin1 strings. r=bhackett 2014-06-21 19:56:30 +02:00
Jan de Mooij
47fae291f5 Bug 1027528 part 17 - Make shell's OffThreadCompileScript work with Latin1 strings. r=bhackett 2014-06-21 19:56:28 +02:00
Jan de Mooij
f4a52669de Bug 1027528 part 16 - Make JSDependentString::undepend work with Latin1 strings. r=luke 2014-06-21 19:56:25 +02:00
Jan de Mooij
24288ad8e7 Bug 1027528 part 14 - Make self-hosting string cloning work with Latin1 strings. r=till 2014-06-21 19:56:23 +02:00
Jan de Mooij
baa4cfe2ab Bug 1027528 part 12 - Make more code work with Latin1 strings. r=terrence 2014-06-21 19:56:21 +02:00
Brian Hackett
cf6c9fa3ca Bug 1020012 - Consolidate ScriptSources with the same source, r=luke. 2014-06-21 10:39:04 -07:00
Chris Peterson
2c6c9dce99 Bug 1013065 - Remove bug 65664's NSCAP_DONT_PROVIDE_NONCONST_OPEQ workaround. r=dbaron 2014-05-04 23:11:04 -07:00
Shu-yu Guo
694607f859 Bug 1019304 - Part 4: Add MUnreachable to end basic blocks that have bails in them. (r=sunfish) 2014-06-20 18:39:14 -07:00
Shu-yu Guo
badc6fcbf3 Bug 1019304 - Part 3: Mark rematerialized frames inside ForkJoin during ForkJoin minor collection. (r=lth) 2014-06-20 18:39:14 -07:00