Commit Graph

180 Commits

Author SHA1 Message Date
Terrence Cole
e6cabfa3d1 Bug 743047 - Make the script atoms HeapPointers; r=billm
These are only initialized and then read from, but we need to barrier the init
so that we will have a remembered set entry for atoms that are in the nursery.

--HG--
extra : rebase_source : 9a5a1eb3e0c76d4624a978627ff901d336b0c540
2012-04-05 15:54:57 -07:00
Bill McCloskey
1eff4f5687 Bug 739899 - Eliminate the distinction between full and compartment GCs (r=igor) 2012-04-02 18:29:11 -07:00
Igor Bukanov
45bee87157 Bug 737365 - stop using the cx during finalization, part 3.
This part removes the usage of JSContext* during the finalization and
when sweeping the compartments. That required to change quite a few
methods in type inference, jit and debugger implementation to take a
FreeOp rather than JSContext pointer. In turn that also often required
to replace cx->compartment usage with extracting the compartment from
the passed objects or pass the compartment explicitly. On the plus side
it allowed to remove fallible compartment enter code in methods that
could be called during finalization.
2012-03-20 11:22:05 +01:00
Igor Bukanov
83623b313c Bug 737365 - stop using the cx during finalization, part 1.
This part changes the signatures for various finalization API to take
not JSContext* but rather either JSFreeOp structure or its
library-private counterpart FreeOp. These structures wrap parameters
that are passed to the finalizers removing most of explicit dependencies
on JSContext in the finalization code.
2012-03-19 15:34:55 +01:00
Igor Bukanov
7296e0408c bug 737624 - memory-only encoding/decoding of scripts and functions. r=:luke
The patch shrinks the API presented in jsxdrapi.h down to 4 functions to
encode/decode scripts and interpreted functions to/from the memory. The
newly introduced implementation header vm/Xdr.h replaces the former
JSXDRState with the template class XDRState parametrized by the enum
type with two constants, XDR_ENCODE and XDR_DECODE. This way a compiler
can fully eliminate the former runtime checks for the decoding/encoding
mode. As a drawback this required to explicitly instantiate the xdr
implementation as I do not want to put all the xdr code to header files.

The memory-only XDR allows to avoid coping filename and to-be-atomized
chars to a temporary buffer as the code can just access the buffer
directly. Another change is that new XDRScript takes as a parameter its
parent script. This allowed to avoid keeping filename in XDRState and
simplify the filename management.

Another change is the removal of JS_HAS_HDR. As CloneScript uses XDR to
copy a script, JS_HAS_XDR cannot be disabled.

--HG--
rename : js/src/jsxdrapi.cpp => js/src/vm/Xdr.cpp
extra : rebase_source : f8f1536a86b7c3fe7296a16b6677bd21664af98a
2012-02-20 11:58:00 +01:00
Dão Gottwald
766a2b3244 Backed out changeset 30798fdc5bad 2012-03-24 12:33:30 +01:00
Igor Bukanov
f8a4496d31 bug 737624 - memory-only encoding/decoding of scripts and functions. r=:luke
The patch shrinks the API presented in jsxdrapi.h down to 4 functions to
encode/decode scripts and interpreted functions to/from the memory. The
newly introduced implementation header vm/Xdr.h replaces the former
JSXDRState with the template class XDRState parametrized by the enum
type with two constants, XDR_ENCODE and XDR_DECODE. This way a compiler
can fully eliminate the former runtime checks for the decoding/encoding
mode. As a drawback this required to explicitly instantiate the xdr
implementation as I do not want to put all the xdr code to header files.

The memory-only XDR allows to avoid coping filename and to-be-atomized
chars to a temporary buffer as the code can just access the buffer
directly. Another change is that new XDRScript takes as a parameter its
parent script. This allowed to avoid keeping filename in XDRState and
simplify the filename management.

Another change is the removal of JS_HAS_HDR. As CloneScript uses XDR to
copy a script, JS_HAS_XDR cannot be disabled.

