Commit Graph

333 Commits

Author SHA1 Message Date
Ehsan Akhgari
cc57e4a883 Merge mozilla-central into mozilla-inbound on a CLOSED TREE 2012-05-02 21:52:33 -04:00
Luke Wagner
f99bf99bf0 Bug 749617 - rm XDRState::codeString (r=njn,a=not-libxul) 2012-05-01 14:01:06 -07:00
Brian Hackett
09f807c5af Get rooting analysis to pass jit-tests in the interpreter, bug 745742. r=billm 2012-04-30 17:10:30 -07:00
Terrence Cole
9561bda0d3 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.
2012-04-05 15:54:57 -07:00
Bill McCloskey
247fcf9aab Bug 739899 - Eliminate the distinction between full and compartment GCs (r=igor) 2012-04-02 18:29:11 -07:00
Igor Bukanov
afa94c9de8 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
c7e7021207 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
fc5505b07d 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.
2012-02-20 11:58:00 +01:00
Dão Gottwald
ad75927242 Backed out changeset 30798fdc5bad 2012-03-24 12:33:30 +01:00
Igor Bukanov
109bfff8eb 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.
2012-02-20 11:58:00 +01:00
Ms2ger
b87e158709 Backed out changeset f33e1e959036; r=bustage 2012-03-24 11:04:34 +01:00
Igor Bukanov
0eff99d625 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.
2012-02-20 11:58:00 +01:00
Jim Blandy
620bfcc3c4 Bug 734454: Use a table to declare atoms. r=waldo 2012-03-16 16:15:31 -07:00
Jim Blandy
91d07cbb69 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
232a121344 Bug 733260 followup: use uint32_t for array and string lengths, r=luke 2012-03-06 15:52:55 -08:00
David Mandelin
4038954f95 Bug 733260: remove typedef jsuint, r=luke 2012-03-05 18:43:45 -08:00
David Mandelin
197f344254 Bug 732306: Remove typedef jsint, r=luke 2012-03-01 18:54:01 -08:00
Terrence Cole
d5bba64499 Bug 727281 - Make JSObject* for Root and Barriered marking indirect; r=billm
This will allow us to move HeapPtr and rooted objects when tracing.
2012-02-14 15:19:55 -08:00
Terrence Cole
3396b5b18b 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
cea53c0836 Back out 61d58d97747a (bug 721463) on expanded suspicion of GC crashes 2012-02-09 21:02:19 -08:00
Terrence Cole
417c65d7c8 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-01-24 19:34:44 -08:00
Igor Bukanov
642ae18cf6 bug 660441 - removal of cx parameter from IsAboutToBeFinalized. r=anygregor 2012-02-08 01:51:32 +01:00
Jason Orendorff
9b97a3a1af Bug 699565 - Part 1 - for-of loop basics. r=Waldo. 2012-02-07 12:57:16 -06:00
Jeff Walden
b580faca5d 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 2012-01-22 21:22:10 -08:00
Luke Wagner
afdd78c326 Bug 675078 - rm JSThreadData and JSThread (JSRuntime is now officially single-threaded) (r=igor,rs=mccr8) 2011-07-18 14:54:48 -07:00
Matt Brubeck
5491d5a546 Back out 79deba022227 (bug 675078) because of Win debug mochitest-other failures 2012-01-24 17:32:30 -08:00
Terrence Cole
188f53b520 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.
2012-01-24 15:21:44 -08:00
Luke Wagner
9912c99d35 Bug 675078 - rm JSThreadData and JSThread (JSRuntime is now officially single-threaded) (r=igor) 2011-07-18 14:54:48 -07:00
Jeff Walden
12e010ddeb 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
5efb25836b Bug 707664 - atoms compartment should beunlocked during OOM reporting. r=luke 2011-12-05 21:28:07 +01:00
Bill McCloskey
267d9855a3 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
b0c1f2dccb Bug 695094 - Move js{scan,parse,emit}.{h,cpp} into js/src/frontend/. r=luke. 2011-10-17 16:54:28 -05:00
Jeff Walden
cb28ecfc4b Bug 693469 - Use mozilla::ArrayLength and mozilla::ArrayEnd in preference to JS_ARRAY_LENGTH whenever possible. r=cjones 2011-10-10 23:00:28 -07:00
Jeff Walden
c5e5f873d1 Back out everything since 5435ee09cf7b. Tinderbox compilers hate me. r=epic-fail 2011-10-12 12:21:53 -07:00
Jeff Walden
9dc00cdc62 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
f6e92fa08c 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) 2011-10-04 15:33:00 -07:00
Bobby Holley
90bea65035 Bug 657260 - Move CheckStringLength to JSString. r=Waldo 2011-10-07 19:34:28 -04:00
Jeff Walden
10e2a9cbb2 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
6316f0c54c Bug 675806 - Make static strings be GC things (r=luke) 2011-09-20 14:47:14 -07:00
Igor Bukanov
f687e50505 bug 674251 - making JSScript a GC-thing. r=jorendorff,bhackett1024 2011-08-09 10:51:59 +02:00
Jeff Walden
d46d9caf66 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 2011-08-15 00:12:48 -04:00
Jason Orendorff
0f4f69a746 Merge from mozilla-central to jsdbg2. 2011-08-09 10:21:12 -05:00
Jason Orendorff
b576c7167f Merge from mozilla-central to jsdbg2. 2011-07-28 13:45:51 -05:00
Jason Orendorff
0a46d5195d Merge from mozilla-central to jsdbg2 branch. 2011-07-27 18:23:16 -05:00
Jason Orendorff
5235d5203e Bug 651940 - When hashing a jsid, assert that js_CheckForStringIndex(id) == id. r=Waldo. 2011-07-27 17:44:29 -05:00
Jason Orendorff
17781060f2 Merge from tracemonkey to jsdbg2. 2011-07-01 19:02:40 -05:00
Jeff Walden
494cd39d9c Bug 676700 - Slightly speed up js::IndexToId by converting directly to atom, not to string and then to atom. r=luke 2011-08-04 19:21:25 -07:00
Jason Orendorff
e9791bb9e8 Merge from TM. Huge merge. Stack changes from bug 656462. 2011-06-15 16:14:09 -05:00
Nikhil Marathe
cfa1f030fd 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 2011-06-14 15:33:11 -04:00
Jim Blandy
cac53315be Merge from TM. 2011-06-07 12:12:28 -07:00