Commit Graph

229 Commits

Author SHA1 Message Date
Benjamin Peterson
71c5fe0a2a Bug 574130: JavaScript spread array initializers, r=jorendorff. 2012-06-06 21:53:07 -05:00
Luke Wagner
abf23bd479 Bug 659577 - Don't alias stack variables (r=bhackett) 2012-02-23 13:59:10 -08:00
Benjamin Peterson
04ccce6a96 Bug 757676 - Implement JS default parameters. r=jorendorff 2012-05-26 09:33:53 -04:00
Benjamin Peterson
d15a61f318 Bug 574132 - Implement rest parameters for JavaScript. r=jorendorff. 2012-05-23 10:31:35 -05:00
Ryan VanderMeulen
556f080af7 Backout 5130ffc92faf (bug 574132) due to debug orange. 2012-05-21 21:30:18 -04:00
Benjamin Peterson
8245f3d6f7 Bug 574132 - Implement harmony rest parameters. r=jorendorff 2012-05-21 20:38:05 -04:00
Gervase Markham
cb6a072c2a Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Steve Fink
e939d57e6a Bug 575688 - Implement DataView from Typed Arrays spec. r=Waldo 2012-03-25 19:14:27 -07:00
Kyle Huey
e2b184d6bf Bug 695480: Remove support for chrome code leaking DOM objects. r=jst,billm,bholley 2012-04-25 21:03:53 -07:00
Jason Orendorff
9e2609c22e Debugger.Environment.getVariable and setVariable. Bug 692984, r=jimb. 2012-04-06 16:48:38 -05:00
Jim Blandy
937af2cdbf Bug 733461: Implement the 'query' parameter of Debugger.prototype.findScripts. r=jorendorff 2012-04-05 17:10:44 -07: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
Igor Bukanov
0265d1f860 bug 726944 - Remove JSClass::xdrObject and related functionality. r=luke 2012-02-13 09:02:21 +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
1ce46f3f11 Bug 715821 - Make Object.prototype.__defineGetter__ and Object.prototype.__defineSetter__ perform their work by forwarding to Object.defineProperty. This eliminates two calls to CheckRedeclaration, which is impeding property-storage-splitting work. r=bhackett 2012-01-06 00:13:20 -06:00
Chris Leary
c4d9162389 Bug 709622: Conditional with empty consequent causes strict strict warning. (r=Waldo) 2011-12-13 13:22:37 -08:00
Jason Orendorff
3aacf9715e A first cut at Debugger.Environment. Bug 690558, r=jimb. 2011-12-08 14:54:26 -06:00
Tom Schuster
cbdaee0e93 Bug 602212 - Use error message from js.msg when CSP blocks a call to eval r=jorendorff 2011-11-24 19:39:02 +01:00
Jason Orendorff
70c522c744 Report an error when trying to watch an E4X property with a qualified name, rather than set a watchpoint that will not hit reliably. Bug 691746, r=jimb. 2011-10-24 10:51:52 -05:00
Jason Orendorff
16e4202b3d Bug 682306 - Remove an unused field in JSFunction. r=dmandelin. 2011-08-30 06:07:10 -05:00
Jim Blandy
0c9134ef77 Bug 673125: Implement the Debugger.Frame.prototype.onStep accessor. r=jorendorff. 2011-08-23 14:45:36 -05:00
Jason Orendorff
5cba3b7c34 Back out 4a86c9387193 (bug 673125 part 4) due to red and orange. 2011-08-23 15:32:23 -05:00
Jim Blandy
a43a710d4f Bug 673125: Implement the Debugger.Frame.prototype.onStep accessor. r=jorendorff. 2011-08-23 14:45:36 -05:00
Jason Orendorff
6cd1a709e4 Fix error messages to address review comments from sfink (bug 672829 comment 66). 2011-08-11 02:00:23 -05:00
Jason Orendorff
3b65f2626e Merge from mozilla-central to jsdbg2. 2011-08-01 17:46:33 -05:00
Jason Orendorff
65120d0676 Use reserved slots rather than Debugger fields for hooks. 2011-07-19 08:27:03 -05:00
Jeff Walden
f660cd056b Bug 607371 - Throw an exception when an excessively large arguments array is passed to Function.prototype.apply, rather than silently passing only the maximum number of supported elements. Silently treating the array as smaller than it actually is is prone to silent errors; throwing an exception is immediate and obvious. r=luke 2011-07-25 20:33:02 -07:00
Jason Orendorff
e8c4035d50 Add Debugger.Object.prototype.defineProperty. 2011-07-12 20:19:13 -05:00
Jason Orendorff
5d114c9308 Backout 40e989742b4d due to failing jstests. 2011-07-13 10:43:00 -05:00
Jason Orendorff
80415acc63 Add Debugger.Object.prototype.defineProperty. 2011-07-12 20:19:13 -05:00
Jason Orendorff
9af1646a8d Merge from tracemonkey to jsdbg2. 2011-07-11 08:53:27 -05:00
Paul Biggar
07050b7ce8 Bug 666448: Remove 2nd argument to escape() for ECMA/Test262 compliance (r=jwalden) 2011-07-05 16:51:12 -07:00
Jason Orendorff
17781060f2 Merge from tracemonkey to jsdbg2. 2011-07-01 19:02:40 -05:00
Jason Orendorff
7d20f6a982 Add breakpoints.
This adds a new per-compartment implementation of breakpoints and
reimplements the jsdbgapi.h "trap" entry points on top of it. Most
jsdbgapi.h-using code will still work, but there is no longer a single
runtime-wide trapList protected by a lock. Embeddings must follow the
compartment rules for thread safety.