--HG--
rename : js/src/jsxdrapi.cpp => js/src/vm/Xdr.cpp
2012-02-20 11:58:00 +01:00
Ms2ger
8775c56114 Backed out changeset f33e1e959036; r=bustage 2012-03-24 11:04:34 +01:00
Igor Bukanov
8e97874303 bug 737624 - memory-only encoding/decoding of scripts and functions. r=:luke
The patch shrinks the API presented in jsxdrapi.h down to 4 functions to
encode/decode scripts and interpreted functions to/from the memory. The
newly introduced implementation header vm/Xdr.h replaces the former
JSXDRState with the template class XDRState parametrized by the enum
type with two constants, XDR_ENCODE and XDR_DECODE. This way a compiler
can fully eliminate the former runtime checks for the decoding/encoding
mode. As a drawback this required to explicitly instantiate the xdr
implementation as I do not want to put all the xdr code to header files.

The memory-only XDR allows to avoid coping filename and to-be-atomized
chars to a temporary buffer as the code can just access the buffer
directly. Another change is that new XDRScript takes as a parameter its
parent script. This allowed to avoid keeping filename in XDRState and
simplify the filename management.

Another change is the removal of JS_HAS_HDR. As CloneScript uses XDR to
copy a script, JS_HAS_XDR cannot be disabled.

--HG--
rename : js/src/jsxdrapi.cpp => js/src/vm/Xdr.cpp
2012-02-20 11:58:00 +01:00
Jim Blandy
d3ae4a11e2 Bug 734454: Use a table to declare atoms. r=waldo 2012-03-16 16:15:31 -07:00
Jim Blandy
d437ab862a Bug 734454: Minor cleanups to atom declarations and definitions, in preparation for conversion to a table. r=waldo 2012-03-16 16:15:31 -07:00
David Mandelin
68c407c176 Bug 733260 followup: use uint32_t for array and string lengths, r=luke
--HG--
extra : rebase_source : 1729b4b927fde0678872b9de62a7466381aa07c3
2012-03-06 15:52:55 -08:00
David Mandelin
5e02d0630c Bug 733260: remove typedef jsuint, r=luke
--HG--
extra : rebase_source : e8f576e1b5b189b47807c613c0cff79f5c8038e7
2012-03-05 18:43:45 -08:00
David Mandelin
8984e21021 Bug 732306: Remove typedef jsint, r=luke
--HG--
extra : rebase_source : 4d15a8514dbd698c114fa688461e533afab68ffa
2012-03-01 18:54:01 -08:00
Terrence Cole
276ed7807a Bug 727281 - Make JSObject* for Root and Barriered marking indirect; r=billm
This will allow us to move HeapPtr and rooted objects when tracing.

--HG--
extra : rebase_source : 6752792c1610899350eee1d5151136090de94f42
2012-02-14 15:19:55 -08:00
Terrence Cole
a877d9b43e Bug 721463 - Clean up and minimize marking interfaces; r=billm
Currently, the marking interfaces are a giant pile of duplicated and,
frequently, unused code.  This patch reworks the interface to clean
up jsgcmark.h.
2012-02-14 09:10:23 -08:00
Phil Ringnalda
14bf78c766 Back out 61d58d97747a (bug 721463) on expanded suspicion of GC crashes 2012-02-09 21:02:19 -08:00
Terrence Cole
389bd33824 Bug 721463 - Clean up and minimize marking interfaces; r=billm
Currently, the marking interfaces are a giant pile of duplicated and,
frequently, unused code. This patch reworks the interface to clean
up jsgcmark.h.

