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
Bug 645416, part 16 - Implement Symbol.prototype.valueOf. r=sfink.

--HG--
extra : rebase_source : 12dfad71e0933ccc3e553854f44bdf0f85eccf64
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
Bug 645416, part 18 - Update ValueToSource for symbols. r=sfink.

--HG--
extra : rebase_source : 8d3702bd625ba2126f691810e1ea2a7736fd77e7
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
Bug 645416, part 20 - Add JS::Symbol::dump() method for debugging. r=efaust.

--HG--
extra : rebase_source : 2e2539f319593d51876ef39caa0c96800b6d605e
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
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
Bug 645416, part 23 - Implement ValueToId for symbols. This makes symbols work as property keys. r=efaust.

--HG--
extra : rebase_source : eec18157d90daf54afc300b81d351011e5b669d5
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
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
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
Bug 645416, part 27 - Implement Object.getOwnPropertySymbols(). r=Waldo.

--HG--
extra : rebase_source : 88b44837f0b845f88a881d4b472d3c9ef44bcbf0
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
Bug 645416, part 29 - Implement Symbol.keyFor(). r=efaust.

--HG--
extra : rebase_source : 2494792929754ba1915f380c0384471c3d5cb8e0
bug 1024642: Add rebeccapurple to mochitest colors; r=jmaher
Bug 1024642: Remove extra white space from files, no functional changes; r=dbaron
Bug 1024642: Update devtools source editor and test to add rebeccapurple; r=jwalker
Bug 1024642: Add in rebeccapurple to color lists in gfx; r=dbaron
Bug 1024642: Update layout tests to incorporate rebeccapurple as color in element properties; r=dbaron