Commit Graph

34062 Commits

Author SHA1 Message Date
Dan Gohman
9520accb3f Bug 1027897 - IonMonkey: Use FixedList for a few things. r=bhackett 2014-06-23 13:42:07 -07:00
Dan Gohman
6478fed465 Bug 1027897 - IonMonkey: Rename LDefinition's Policy enum fields for consistency with LUse r=bhackett 2014-06-23 13:42:07 -07:00
Dan Gohman
50d5c044eb Bug 1027897 - IonMonkey: Add some regalloc-related comments. r=bhackett 2014-06-23 13:42:07 -07:00
Dan Gohman
0e15cde44a Bug 1027897 - IonMonkey: Intervals are sorted by their start. r=bhackett 2014-06-23 13:42:07 -07:00
Dan Gohman
f21ff8479c Bug 1027897 - IonMonkey: Refactor split position bookkeeping into helper classes. r=bhackett 2014-06-23 13:42:07 -07:00
Dan Gohman
603f4c87ed Bug 1027897 - IonMonkey: More regalloc dumping improvements r=bhackett 2014-06-23 13:42:07 -07:00
Dan Gohman
3d37fafe97 Bug 1027897 - IonMonkey: Create entryOf and exitOf helper functions and use them. r=bhackett 2014-06-23 13:42:07 -07:00
Dan Gohman
778e457ed9 Bug 1027897 - IonMonkey: Eliminate a few explicit CodePosition::pos() calls. r=bhackett 2014-06-23 13:42:06 -07:00
Dan Gohman
c062b4dca6 Bug 1027897 - IonMonkey: Minor code simplifications. r=bhackett 2014-06-23 13:42:06 -07:00
Bobby Holley
a4670be1a3 Bug 1027131 - Additional tests for wrapReflectors. r=gabor 2014-06-23 13:25:09 -07:00
Bobby Holley
de6604063e Bug 1027131 - Use StackScopedClone for cloneInto. r=gabor 2014-06-23 13:25:08 -07:00
Bobby Holley
35d05d7ac8 Bug 1027131 - Add support for function cloning in StackScopedClone. r=gabor 2014-06-23 13:25:08 -07:00
Bobby Holley
e4bed6b8f4 Bug 1027131 - Innerize before reflector detection. r=gabor 2014-06-23 13:25:08 -07:00
Bobby Holley
7f45a5ad0e Bug 1027131 - Add support for Blob and FileList in the wrapReflectors = false case. r=gabor 2014-06-23 13:25:08 -07:00
Bobby Holley
b010932e5f Bug 1027131 - Switch to a struct for the StackScopedClone closure. r=gabor 2014-06-23 13:25:08 -07:00
Bobby Holley
360e5e5da1 Bug 1027131 - Rename CloneNonReflectors into StackScopedClone, and give it an options struct. r=gabor 2014-06-23 13:25:07 -07:00
Bobby Holley
0c4ff6d411 Bug 1027131 - Remove invalid assertion. r=gabor
If a clone happens between two same-origin scopes, we'll end up with CCWs here
that are neither Xrays nor reflectors.
2014-06-23 13:25:07 -07:00
Bobby Holley
fc116f2c1c Bug 1027131 - Split out ExportHelpers.cpp. r=gabor
A lot of this stuff is usable from both Sandbox.cpp and XPCComponents.cpp, and
those files are both pretty big these days.
2014-06-23 13:25:07 -07:00
Jan Beich
610dff8cc8 Bug 1028775 - Unbreak non-unified build of --disable-ion after bug 1013326. r=luke 2014-06-23 22:13:21 +02:00
Jan Beich
e8668f8862 Bug 1028734 - Unbreak --disable-ion build after bug 1019304. r=shu 2014-06-23 22:12:51 +02:00
Luke Wagner
6b7dae104a Bug 1027885 - OdinMonkey: hoist the start/end function code (r=bbouvier)
--HG--
extra : rebase_source : 29de292af394eba001503d0a5fe68774924bf725
2014-06-23 14:55:56 -05:00
Luke Wagner
18840ba7a9 Bug 1027885 - OdinMonkey: rename to AsmJSFrameSize, move definition to be closer to use (r=bbouvier)
--HG--
extra : rebase_source : 145339db9969a91313f6af63dabf9be518a8faa7
2014-06-23 11:01:41 -05:00
Luke Wagner
b5e78a6205 Bug 1027885 - OdinMonkey: use non-asserting labels (r=sunfish)
--HG--
extra : rebase_source : d5cd151417e40196c2734054564acbe872b150b6
2014-06-23 10:59:28 -05:00
Jim Blandy
7162d26f9a Bug 961325: Give PersistentRooted a copy constructor that can take a 'const' original. r=terrence 2014-06-23 12:59:19 -07:00
Benoit Jacob
c6505caca2 Bug 1028588 - Fix dangerous public destructors in js/jsd/ - r=sfink 2014-06-23 15:56:10 -04:00
Jon Coppeard
7f9e37a800 Bug 1028358; r=terrence
--HG--
extra : rebase_source : 9a11ed18dc2a94ef2397eb61a24eb74d764f0df7
2014-06-23 12:36:54 -07:00
Terrence Cole
05ff43e9d5 Bug 1028358; r=jonco
--HG--
extra : rebase_source : 41cf1eaa104bf386c77777be906236d1d15a2622
2014-06-23 12:36:36 -07:00
Jason Orendorff
7f9e00a477 Bug 645416, part 29 - Implement Symbol.keyFor(). r=efaust.
--HG--
extra : rebase_source : 2494792929754ba1915f380c0384471c3d5cb8e0
2014-06-23 10:57:04 -05:00
Jason Orendorff
a0cbf316e5 Bug 645416, part 28 - Update Object.prototype.toSource for symbol-keyed properties. r=Waldo.
The new output uses syntax with square brackets: {[Symbol.for("key")]: "value"}
This syntax is not yet supported in SpiderMonkey, but it is part of ES6 (see
bug 924688 or search the ES6 drafts for ComputedPropertyName).

