Commit Graph

91 Commits

Author SHA1 Message Date
Brian Hackett
8aadadd66a Bug 934450 - Allow objects to have copy on write elements, r=billm,jandem. 2014-08-19 22:25:37 -08:00
Dan Gohman
d24f091257 Bug 1054334 - SpiderMonkey: Eliminate unnecessary parentheses around return values r=nbp 2014-08-18 12:20:40 -07:00
Terrence Cole
3718c92afc Bug 1047120 - PurpleBuffer doesn't actually need to use Heap<T>; r=mccr8,jonco 2014-07-31 14:43:45 -07:00
Terrence Cole
260506a9ca Bug 1046945 - Move ExposeGCThingToActiveJS to js::gc:: and use the typed wrappers instead; r=jonco
--HG--
extra : rebase_source : 99d98ed9351f563ed3b6eb18ad67d2f3ae736df4
2014-07-31 12:14:17 -07:00
Terrence Cole
8d0192ae1b Bug 1045181 - Miscellaneous small cleanups in js::gc; r=jonco 2014-07-29 10:47:43 -07:00
Steve Singer
f7e8253480 Bug 1030400 - Add sym to the 32 bit big endian branch. r=jorendorff 2014-06-25 18:48:00 +02:00
Jason Orendorff
26bdfdcc2f 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
64a2896773 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
cc9b00ab80 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
Terrence Cole
2cfeae1d9e Bug 1017650 - Re-arrange the GC API include dependency ordering; r=jonco
--HG--
extra : rebase_source : bc27b7206c674ef2247169dd700b9fbf61e5bd74
2014-06-16 11:59:45 -07:00
Jon Coppeard
1e52d084da Bug 1021114 - Remove GCMethods::kind() in favour or RootKind::rootKind() r=terrence 2014-06-07 10:34:57 +01:00
Ryan VanderMeulen
c926517847 Backed out 3 changesets (bug 1021114, bug 988486) for GC crashes on a CLOSED TREE.
Backed out changeset f56234ba7ec7 (bug 1021114)
Backed out changeset 14a4a9062253 (bug 988486)
Backed out changeset 03eccac81e15 (bug 988486)
2014-06-07 00:03:17 -04:00
Jon Coppeard
a51d6e0272 Bug 1021114 - Remove GCMethods::kind() in favour or RootKind::rootKind() r=terrence 2014-06-07 10:34:57 +01:00
Jon Coppeard
e3c37fbf79 Bug 1008473 - Fix breakage on little endian 32 bit builds r=terrence 2014-06-03 16:29:39 +01:00
Jon Coppeard
c68efbdd4d Bug 1008473 - Make Value::toGCThing() return a Cell pointer rather than void* r=terrence 2014-06-02 16:10:53 +01:00
Ehsan Akhgari
5b0272c079 Bug 1013663 - Fix some bad implicit conversion constructors in the JS engine; r=jorendorff,jandem 2014-05-25 21:46:24 -04:00
Heiher
64ac1ec0b7 Bug 997274 - Value.h uses NUNBOX32 and PUNBOX64 instead of JS_BITS_PER_WORD. r=nbp 2014-05-21 06:47:10 -07:00
Terrence Cole
458143c115 Bug 989414 - Access the store buffer through the chunk trailer; r=jonco 2014-05-01 09:26:12 -07:00
Jon Coppeard
1216544376 Bug 959787 - Handlify remaining JS APIs r=terrence r=bz r=bholley 2014-04-30 10:10:33 +01:00
Nicholas Nethercote
910e605997 Bug 952650 (part 18) - Rename JSVAL_IS_SPECIFIC_BOOLEAN. r=till.
--HG--
extra : rebase_source : 73b6b9d92ca940249cdb1d6bdc71f9ee9bb498ec
2014-04-28 16:55:40 -07:00
Nicholas Nethercote
1c0602e423 Bug 952650 (part 16) - Remove JSVAL_TO_PRIVATE. r=till.
--HG--
extra : rebase_source : 603bb66a90484b488bedf1dd4da6935324c148c6
2014-04-28 16:01:31 -07:00
Nicholas Nethercote
278d02539e Bug 952650 (part 15) - Remove JSVAL_TO_GCTHING. r=till.
--HG--
extra : rebase_source : c9df656012842c35f4a0e069168842b5e6c4d935
2014-04-28 16:01:30 -07:00
Nicholas Nethercote
049829fa60 Bug 952650 (part 14) - Remove JSVAL_IS_GCTHING. r=till.
--HG--
extra : rebase_source : 469430d481f5fdb14d49609d8460f9fcbc90927f
2014-04-28 16:01:30 -07:00
Nicholas Nethercote
1c5751ac95 Bug 952650 (part 13) - Remove JSVAL_IS_PRIMITIVE. r=till.
--HG--
extra : rebase_source : 450ba0261ef5a8546c81f9f645605e312585d6c6
2014-04-27 20:27:54 -07:00
Nicholas Nethercote
530542eecd Bug 952650 (part 12) - Remove JSVAL_TO_OBJECT. r=till.
--HG--
extra : rebase_source : 60dcaa2b778d3cf6eb7dc1a4949aab010ed8c130
2014-04-27 19:58:52 -07:00
Rodrigo Rodriguez Jr.
3a5329b969 Bug 952650 (part 11) - Remove JSVAL_TO_INT. r=njn.
--HG--
extra : rebase_source : 41923458bbf8fd957c9a57685df4969f1190bd9f
2014-04-27 19:55:08 -07:00
Rodrigo Rodriguez Jr.
75b31bf370 Bug 952650 (part 10) - Remove JSVAL_IS_NUMBER. r=njn.
--HG--
extra : rebase_source : eaef4276d665c9bb06eb695989fb4c3b08358069
2014-04-27 19:48:45 -07:00
Rodrigo Rodriguez Jr.
9a92d22f5a Bug 952650 (part 9) - Remove JSVAL_IS_INT. r=njn.
--HG--
extra : rebase_source : dc0c170914c2370c218cdbbe671d2a68628f5a87
2014-04-27 19:47:02 -07:00
Rodrigo Rodriguez Jr.
e987aa99bf Bug 952650 (part 8) - Remove JSVAL_TO_STRING. r=njn.
--HG--
extra : rebase_source : 61ab9459c00849027498904863647e65453a1a43
2014-04-27 19:45:46 -07:00
Rodrigo Rodriguez Jr.
0e287e21ad Bug 952650 (part 7) - Remove JSVAL_IS_BOOLEAN. r=njn.
--HG--
extra : rebase_source : 1ac334a052b7374dd9080d9bf89658e1f5d6168f
2014-04-27 19:44:05 -07:00
Rodrigo Rodriguez Jr.
d65b5ba4e5 Bug 952650 (part 6) - Remove JSVAL_IS_STRING. r=njn.
--HG--
extra : rebase_source : ebd55749447f9feea04a78ff7cc17ba2dd2c5cd0
2014-04-27 19:41:01 -07:00
Rodrigo Rodriguez Jr.
017da05366 Bug 952650 (part 5) - Remove JSVAL_TO_DOUBLE. r=njn.
--HG--
extra : rebase_source : b1d9ba218fd1126f486f686ec5754dfaedac8b3c
2014-04-27 19:38:31 -07:00
Rodrigo Rodriguez Jr.
350562fe28 Bug 952650 (part 4) - Remove JSVAL_IS_DOUBLE. r=njn.
--HG--
extra : rebase_source : 3c7065d9e487db70a1afed0a4143ae7b0cd23af9
2014-04-27 19:35:40 -07:00
Rodrigo Rodriguez Jr.
d4d3d322ef Bug 952650 (part 3) - Remove JSVAL_TO_BOOLEAN. r=njn.
--HG--
extra : rebase_source : fbe97c23a4893b8c4c5641f41947f3a96f7111d3
2014-04-27 19:34:12 -07:00
Rodrigo Rodriguez Jr.
281223c92e Bug 952650 (part 2) - Remove JSVAL_IS_VOID. r=evilpies.
--HG--
extra : rebase_source : 0ae81cd69dc13d944927de906abc656536b4d425
2014-04-27 19:32:05 -07:00
Rodrigo Rodriguez Jr.
d3fe3aaf5d Bug 952650 (part 1) - Remove JSVAL_IS_NULL. r=terrence.
--HG--
extra : rebase_source : 83d1cdaf71260fd99b688c23303ceb2de7b00031
2014-04-27 19:30:51 -07:00
Terrence Cole
07d4801503 Bug 989414 - Implement BarrieredValue in terms of BarrieredPtr using GCMethods; r=jonco
--HG--
extra : rebase_source : 76557f521b48a546f185af6c0fcc14a4c7fad7e9
2014-04-25 14:18:18 -07:00
Nicolas B. Pierron
f2ea1dcb9f Bug 990106 part 3 - Recover RInstructions during bailouts. r=jandem 2014-04-29 10:17:51 -07:00
Shu-yu Guo
df7ee101da Bug 716647 - Part 1: Introduce JS_OPTIMIZED_OUT magic for optimized out slots and teach Debugger about them. (r=jandem) 2014-04-24 01:59:36 -07:00
Ms2ger
0fc658f1e9 Bug 981371 - Fix a confused assertion in JSVAL_IS_OBJECT_IMPL (64-bits); r=luke 2014-03-27 21:05:13 +01:00
Luke Wagner
72a9042752 Bug 979541 - Remove nonLazyScript use in ArgumentsObject::elements (r=jandem)
--HG--
extra : rebase_source : 640ddf5af5d606a7ee40ee6189faaec244298b39
2014-03-05 14:49:36 -06:00
Jan de Mooij
556e355bad Bug 977538 - Disable PGO for CanonicalizeNaN. r=luke
--HG--
extra : rebase_source : 7be8e2eb69297cafa8e705c738e9ed814ad50308
2014-02-27 20:48:59 +01:00
Benjamin Bouvier
438e225871 Bug 939843: Required changes in Spidermonkey; r=mjrosenb
--HG--
extra : rebase_source : e629b045dfe460348c339ef0e7d301b67c6799fd
2014-02-27 16:23:11 +01:00
Terrence Cole
f7e4661151 Bug 959787 - Handlify several JSAPI interfaces that can GC, Part 1; r=sfink,Ms2ger
--HG--
extra : rebase_source : 0e0e75028f12db9cc4cf612a9205525669b70267
2014-01-14 12:41:22 -08:00
Nicolas B. Pierron
539c077dff Bug 958471 - Assert range of Object/String Values' payload. r=jandem 2014-01-16 03:06:31 -08:00
Jon Coppeard
1c4835c7fd Bug 959683 - Use rooting typedefs consistently in our public API r=sfink 2014-01-15 10:31:00 +00:00
Sean Stangl
33cecd91b2 Bug 939505 - Use JS_DEBUG in public headers. r=jorendorff 2013-12-06 15:03:08 -08:00
Jeff Walden
d272298ed4 Bug 943839 - Simplify Anchor and get rid of JS_AnchorPtr. r=terrence
--HG--
extra : rebase_source : f2d9e039f758b6078c57f601537effe8c7c39f82
2013-12-02 15:43:30 -08:00
Jon Coppeard
e8f47db8f4 Bug 935136 - Remove the now unnecessary UnbarrieredMutableValueOperations r=terrence 2013-11-19 22:53:36 +00:00
Ed Morley
bc86ea8de4 Backed out changeset b75c703f2e7e (bug 935136) 2013-11-20 16:38:13 +00:00