--HG--
extra : rebase_source : 34797ffbdc8940d3de312b650163910ad8b1b728
2012-01-24 19:34:44 -08:00
Igor Bukanov
672b98ffbe bug 660441 - removal of cx parameter from IsAboutToBeFinalized. r=anygregor 2012-02-08 01:51:32 +01:00
Jason Orendorff
a466009da6 Bug 699565 - Part 1 - for-of loop basics. r=Waldo. 2012-02-07 12:57:16 -06:00
Jeff Walden
ca8c9935e4 Remove internal #includes of jsstdint.h, the functionality of which is now part of the JSAPI and need not be explicitly #included. No bug, r=evilpies, r=jorendorff, r=terrence, all over IRC
--HG--
extra : rebase_source : 073e357a4f7bcfe1af4de5e7370d10dae9a3a07d
2012-01-22 21:22:10 -08:00
Luke Wagner
deb78ef5af Bug 675078 - rm JSThreadData and JSThread (JSRuntime is now officially single-threaded) (r=igor,rs=mccr8)
--HG--
extra : rebase_source : f6d2c2c6083f4589691ede571159bfd7e7ef8701
2011-07-18 14:54:48 -07:00
Matt Brubeck
54f0eed49e Back out 79deba022227 (bug 675078) because of Win debug mochitest-other failures 2012-01-24 17:32:30 -08:00
Terrence Cole
8a4e489530 Bug 720840 - Call MarkStringUnbarriered directly; r=billm
We have a special marker function for handling the Atom list because we need to
call JS_SET_TRACING_INDEX externally to avoid clobbering the index.  However,
nobody cares about the index here and if they do, they can add custom debug
code.  It is better at this point to have a consistent and correct interface,
thus we remove the specialized atomized string marking in favor of the existing
markers.  Additionally, this is only used during root marking so we can switch
to using MarkRoot for the extra assertions.