--HG--
extra : rebase_source : 6976a1025c268aaed3462d900b83fa6a33515e78
2014-06-23 10:57:03 -05:00
Jason Orendorff
79c5cb0949 Bug 645416, part 27 - Implement Object.getOwnPropertySymbols(). r=Waldo.
--HG--
extra : rebase_source : 88b44837f0b845f88a881d4b472d3c9ef44bcbf0
2014-06-23 10:57:03 -05:00
Jason Orendorff
3e53164b38 Bug 645417, part 26 - Update jsid sorting for JS_MORE_DETERMINISTIC. r=luke.
Unfortunately, with symbols, the original goal of this code is apparently
impossible. For two unique symbols with the same description, short of doing
extra bookkeeping at run time, there's no ordering that's sure to be consistent
across runs. The new code orders all other symbols.

--HG--
extra : rebase_source : 0734906d046e577d4c7d65149ec688dd0b80e885
2014-06-23 10:57:03 -05:00
Jason Orendorff
2769f17284 Bug 645416, part 25 - Add support for enumerating symbol-keyed properties. r=Waldo.
Object.keys, Object.getOwnPropertyNames, and for-in loops skip symbol-keyed
properties per spec, but Object.defineProperties sees them, and a future
Reflect.ownKeys API will need to be able to see them.

This patch changes the comments on JSITER_FOREACH and JSITER_KEYVALUE, but not
the behavior. The comments were just wrong.

--HG--
extra : rebase_source : f1ad99d416df8a8acef5598bef2cde4b72dcdb31
2014-06-23 10:57:03 -05:00
Jason Orendorff
223d23449e Bug 645416, part 24 - Modify proxy tests to add testing for symbol-keyed properties. r=efaust.
This patch also updates legacy direct proxies to cope with symbols. Uniform
behavior seems like the easiest thing to carry forward.

--HG--
extra : rebase_source : 5e5251c942e879a4440d7c0524343cf6fc744c7e
2014-06-23 10:57:02 -05:00
Jason Orendorff
07ec21e434 Bug 645416, part 23 - Implement ValueToId for symbols. This makes symbols work as property keys. r=efaust.
--HG--
extra : rebase_source : eec18157d90daf54afc300b81d351011e5b669d5
2014-06-23 10:57:02 -05:00
Jason Orendorff
f427cf7043 Bug 645416, part 22 - Remove JSCompartment::wrapId. r=terrence.
This is unnecessary now that object jsids no longer exist. Both string and
symbol jsids point only to GC things in the atoms compartment, which are safe
to pass to any compartment without wrapping.

--HG--
extra : rebase_source : 82c21e8474df05b1bb42c14d872c981205bbe879
2014-06-23 10:57:02 -05:00
Jason Orendorff
e54535bb40 Bug 645416, part 21 - Add symbol jsids (SYMBOL_TO_JSID), removing the legacy support for object jsids (OBJECT_TO_JSID). r=terrence,r=jimb,r=efaust.
With just this patch, there are not actually any symbol jsids flowing through
the system, just as there are not actually any object jsids. But a subsequent
patch (part 23) changes this.

This patch deletes some code in CTypes.cpp that is simply confused about how
element accesses work: Int64 and UInt64 objects were never actually converted
to object jsids, so the code being removed here was already dead code.