JS_ClearAllTraps was removed, replaced by the per-compartment API
JS_ClearAllTrapsForCompartment.

The new implementation asserts that the PC passed to JS_SetTrap is
actually an offset of an instruction, not just a random number. This
caused quite a few tests to fail; fixes are included.

Added Debug.Script.prototype.setBreakpoint, getBreakpoints,
clearBreakpoint, and clearAllBreakpoints; and
Debug.prototype.clearAllBreakpoints.

In addition to tests targeting the new functionality, this changeset
includes some tests for Debug.Script.prototype.getLineOffsets, which is
hard to test without breakpoints.
2011-06-28 16:06:34 -05:00
Jason Orendorff
faf9b28aff Add Script.prototype.getAllOffsets and getLineOffsets. 2011-06-28 14:46:00 -05:00
Jason Orendorff
9f0c3fff66 Add Script.prototype.getOffsetLine. 2011-06-25 20:58:17 -05:00
Jason Orendorff
bd1cde858a Support disabling debug mode in a compartment with scripts on the stack. Dump the debug-mode JIT code during a later GC. 2011-06-23 12:25:48 -05:00
Jason Orendorff
ba7258645a Change js::Debug::objects to have referents as keys, rather than cross-compartment wrappers of referents.
This adds support for cross-compartment WeakMaps and changes js::Debug::objects to be one. It eliminates the vexing JSMSG_DEBUG_STREAMS_CROSSED error messsage.

The GC interaction between jsgc and jsdbg is a little more complex now; like the cross-compartment wrapper maps, Debug::objects must be marked (just once) during per-compartment GC. In other ways this is a simplification.
2011-06-20 18:26:05 -05:00
Jason Orendorff
b12b2dfb2b Fix Debug-ctor-03.js (regression: the exception is being thrown in the wrong compartment since rev e05d3da5866a) and make removeDebuggee throw if it would disable debug mode in a compartment with scripts on the stack. 2011-06-20 15:33:53 -05:00
Jason Orendorff
17327c843d Initial support for Debug.Script instances. r=jorendorff, push=jorendorff. 2011-06-17 16:28:32 -05:00
Jason Orendorff
e9791bb9e8 Merge from TM. Huge merge. Stack changes from bug 656462. 2011-06-15 16:14:09 -05:00
Jim Blandy
cac53315be Merge from TM. 2011-06-07 12:12:28 -07:00
Alon Zakai
61ffc8f8bc Bug 644241, part 1 - Remove script stack quota. r=igor 2011-06-03 17:54:26 -07:00
Jason Orendorff
5a84abe8a2 JS_SetDebugModeForCompartment: Instead of asserting that enabling debug mode is safe, check and throw if it is not. The change to AllFramesIter in Stack.cpp is by luke, r=me. 2011-05-26 14:54:47 -05:00
Jason Orendorff
05d829f609 Add Debug.prototype.{add,remove,has}Debuggee and .getDebuggees. 2011-05-23 16:28:45 -05:00
Jason Orendorff
d4a46f8644 Require the CCW slot of a Debug.Object object to contain an actual cross-compartment wrapper. That way, per-compartment GC never collects referents, simplifying sweep phase. 2011-05-21 00:40:33 -05:00