--HG--
extra : rebase_source : b4448f7fde8990a727bf2893e53688690e170535
2012-01-24 15:21:44 -08:00
Luke Wagner
411fc35146 Bug 675078 - rm JSThreadData and JSThread (JSRuntime is now officially single-threaded) (r=igor) 2011-07-18 14:54:48 -07:00
Jeff Walden
87d3f92e61 Bug 708735 - Use <stdint.h> types in JSAPI and throughout SpiderMonkey. Continue to provide the {u,}int{8,16,32,64} and JS{Uint,Int}{8,16,32,64} integer types through a single header, however, for a simpler backout strategy -- and also to ease the transition for embedders. r=timeless on switching the jsd API to use the <stdint.h> types, r=luke, r=dmandelin 2011-12-08 22:54:10 -05:00
Igor Bukanov
7049b7ba77 Bug 707664 - atoms compartment should beunlocked during OOM reporting. r=luke 2011-12-05 21:28:07 +01:00
Bill McCloskey
8e7a5d934a Bug 641027 - Add snapshot-at-the-beginning write barriers for incremental GC (r=luke,bhackett) 2011-10-25 16:07:42 -07:00
Jason Orendorff
1102691b89 Bug 695094 - Move js{scan,parse,emit}.{h,cpp} into js/src/frontend/. r=luke.
--HG--
rename : js/src/jsemit.cpp => js/src/frontend/CodeGenerator.cpp
rename : js/src/jsemit.h => js/src/frontend/CodeGenerator.h
rename : js/src/jsparse.cpp => js/src/frontend/Parser.cpp
rename : js/src/jsparse.h => js/src/frontend/Parser.h
rename : js/src/jsscan.cpp => js/src/frontend/TokenStream.cpp
rename : js/src/jsscan.h => js/src/frontend/TokenStream.h
2011-10-17 16:54:28 -05:00
Jeff Walden
8a2b96580e Bug 693469 - Use mozilla::ArrayLength and mozilla::ArrayEnd in preference to JS_ARRAY_LENGTH whenever possible. r=cjones
--HG--
extra : rebase_source : d89352e4f8c0e40853673d980d16d12dab04b44f
2011-10-10 23:00:28 -07:00
Jeff Walden
eb2cb918a4 Back out everything since 5435ee09cf7b. Tinderbox compilers hate me. r=epic-fail 2011-10-12 12:21:53 -07:00
Jeff Walden
bd8d321b37 Bug 639469 - Use mozilla::ArrayLength and mozilla::ArrayEnd in preference to JS_ARRAY_LENGTH whenever possible. r=cjones 2011-10-10 23:00:28 -07:00
Luke Wagner
c7d3e6785c Bug 689362 - Create js/public (with the intention that its contents will eventually be the only INSTALLED_HEADERS), move Vector and HashTable to js/public and some dependencies (r=billm,sr=dmandelin)
--HG--
rename : js/src/jshashtable.h => js/public/HashTable.h
rename : js/src/jsvector.h => js/public/Vector.h
rename : js/src/mfbt/InlineMap.h => js/src/ds/InlineMap.h
extra : rebase_source : 818639b74653667b7a572bc1234398c0e4559a60
2011-10-04 15:33:00 -07:00
Bobby Holley
94682a4756 Bug 657260 - Move CheckStringLength to JSString. r=Waldo 2011-10-07 19:34:28 -04:00
Jeff Walden
37632bfcb5 Bug 687621 - Convert getProperty to take a PropertyName*, and make getGeneric the only way to get a property for a jsid. r=luke 2011-09-15 11:44:10 -07:00
Bill McCloskey
f3698e14b3 Bug 675806 - Make static strings be GC things (r=luke) 2011-09-20 14:47:14 -07:00
Igor Bukanov
cc337ac79c bug 674251 - making JSScript a GC-thing. r=jorendorff,bhackett1024 2011-08-09 10:51:59 +02:00
Jeff Walden
98b0739498 Bug 678998 - Rename IsFunctionQName to GetLocalNameFromFunctionQName and make it infallible, now that QName's localName slot stores an atom and conversion to jsid can be infallible. r=luke
--HG--
extra : rebase_source : 5f0958ab3053b07ca87eb5955b274e3bd551d23d
2011-08-15 00:12:48 -04:00
Jason Orendorff
6666d9cd42 Merge from mozilla-central to jsdbg2. 2011-08-09 10:21:12 -05:00
Jason Orendorff
c4f527861a Merge from mozilla-central to jsdbg2. 2011-07-28 13:45:51 -05:00
Jason Orendorff
75a71f51e8 Merge from mozilla-central to jsdbg2 branch. 2011-07-27 18:23:16 -05:00
Jason Orendorff
9b4065b6f0 Bug 651940 - When hashing a jsid, assert that js_CheckForStringIndex(id) == id. r=Waldo. 2011-07-27 17:44:29 -05:00
Jason Orendorff
1f245d40df Merge from tracemonkey to jsdbg2. 2011-07-01 19:02:40 -05:00
Jeff Walden
7090baef12 Bug 676700 - Slightly speed up js::IndexToId by converting directly to atom, not to string and then to atom. r=luke
--HG--
extra : rebase_source : d352929e4002f285670448e4515bea404f2cf88f
2011-08-04 19:21:25 -07:00
Jason Orendorff
fcfd80cfc5 Merge from TM. Huge merge. Stack changes from bug 656462. 2011-06-15 16:14:09 -05:00
Nikhil Marathe
acda759fc1 Bug 656519 - Avoid a malloc (and a finalizer) by storing the malloc'd array in our slots instead of in a separate malloc'd structure in our private field. r=mrbkap
--HG--
extra : rebase_source : 791ede2d8db96f56e4ef8478d491aec413d3e392
2011-06-14 15:33:11 -04:00
Jim Blandy
88decefd28 Merge from TM. 2011-06-07 12:12:28 -07:00
David Mandelin
ea7d5ed079 Bug 662165: fix MSVC warning 2011-06-06 13:36:57 -07:00
Alon Zakai
2f4274045c Bug 644241, part 1 - Remove script stack quota. r=igor 2011-06-03 17:54:26 -07:00
Chris Leary
dae433fed7 Bug 661770: Avoid call overhead atomizing from js_AtomizeChars. (r=njn)
--HG--
extra : rebase_source : 0bcacc47c6171886e6d200c1de093df5aa326e8d
2011-06-03 15:36:07 -07:00