--HG--
extra : rebase_source : 86f421c6454344e76ce5219b7b1aed5c83b45f24
2014-06-23 10:56:52 -05:00
Jason Orendorff
2412cb39a5 Bug 645416, part 20 - Add JS::Symbol::dump() method for debugging. r=efaust.
--HG--
extra : rebase_source : 2e2539f319593d51876ef39caa0c96800b6d605e
2014-06-23 10:56:52 -05:00
Jason Orendorff
39f62cf523 Bug 645416, part 19 - Update assertDeepEq for symbols. r=till.
The contract of assertDeepEq(a, b) is that the assertion passes iff a and b
have the isomorphic heap graphs. Symbols, like objects, are treated as nodes in
this graph. So, for example, if a and b are distinct symbols, then [a, b] is
not deepEq to [b, b] because they have distinct graphs. There are three nodes
in [a, b]: the array, a, and b.  There are only two nodes in [b, b]: the array,
and b.

--HG--
extra : rebase_source : 9415559bab9f0ed132dd49d3790892b3209fa77b
2014-06-23 10:56:51 -05:00
Jason Orendorff
340ae048a6 Bug 645416, part 18 - Update ValueToSource for symbols. r=sfink.
--HG--
extra : rebase_source : 8d3702bd625ba2126f691810e1ea2a7736fd77e7
2014-06-23 10:56:51 -05:00
Jason Orendorff
893e2556d3 Bug 645416, part 17 - Implement ToPrimitive on Symbol wrapper objects. r=sfink.
The spec defines this by way of a @@toPrimitive method. We fake it using a
JSClass::convert hook. (Once @@toPrimitive is implemented, convert hooks
can be removed entirely, but we need symbols first.)

--HG--
extra : rebase_source : c8c7ed3eead8bd79bb38b70f448ebb98c5b3d780
2014-06-23 10:56:51 -05:00
Jason Orendorff
0ff275fd1e Bug 645416, part 16 - Implement Symbol.prototype.valueOf. r=sfink.
--HG--
extra : rebase_source : 12dfad71e0933ccc3e553854f44bdf0f85eccf64
2014-06-23 10:56:51 -05:00
Jason Orendorff
abe45ff112 Bug 645417, part 15 - Tests for ToObject on symbols. r=sfink.
The test as-base-value.js is not testing symbols as property keys (which is
implemented in a later patch), but on the other side of the . operator: as
things that can have property accesses done to them, just like you can do
"name".length or (3.14).toString().

--HG--
extra : rebase_source : 3dac7660999bd021ec32c13985471e1608a29f64
2014-06-23 10:56:51 -05:00
Jason Orendorff
d89373c327 Bug 645416, part 14 - Update ToString for symbols. r=sfink.
The change in jit-test/tests/symbol/toString.js is that we now check that an
exception is actually thrown. Until this patch, stringifying a symbol did not
throw. (The test was mainly checking that we did not assert in Ion.)

No changes in Ion. If a symbol is being stringified, it's ok to be in a slow
path because that is going to throw anyway.

--HG--
extra : rebase_source : 9cf314dafa7392a20fee9d3b5acc4ad7fc1c5229
2014-06-23 10:56:50 -05:00
Jason Orendorff
ffe098aa09 Bug 645416, part 13 - Update ToNumber for symbols. r=sfink.
Not terribly interesting; converting a symbol to a number always produces NaN.

--HG--
extra : rebase_source : ded251ef9e92d92483b5cc18cf16e2910084bbff
2014-06-23 10:56:50 -05:00
Jason Orendorff
ffb7a900e7 Bug 645416, part 12 - Update ToBoolean for symbols. r=sfink.
--HG--
extra : rebase_source : 24d444b77bbfdbc35e3f99c73e5b182e2ecad029
2014-06-23 10:56:50 -05:00
Jason Orendorff
17baf1bfcc Bug 645416, part 11 - Update GDB pretty-printers for symbols. r=jimb.
--HG--
extra : rebase_source : ab2063ab6073b748069c6a8ad1cd34ab0d5e7d86
2014-06-23 10:56:50 -05:00
Jason Orendorff
50238c4db4 Bug 645417, part 10 - Well-known symbols. r=terrence,r=efaust.
At present there is only one, Symbol.iterator, and it is not hooked up to
anything (this happens in bug 918828). ES6 defines 8 well-known symbols. Each
one is attached to a feature, so we'll add the symbols as we add features.
Symbol.create will appear when @@create semantics are implemented.

--HG--
extra : rebase_source : aab40a7487708c8bbd23dcfbe935ece1903d75ff
2014-06-23 10:56:49 -05:00
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