Jim Blandy
74847db9cd
Back out 480132: orange on Linux ( http://tinderbox.mozilla.org/showlog.cgi?log=TraceMonkey/1237017748.1237029269.2403.gz&fulltext=1 )
2009-03-14 08:19:58 -07:00
Jim Blandy
bed3611385
Bug 480132: Clone lexical blocks only when needed. r=igor
...
Terminology:
A "script block" is an object of class Block allocated by the byte
compiler and associated with a script. Script blocks are never
modified, and may be used as a prototype for a "closure block":
A "closure block" is an object of class Block that holds variables
that have been closed over (although we actually leave the variables
on the stack until we leave their dynamic scope). A closure block is
a clone of a script block (its prototype is a script block).
Adjust the meanings of fp->blockChain and fp->scopeChain:
fp->blockChain is always the innermost script block in whose static
scope we're executing.
fp->scopeChain is the current scope chain, including 'call' objects
and closure blocks for those function calls and blocks in whose
static scope we are currently executing, and 'with' objects for with
statements; the chain is typically terminated by a global object.
However, as an optimization, the young end of the chain omits block
objects we have not yet needed to clone.
Closures need fully reified scope chains, so have js_GetScopeChain
reify any closure blocks missing from the young end of fp->scopeChain
by cloning script blocks as needed from fp->blockChain. Thus, if we
never actually close over a particular block, we never place a closure
block for it on fp->scopeChain.
Have JSOP_ENTERBLOCK and JSOP_LEAVEBLOCK always keep fp->blockChain
current. When JSOP_LEAVEBLOCK pops a block from fp->blockChain that
has been cloned on fp->scopeChain, pop fp->scopeChain as well.
Remove the JSFRAME_POP_BLOCKS flag, as it is no longer needed.
Ensure that the JIT won't have to create closure blocks or call
js_PutBlockObject; it can't handle those things yet. Note our current
script block when we begin recording. Abort recording if we leave
that block; we can't tell in advance whether it will need to be "put"
in future trace invocations. Leave trace if we call js_GetScopeChain
while in the static scope of lexical blocks. Remove JIT tests based
on JSFRAME_POP_BLOCKS.
Verify that generators capture the correct value for blockChain.
Add a constructor to JSAutoTempValueRooter for rooting JSObject
pointers.
2009-03-14 00:58:27 -07:00
Jim Blandy
d72dff994b
Back out 480132 fix; static analysis red
2009-03-14 00:57:54 -07:00
Jim Blandy
4778b96a85
Bug 480132: Clone lexical blocks only when needed. r=igor
...
Terminology:
A "script block" is an object of class Block allocated by the byte
compiler and associated with a script. Script blocks are never
modified, and may be used as a prototype for a "closure block":
A "closure block" is an object of class Block that holds variables
that have been closed over (although we actually leave the variables
on the stack until we leave their dynamic scope). A closure block is
a clone of a script block (its prototype is a script block).
Adjust the meanings of fp->blockChain and fp->scopeChain:
fp->blockChain is always the innermost script block in whose static
scope we're executing.
fp->scopeChain is the current scope chain, including 'call' objects
and closure blocks for those function calls and blocks in whose
static scope we are currently executing, and 'with' objects for with
statements; the chain is typically terminated by a global object.
However, as an optimization, the young end of the chain omits block
objects we have not yet needed to clone.
Closures need fully reified scope chains, so have js_GetScopeChain
reify any closure blocks missing from the young end of fp->scopeChain
by cloning script blocks as needed from fp->blockChain. Thus, if we
never actually close over a particular block, we never place a closure
block for it on fp->scopeChain.
Have JSOP_ENTERBLOCK and JSOP_LEAVEBLOCK always keep fp->blockChain
current. When JSOP_LEAVEBLOCK pops a block from fp->blockChain that
has been cloned on fp->scopeChain, pop fp->scopeChain as well.
Remove the JSFRAME_POP_BLOCKS flag, as it is no longer needed.
Ensure that the JIT won't have to create closure blocks or call
js_PutBlockObject; it can't handle those things yet. Note our current
script block when we begin recording. Abort recording if we leave
that block; we can't tell in advance whether it will need to be "put"
in future trace invocations. Abort recording if we call
js_GetScopeChain while in the static scope of lexical blocks. Remove
JIT tests based on JSFRAME_POP_BLOCKS.
Verify that generators capture the correct value for blockChain.
Add a constructor to JSAutoTempValueRooter for rooting JSObject
pointers.
2009-03-13 23:43:32 -07:00
Robert Sayre
8e061e35da
Backout patch for Bug 480132. Debug only nit fix busts static analysis compile.
2009-03-14 02:20:45 -04:00
Jim Blandy
40e8a7d560
Bug 480132. SpiderMonkey clones too many blocks into the heap. r=igor
2009-03-14 02:09:28 -04:00
Igor Bukanov
4b95050fe2
Backed out changeset 57de81309176 - bug 437325 - due to mochitest leaks on tinderbox
2009-03-13 18:36:46 +01:00
Igor Bukanov
3de011b9cd
bug 437325 - JSThread is no longer shared between runtimes. r=brendan
2009-03-13 12:36:21 +01:00
Igor Bukanov
75640ecce1
Backed out changeset 4159ebdfe31e to fix some typos in the patch
2009-03-13 12:21:04 +01:00
Igor Bukanov
8eeedd9647
bug 437325 - JSThread is not shared between runtimes. r=brendan
2009-03-13 12:10:34 +01:00
Igor Bukanov
3e7114aad2
bug 482038 - removal of JSRuntime.gcPoke checks from js_NewGCThing. r=brendan
2009-03-12 10:15:55 +01:00
Jim Blandy
875aee5e88
Bug 479258: Include "jsstdint.h" for <stdint.h> type use within SpiderMonkey. r=brendan
2009-03-18 11:38:16 -07:00
Brendan Eich
e37fd1b818
Bug 476447 - Array.prototype getter/setter does not work as usual (r=jorendorff).
2009-03-09 11:25:43 -07:00
Andreas Gal
52cc17234c
Check for non-stub getters/setters in SETNAME and SETPROP and invoke SetPropHit after setting the property in INITPROP (481989, r=brendan).
2009-03-07 01:25:37 -08:00
Brendan Eich
0332084955
Bug 481516 - Assertion failure: pobj_ == obj2, at ../jsinterp.cpp:4276 when getting a property that is cached but shadowed (r=jorendorff).
2009-03-06 16:34:19 -08:00
Robert Sayre
8f71e6c715
Merge m-c to tm
2009-03-04 14:52:53 -05:00
Brendan Eich
f32c3d8613
Bug 480657 - TM: Add an API to define traceable constructors (r=gal, jorendorff).
2009-03-03 22:53:27 -08:00
Andreas Gal
5b7dfe03a9
Assert prototype shapes when reading a hole from a dense array instead of calling a builtin (481328, r=brendan).
2009-03-03 21:58:56 -08:00
Andreas Gal
8c3223aab5
Browser spuriously sets runtime->anyArrayPrototypeHasElement and makes perf bad (481251, r=mrbkap).
2009-03-03 18:04:15 -08:00
Robert Sayre
f4c8ebe128
Merge tm to m-c.
2009-03-03 13:48:15 -05:00
Igor Bukanov
7f8a45e9f9
bug 479430 - adding mixing operation callback calls. r=gal
2009-03-02 14:32:27 +01:00
Andreas Gal
4c04aa2f53
Backed out bug 480657. Massive failures across all platforms.
2009-02-28 23:40:04 -08:00
Andreas Gal
7bd6cbad5f
Add an API to define traceable constructors (480657, r=brendan).
2009-02-28 18:18:42 -08:00
Andreas Gal
1cbf259c3c
Improve blacklisting (479109, r=graydon).
2009-02-25 18:47:22 -08:00
Jason Orendorff
2f464f3348
Bug 479826 - Remove cx->pcHint. r=gal.
...
--HG--
extra : rebase_source : caf9fef929fe161fad2f6a98b53cb3d00e43f31f
2009-02-23 17:29:40 -06:00
Robert Sayre
12943580cf
Merge m-c to tracemonkey.
2009-02-23 12:44:23 -05:00
Jason Orendorff
15b9f03458
Bug 479566 - Rename array "dense length" to capacity. r=shaver.
2009-02-21 15:33:50 -06:00
Igor Bukanov
7ac32de806
bug 478543 - fixing warnings about casts between function and data pointers. r=brendan
2009-02-19 09:33:37 +01:00
Jim Blandy
2d6ea8b787
Bug 478075: Remove parent argument to js_GetCallObject. r=brendan
2009-02-18 23:57:24 -08:00
Jason Orendorff
c936fbe2d4
Bug 463239 - JS_SetTrap alters code execution. r=brendan.
2009-02-18 18:31:09 -06:00
Robert Sayre
695b4646c3
Merge tm to mc
2009-02-19 11:48:08 -05:00
Jim Blandy
ede7e6d142
Bug 391488: Eliminate PTRDIFF macro; delete jssttddef.h. r=jimb
...
Delete jsstddef.h, since its only remaining purpose is to make certain
Win16-specific definitions; we don't support Win16 any more. In
particular, we can just subtract pointers now, so the PTRDIFF macro is
unnecessary noise.
Most places get stddef.h via jstypes.h or some other header, so we can
just delete #inclusions of jstddef.h. The exception is jskwgen.h, so
there we explicitly include <stddef.h> instead.
2009-02-18 09:14:51 -08:00
Robert Sayre
a3ab3a989e
Merge tm to m-c.
2009-02-17 20:08:01 -05:00
Wladimir Palant
0028837f26
Bug 475334 - Don't trigger debugger hooks until frame initialization is complete. r=mrbkap
2009-02-11 22:28:55 +01:00
Andreas Gal
93eb39269d
Substitute operation counting with a watchdog thread (477187, 3nd attempt, r=brendan/mrbkap/jst, sr=brendan/jst).
2009-02-10 14:07:01 -08:00
Andreas Gal
474d0d308f
Backout bug 477187.
2009-02-10 09:54:14 -08:00
Andreas Gal
f796bcd60a
Substitute operation counting with a watchdog thread (477187, 2nd attempt, r=brendan/mrbkap/jst, sr=brendan/jst).
2009-02-10 03:45:36 -08:00
Andreas Gal
7ea402f38c
Merge.
2009-02-09 22:54:41 -08:00
Andreas Gal
2a20c2a6de
Backing out bug 477187. Breaks xpcshell.
2009-02-09 22:54:05 -08:00
Andreas Gal
2e46d80547
Merge.
2009-02-09 18:21:15 -08:00
Andreas Gal
cbfbbd3cac
Substitute operation counting with a watchdog thread (477187, r=brendan/mrbkap/jst, sr=brendan/jst).
2009-02-09 18:20:50 -08:00
Blake Kaplan
843dd4928c
Bug 469405 - Handle an __iterator__ implementation returning a primitive value on trace. r=brendan
2009-02-07 11:28:23 -08:00
Jason Orendorff
b93b5173f2
Bug 476873 - TM: Trace JSOP_ARRAYPUSH. r=brendan.
2009-02-06 13:19:06 -06:00
Jeff Walden
ece84ef199
Bug 474501 - JS array and object literals should define properties, not set them, to avoid calling getters or setters along the prototype chain. r=brendan
2009-02-03 23:14:36 -08:00
Igor Bukanov
5fb2f0b511
bug 467495 - JSOP_DEFUN fixes to deal with non-top-level function statements redeclaring local argument and variables. r=brendan
2009-02-05 14:11:04 +01:00
Jeff Walden
3c038a63cb
Bug 463243 - Assert correct type in JSVAL_TO_* (and vice versa) macros to fail fast when type errors happen. r=brendan
2009-02-03 13:56:25 -08:00
Andreas Gal
359fa8c1b5
Backout bug 474501. Causes a massive slowdown in trace-tests.js that needs to be investigated.
2009-02-04 01:47:44 -08:00
Jeff Walden
6a3bcef361
Bug 474501 - JS array and object literals should define properties, not set them, to avoid calling getters or setters along the prototype chain. r=brendan
2009-02-03 23:14:36 -08:00
Jason Orendorff
e4c1fb1cfd
Bug 462027 - Bail off trace when reentering interpreter. r=gal.
2009-02-03 18:25:12 -06:00
Jeff Walden
461e28ae88
Backed out changeset ca733f2cc237; looks like some include system weirdness is biting where an old version of jsapi.h is being included which then causes a *newer* included version to miscompile. Weird, still investigating...
2009-02-03 15:48:30 -08:00
Jeff Walden
e356cf1d3a
Bug 463243 - Assert correct type in JSVAL_TO_* (and vice versa) macros to fail fast when type errors happen. r=brendan
2009-02-03 13:56:25 -08:00
Jason Orendorff
27c16ff3b1
Bug 476666 - TM: Crash reading near 0 @Detecting, regression due to bug 476238. r=gal.
2009-02-03 12:39:46 -06:00
Jason Orendorff
4e3f2cfd40
Revert to 07be1f190a3d. Revision 5f5c1cd63641 should not have been pushed.
2009-02-03 12:38:44 -06:00
Jason Orendorff
f8ca22b197
Bug 476666 - TM: Crash reading near 0 @Detecting, regression due to bug 476238. r=gal.
2009-02-03 12:19:50 -06:00
Andreas Gal
68e8901a4a
Bake the value of fp->imacpc into the trace and report it at recording time when detecting inside JSOP_GETELEM (follow-up for 476238, r=brendan,jorendorff).
2009-02-02 18:21:28 -08:00
Andreas Gal
37c6216a54
Merge.
2009-02-02 17:26:22 -08:00
Andreas Gal
3682914dfd
Leave a hint for GetProperty in the context so it can figure out the current bytecode location without de-optimizing (476238, r=jorendorff).
2009-02-02 17:25:59 -08:00
Igor Bukanov
70bfc5a80d
bug 476049 - optimizing js_CheckRedeclaration for the common case of non-existing properties. r=brendan
2009-02-02 20:53:56 +01:00
Robert Sayre
5bdafd3aba
Merge tm to m-c.
2009-02-28 12:38:33 -05:00
Blake Kaplan
14658eb0ed
Bug 479288 - Move wrapping back into the outerObject hook. r+sr=bent/jst
2009-02-25 17:32:09 -08:00
Jeff Walden
543f0d5a97
Back out bug 474501; it has a problem with one Mochitest.
2009-01-30 20:00:52 -08:00
Ben Turner
60956ac6bd
Bug 460882. r+sr=mrbkap.
2009-02-16 13:16:13 -08:00
Jeff Walden
e961f82d89
Bug 474501 - JSON literals shouldn't have prototype setters run during evaluation. r=brendan
2009-01-30 17:40:33 -08:00
Jason Orendorff
37f2985bdf
Bug 476177 - TM: cx->stackPool must not be accessed on trace. r=brendan.
...
--HG--
extra : rebase_source : 746d61b54aa38cbe18fe31bce4efcbbad4629678
2009-01-30 17:40:05 -06:00
Andreas Gal
595570a83e
Add debug hook to the threaded interpreter to trace instruction stream (476128, r=shaver).
2009-01-30 15:14:31 -08:00
Jason Orendorff
6142999fde
Bug 468782 - TM: js_FastValueToIterator and js_FastCallIteratorNext can reenter (relanding with a bug fix). r=brendan. Note that this changeset alone does not fix the bug; an upcoming patch in bug 462027 completes the fix.
2009-01-28 09:24:35 -06:00
Andreas Gal
7c6106e86d
Abort if we hit SETGVAR with a NULL slot (465567, r=brendan).
2009-01-28 00:35:20 -08:00
Andreas Gal
1bbc35daad
Backed out changeset d50d3681b94e (attempted re-landing of 474771).
2009-01-27 16:41:43 -08:00
Igor Bukanov
65cda4b280
Backed out changeset 39b1c9f21064 - the patch again has triggered the crashtest timeout.
2009-01-27 15:11:47 +01:00
Andreas Gal
f17d7cf056
Set on-trace flag only during trace execution, not recording (474771, r=brendan, patch has failed before, please back out at the earliest sign of trouble).
2009-01-27 01:55:31 -08:00
Andreas Gal
868cf7c72c
Backed out changeset ece63b96379b
2009-01-27 00:10:38 -08:00
Jason Orendorff
c0cc74fa99
Bug 468782 - TM: js_FastValueToIterator and js_FastCallIteratorNext can reenter. r=brendan. Note that this changeset alone does not fix the bug; an upcoming patch in bug 462027 completes the fix.
2009-01-27 00:19:58 -06:00
Robert Sayre
b5cd4ca3dc
Backout c0b2c82a524e.
2009-01-25 22:36:46 -08:00
Andreas Gal
e481ee3eb8
Only set onTrace flag while running native code, not when recording (474771, r=brendan).
2009-01-25 20:24:25 -08:00
Brendan Eich
c13882a292
Bug 470187 - TM: "Assertion failure: entry->kpc == (jsbytecode*) atoms[index]" with valueOf, regexp (r=jorendorff).
2009-01-23 14:33:42 -08:00
Brendan Eich
196e15a45e
Bug 473282 - TM: Crash [@ JS_CallTracer] (r=jwalden).
2009-01-23 14:31:07 -08:00
Andreas Gal
184fc63cd1
Backout bug 468782. Confirmed to leak.
2009-01-25 16:38:31 -08:00
Jason Orendorff
c9961fe054
Bug 468782 - TM: js_FastValueToIterator and js_FastCallIteratorNext can reenter. r=brendan. Note that this changeset alone does not fix the bug; an upcoming patch in bug 462027 completes the fix.
2009-01-22 16:39:26 -06:00
Andreas Gal
1d277bc633
Backout all patches since last mozilla-central merge (Thu Jan 22 19:14:02 2009 -500 by sayrer).
2009-01-25 02:58:22 -08:00
Andreas Gal
1baff988de
Only set onTrace flag while running native code, not when recording (474771, r=brendan).
2009-01-23 20:22:23 -08:00
Andreas Gal
1b154f72a6
Merge.
2009-01-23 15:15:34 -08:00
Andreas Gal
920ecc2113
Backed out changeset 17663da1b840 (bug 462027).
2009-01-23 15:14:46 -08:00
Brendan Eich
94412bc214
Bug 470187 - TM: "Assertion failure: entry->kpc == (jsbytecode*) atoms[index]" with valueOf, regexp (r=jorendorff).
2009-01-23 14:33:42 -08:00
Brendan Eich
4ade60e63d
Bug 473282 - TM: Crash [@ JS_CallTracer] (r=jwalden).
2009-01-23 14:31:07 -08:00
Jason Orendorff
9ff9140ae0
Bug 468782 - TM: js_FastValueToIterator and js_FastCallIteratorNext can reenter. r=brendan. Note that this changeset alone does not fix the bug; an upcoming patch in bug 462027 completes the fix.
...
--HG--
extra : rebase_source : 585d590aace159914629a786489b0883d23cf2a8
2009-01-22 16:39:26 -06:00
Graydon Hoare
a2f947e2a1
Bug 470310 - Interpreter errors or pending exceptions should abort trace, r=brendan.
2009-01-21 12:14:47 -08:00
Igor Bukanov
c032867e33
bug 472702 - using watchdog thread in js shell to trigger operation callback
2009-01-14 18:23:51 +01:00
Igor Bukanov
f28d80b499
Backed out changeset e117c22cc1d1 - the landed patch for bug 437325 has a shutdown leak.
2009-03-22 10:15:27 +01:00
Igor Bukanov
a61176553e
bug 437325 - JSThread is no longer shared between JSRuntime instances. r=brendan
2009-03-22 10:07:14 +01:00
Andreas Gal
b438fd1512
Can't allocate new stack chunks while on trace (484524, r=brendan).
2009-03-21 00:26:03 -07:00
Igor Bukanov
05591c4681
bug 426827 - removing incorrect assert. r=mrbkap
2009-03-20 12:37:20 +01:00
Andreas Gal
89c862278e
Merge.
2009-01-05 16:23:07 -08:00
Andreas Gal
135f143d10
Backed out changeset adbe8e4b21dc due to tinderbox failures/timeouts (453157).
2009-01-05 16:22:42 -08:00
Andreas Gal
8582d80da4
Merge.
2009-01-05 16:14:14 -08:00
Andreas Gal
61a1479f3e
Don't try to deallocate the trace recorder from inside one of its own instance methods (472049, r=brendan).
2009-01-05 16:13:53 -08:00
Andrei Saprykin
9f7c96f36f
bug 453157 - watchdog thread as an alternative to operation count. r=myself,mrbkap
2009-01-05 22:09:23 +01:00
Igor Bukanov
81c3a2b632
Backed out changeset 2d5e6b1c7254 - busted the WINNT 5.1 talos tracemonkey.
2008-12-23 19:24:09 +01:00
Andrei Saprykin
11dac3f234
bug 453157 - watchdog thread as an alternative to operation count. r=igor,mrbkap
2008-12-23 16:12:11 +01:00
Igor Bukanov
136838d60b
Backed out changeset 7184e014cd05 - the patch for bug 453157 bursted tgfx test on Windows.
2008-12-21 21:49:06 +01:00
Andrei Saprykin
c68c632137
bug 453157 - watchdog thread as an alternative to operation count
2008-12-21 17:16:09 +01:00
Igor Bukanov
5d5cb0738c
bug 469233 - using interrupt hook support in the interpreter for trace recording. r=brendan
2008-12-21 12:55:09 +01:00
Igor Bukanov
8062218e55
Backed out changeset 605fd1985d05 - more merge typos.
2008-12-21 12:50:36 +01:00
Igor Bukanov
1be7edd38e
bug 469233 - using interrupt hook support in the interpreter for trace recording. r=brendan
2008-12-21 12:31:38 +01:00
Igor Bukanov
635ca1d23a
Backed out changeset f13e2a2a5d66 - I was not careful when merging the unary op changes
2008-12-21 12:23:08 +01:00
Igor Bukanov
3388b615ce
bug 469233 - using interrupt hook support in the interpreter for trace recording. r=brendan
2008-12-21 00:16:41 +01:00
Jeff Walden
4710efd8a4
Bug 469942 - TM: 20% slower to compute unary +/-. r=brendan
2008-12-19 19:30:09 -08:00
Brendan Eich
7826ab3e9f
Fix warnings pointed out by Waldo from apply patch (465214).
2008-12-19 14:15:35 -08:00
Andreas Gal
bbf40348b6
Trace apply/call with an imacro (465214, r=brendan).
2008-12-18 19:20:47 -08:00
Andreas Gal
589fb9eb38
Merge.
2008-12-17 23:09:55 -08:00
Andreas Gal
3af573343f
Backed out changeset 95b210c2fc92 preemptively. Seems to crash the browser.
2008-12-17 23:09:26 -08:00
Andreas Gal
2dffadf0fb
Merge.
2008-12-17 22:54:02 -08:00
Andreas Gal
62f0547add
Trace apply/call using an imacro (465214, r=brendan).
2008-12-17 22:53:35 -08:00
Graydon Hoare
3477355ddd
Bug 465443, bail off trace when readonly properties are written, r=brendan.
2008-12-17 20:50:05 -08:00
Brendan Eich
56658da21f
Bug 465460 - TM: valueOf ignored on third iteration of loop (r=gal).
2008-12-16 19:03:42 -08:00
Brendan Eich
2bbb1f2b7b
Bug 469313 - TM: crash (GMail): JS_Assert (s=0x368d8f "!JS_ON_TRACE(cx)", file=0x3724c8 "/Users/roc/mozilla-checkin/js/src/jsobj.cpp", ln=3765) (r=gal).
2008-12-13 17:32:44 -08:00
Blake Kaplan
f3228fcb87
Bug 464092 - Censor access to block objects when they're the parents of functions. r=igor a=beltzner
2008-12-11 14:16:46 -08:00
Jason Orendorff
b7fb9bc849
Bug 460865 - Read barrier for cx->fp. r=mrbkap, r=dmandelin.
...
--HG--
extra : rebase_source : 19963188b2f9f96336ce6ca28dbaefccf3a639b7
2008-12-09 10:38:32 -06:00
Andreas Gal
e367780a2f
Trace apply and call (462482, r=brendan).
2008-12-04 18:07:18 -08:00
Vladimir Vukicevic
7a34f9500d
Merge mozilla-central into tracemonkey
2008-11-18 13:54:21 -08:00
Igor Bukanov
b31f8300ea
bug 452913 - fixing sprop management, r=brendan, a.9.1b2=sayer
2008-11-17 13:59:39 +01:00
David Anderson
43c8a3cb27
Fixed deep abort logic when onTrace is set without a recorder (bug 465192, r=gal).
2008-11-16 17:55:01 -08:00
David Anderson
db46b11fa1
Fixed recorders already deeply aborted being pushed onto the deep abort stack (bug 465145, r=gal).
2008-11-16 02:34:51 -06:00
David Anderson
321ce0dc05
Deep abort recorders outer recorders if we need to flush the JIT cache early (bug 463829, r=brendan,gal).
2008-11-15 18:54:24 -06:00
Brendan Eich
264e667808
Fix bogus assertion left in bug 463334.
2008-11-14 13:17:40 -08:00
Brendan Eich
9cbc195e82
Fix from Ginn Chen <ginn.chen@sun.com> for bug 464645.
2008-11-13 09:10:27 -08:00
Brendan Eich
cb47c4cf08
Bug 456511 - (imacros) TM: Make conversion work on arbitrary JSObjects (r=gal).
2008-11-13 00:30:20 -08:00
Andreas Gal
074d900a57
Backed out changeset a40f2117bcc0
2008-11-12 17:39:48 -08:00
Brendan
0ca607d76b
Add imacros to support conversion of arbitrary JSObjects (456511, r=gal).
2008-11-12 16:55:45 -08:00
Igor Bukanov
31d283c656
bug 464442 - various JSOP_APPLY fixes. r=brendan
2008-11-12 22:42:13 +01:00
Andreas Gal
55c5823950
Backed out changeset 594ec832d9a8
2008-11-07 18:19:35 -08:00
Andreas Gal
54ba19de70
Trace Function.apply and Function.call (462482, r=brendan).
2008-11-07 15:58:52 -08:00
Andreas Gal
2a666c87e8
Emit JSOP_APPLY for .call(...) (462445, r=brendan).
2008-10-30 16:01:53 -07:00
Andreas Gal
948aa93d60
Perform Function.apply in the interpreter loop bypassing js_Invoke (462265, r=brendan).
2008-10-29 23:59:19 -07:00
Andreas Gal
4548b3e585
Remove JSOP_UNUSED78 as 78 is now JSOP_APPLY (follow-up for 462209).
2008-10-29 13:43:53 -07:00
Andreas Gal
868e7934a2
Emit JSOP_APPLY for .apply(...) similar to JSOP_EVAL for .eval(...) (462209, r=brendan).
2008-10-29 13:30:41 -07:00
Andreas Gal
25404443ff
GC no longer flushes the JIT cache. Instead just make sure the shape of the global object will mismatch next time we try to record or execute code, which in turn will force a flush of the code cache (458288, r=brendan/danderson).
2008-10-28 16:22:08 -07:00
Brendan Eich
bad1b50498
Re-land patch for bug 458851 now that latent bug it uncovered (not filed; see hg log) is fixed.
2008-10-28 14:04:29 -07:00
Jason Orendorff
37724bb378
Backed out changeset d4fe79372140 (bug 458851) due to persistent orange on TraceMonkey tinderboxes.
2008-10-28 10:49:06 -07:00
Brendan Eich
51f987553a
Bug 458851 - TM: for-in loops skip every other value in certain cases (r=gal/mrbkap).
2008-10-27 22:30:52 -07:00
Brendan Eich
fcca844194
Bug 461248 - Remove JSOP_RESUME (r=gal/jorendorff).
2008-10-24 12:34:08 -07:00
David Anderson
590d3d2443
Fixed crash from JIT cache flushes when js_Interpret was holding TraceRecorders (bug 458288, r=brendan).
2008-10-24 10:47:59 -07:00
Jason Orendorff
e1877796ba
Bug 460501 - Round-trip change due to "&&" constant-folding leaving extra parens. r=brendan.
2008-10-21 13:35:22 -05:00
Brendan Eich
85afb14a56
Bug 460116 - buggy inCond propagation in js_FoldConstants (r=jorendorff).
2008-10-15 14:02:33 -07:00
Blake Kaplan
54cdbe81ec
Merge mozilla-central -> tracemonkey
2008-10-13 11:05:05 -07:00
Blake Kaplan
665c19d6ac
Bug 458355 - ecma_3/Operators/11.4.1-002.js fail; r=brendan
2008-10-13 19:02:43 +02:00
Andreas Gal
6c4c7256a5
Merge.
2008-10-09 16:17:53 -07:00
Andreas Gal
9a086f63ae
Don't carry around oldpc in AbortRecording path (459321, r=danderson).
2008-10-09 16:17:13 -07:00
Jason Orendorff
319f102472
Bug 459141 - Rename JSTN_{CATCH,FINALLY,ITER} to JSTRY_*. r=brendan.
2008-10-09 12:10:17 -05:00
Jason Orendorff
a27d101dab
Bug 458735 - Improve internal API for traceable natives (r=brendan, nanojit r=edwsmith)
2008-10-08 17:08:33 -05:00
Andreas Gal
1b0fd40e30
Trace push and pop for dense and sparse arrays (453734, r=brendan).
2008-10-07 11:00:16 -07:00
Brendan Eich
19e9638dc3
Bug 457920 - regexp-dna.js and generality want JSOP_GETELEM(dense array, "0") (r=mrbkap/gal).
2008-10-06 22:30:36 -07:00
Brendan Eich
6809989bde
Bug 455973 - TM: "Assertion failure: !cx->throwing" with getter that throws (r=mrbkap).
2008-10-06 20:57:38 -07:00
Andreas Gal
83ea7eb834
Merge.
2008-09-30 16:35:52 -07:00
Andreas Gal
1163c91b59
Don't trace empty for-in loops (457335, r=brendan).
2008-09-29 22:22:40 -07:00
Andreas Gal
d0ca373339
Follow-up work for 457789, emit JSOP_RESUME after JSOP_NEW as well (r=brendan).
2008-09-29 21:30:02 -07:00
Andreas Gal
320dd48955
Add a resume point (JSOP_RESUME) immediately following JSOP_CALL (457789, r=mrbkap).
2008-09-29 18:49:40 -07:00
Jason Orendorff
c35bfc3682
Bug 389034 - JS_SetProperty() ends up resolving w/o JSRESOLVE_ASSIGNING (r=brendan, sr=bzbarsky)
2008-09-25 11:13:31 -05:00
Andrei Saprykin
6f45d79b4b
bug 444979 - fixing JSOP_TABLESWITCH to treat -0 as 0
2008-09-25 15:18:41 +02:00
Andreas Gal
c3ae2f8027
Merge.
2008-09-24 19:33:04 -07:00
Andreas Gal
f1cdf0fd1c
Make sure JSOP_DEFLOCALFUN pushes the right function object (456470, r=brendan).
2008-09-24 19:31:51 -07:00
Brendan Eich
d9b970f735
Fix warning.
2008-09-24 18:50:46 -07:00
Andreas Gal
619234db4c
Back out attempt to invoke natives that return a boxed value (namely push and pop, 453734).
2008-09-24 15:18:19 -07:00
Brendan Eich
c184542b3b
Bug 453024 - Mochitest Assertion failure: vp + 2 + argc <= (jsval *) cx->stackPool.current->avail, at jsinterp.cpp:1066 (r=igor/mrbkap).
2008-09-24 02:10:47 -07:00
Andreas Gal
9d7afa336a
Add support for fast native that return jsval and wire up push/pop (453734, r=mrbkap).
2008-09-18 16:53:09 -07:00
Andreas Gal
708f08ca9c
Properly handle side exits in scripted constructors (originally mrbkap, r=brendan, 453462).
2008-09-18 14:13:37 -07:00
Brendan Eich
fddc6e36b3
[mq]: bug455408
2008-09-17 06:13:27 +01:00
Brendan Eich
68172b5938
Bug 453411 - "Assertion failure: !cx->onTrace" with yield string (r=gal).
2008-09-16 14:00:02 +01:00
Brendan Eich
a834957775
TraceRecorder::record_SetPropMiss mis-layered on top of record_SetPropHit (454689, r=mrbkap).
2008-09-11 15:53:00 -07:00
Blake Kaplan
bcd1f7f97d
Fix bustage -- these macros are only defined if the tracer was enabled.
2008-09-10 00:12:26 -07:00
Blake Kaplan
88856d9ef1
Merge tracemonkey -> mozilla-central
2008-09-09 23:38:21 -07:00
Brendan Eich
ce15bc7cd3
Bug 454039 - TM: don't abort TraceRecorder::record_JSOP_SETPROP on cache miss (r=mrbkap).
2008-09-09 22:22:52 -07:00
Brendan Eich
7d5c49516c
Back out patch for bug 454039.
2008-09-09 16:55:07 -07:00
Brendan Eich
c7b40d9f99
Bug 454039 - TM: don't abort TraceRecorder::record_JSOP_SETPROP on cache miss (r=mrbkap).
2008-09-09 16:05:04 -07:00
Brendan Eich
94b10f6170
Avoid needless prototype-shape purges (454035, r=igor).
2008-09-09 11:24:03 -07:00
Brendan Eich
40cf4096c7
Avoid needless prototype-shape purges (454035, r=igor).
2008-09-09 09:57:10 -07:00
Brendan Eich
5b35846387
Fix bug 454266 - js_FillPropertyCache uses the wrong scope's shape sometimes (r=mrbkap).
2008-09-08 15:52:35 -07:00
Brendan Eich
cd3284e96a
Fix bug 454266 - js_FillPropertyCache uses the wrong scope's shape sometimes (r=mrbkap).
2008-09-08 15:51:47 -07:00
Taras Glek
dbf23956a4
bug 432917: Replace "must flow through label" comments with statically-checkable macro. r=igor
2008-09-08 10:51:10 -07:00
Igor Bukanov
27d83904e5
bug 453133 - merging JSOP_DEFUN and JSOP_CLOSURE. r=brendan
2008-09-08 13:58:17 +02:00
Ben Turner
1e5c70827f
Bug 451729 - " Allow runtime's security callbacks to be overridden by a context". r=brendan.
2008-09-05 16:24:53 -07:00
Jim Blandy
90bf6a2d1e
Bug 97954: Give jsconfig.h a better name, and make room for the new js-config.h. r=bsmedberg
...
We'd like the SpiderMonkey configure script to generate a header file
named js-config.h to hold #definitions chosen at configure time that
affect the SpiderMonkey API, like JS_THREADSAFE. However, that name
is very similar to that of an existing header file, jsconfig.h. This
patch renames the existing header file, and updates all references to
it.
--HG--
rename : js/src/jsconfig.h => js/src/jsversion.h
2008-09-05 10:19:17 -07:00
Brendan Eich
4fa7c5195d
Put the trace-recording/executing flag in the trace monitor to handle many contexts per thread (451666, r=gal).
2008-09-03 00:38:24 -07:00
David Anderson
be89898254
Merge with mozilla-central.
2008-09-02 14:17:19 -07:00
Andreas Gal
1d525db0e4
New attempt at fixing 453235. If building without JIT (like PPC/MacOSX), don't include the deep abort calls in jsinterp.cpp
2008-09-01 18:40:45 -07:00
Andreas Gal
4a36a6b709
Backed out changeset 25f856429db3. Wrong fix. Looks like jstracer.h is not included. We in fact can call methods of TraceRecorder directly. Sigh. I wish we had a try server.
2008-09-01 18:37:04 -07:00
Andreas Gal
fe70cfea9b
Introduce js_DeepAbort to be used from jsinterp.cpp, instead of trying to call TraceRecorder->deepAbort directly (453235).
2008-09-01 18:32:41 -07:00
Blake Kaplan
219161a0aa
Abort (deeply) if we re-enter js_Interpret in the middle of a trace. r=brendan
2008-08-29 18:59:21 -07:00
Brendan Eich
45ea54d2d1
Don't let GC run when recording.
2008-08-29 16:04:54 -07:00
Andreas Gal
4fb4d1fdc5
Monitor downward branches only during recording (452709).
2008-08-28 22:33:22 -07:00
Andreas Gal
c0e0852952
Notify the monitor of all branches, not just backwards branches.
2008-08-28 17:00:52 -07:00
Igor Bukanov
9022efe160
bug 449494 - uniform handling of bytecodes with variable stack uses. r=mrbkap,brendan
2008-09-02 08:25:15 +02:00
Brendan Eich
5d132dba83
Record JSOP_IN (452563, r=gal).
2008-08-27 23:00:43 -07:00
Brendan Eich
722ff40a11
Remove bogus assertion (452178).
2008-08-27 00:34:53 -07:00
Brendan Eich
43b25b3c09
Rename gcDontBlock to runningJittedCode, and assert it's false on entry to js_Interpret (for 451657, but not the fix, just prolog).
2008-08-25 23:08:21 -07:00
Brendan Eich
d28554f3cc
Remove over-eager gvar optimization for JSOP_DEFFUN (451678, r=shaver).
2008-08-22 18:07:32 -07:00
Brendan Eich
791221dfae
Followup upvar fix, easy assertbotch avoidance.
2008-08-21 04:16:50 -07:00
Brendan Eich
9cd8e5a539
Upvar, v0.1 (limited to looking up from eval in a function, to the function's args and vars).
2008-08-21 03:47:33 -07:00
Brendan Eich
2c4e22add3
Fix CHECK_RECORDER macro to use XOR to evaluate both terms.
2008-08-21 01:38:50 -07:00
Brendan Eich
4a25cf5a32
Defer eval'ed script destruction to next GC; expose js_obj_eval for tracing.
2008-08-20 22:18:42 -07:00
Andreas Gal
f3972bfb84
Backed out changeset be63a51a0a3b. Breaks tofte if run from ./time.sh.
2008-08-20 14:57:49 -07:00
Brendan Eich
6bc330ef33
Don't disable property caching in eval (this requires GC'ing eval scripts). Do tolerate active Call object at head of scope chain in record_JSOP_CALLNAME, and go straight to the stack slots.
2008-08-20 14:04:37 -07:00
Brendan Eich
bea371d215
Record JSOP_IN (452563, r=gal).
2008-08-28 00:18:05 -07:00
Brendan Eich
cbb33d1a83
Remove bogus assertion (452178).
2008-08-27 00:41:57 -07:00
Brendan Eich
eddb7e1614
Remove over-eager gvar optimization for JSOP_DEFFUN (451678, r=shaver).
2008-08-22 18:11:47 -07:00
Brendan Eich
af7353e4e9
Consolidate tracing-out-of-js_Interpret abort code at bottom of js_Interpret.
2008-08-14 17:00:03 -07:00
David Anderson
2c45d81524
Fixed recorder not aborting when leaving js_Execute (bug 450532).
2008-08-14 15:29:04 -07:00
Andreas Gal
d0056d1820
Assert on the recording table only if we have enabled the tracer (446551).
2008-08-14 09:04:22 -07:00
Brendan Eich
8efccf4d7d
Abort recording if unwinding from js_Interpret to js_Invoke and still recording (this can happen via fun.call/.apply). Also assert in threaded interpreter BEGIN_CASE and DO_OP (from END_CASE) that we either have no recorder or are using the recordingJumpTable.
2008-08-13 19:22:07 -07:00
Brendan Eich
74c6d3ffe3
Merge, plus ((void)0) parens.
2008-08-12 09:23:38 -07:00
shaver@mozilla.org
41a6158c57
fix build for !JS_TRACER, both threaded and switch interps
2008-08-12 12:09:59 -04:00
Brendan Eich
0280e606df
Beware macro argument multiple expansion...
2008-08-11 14:44:22 -07:00
Brendan Eich
40050a1e4d
Try fixing LOAD_INTERRUPT_HANDLER based on Andreas's patch.
2008-08-11 13:05:28 -07:00
Brendan Eich
a56862bdff
Make js_ConcatStrings JS_FASTCALL and use directly as a built-in; remove gcflag param from it and from js_NewString.
2008-08-11 11:03:54 -07:00
Brendan Eich
7967defc01
Fix ASSERT_VALID_PROPERTY_CACHE_HIT pcoff argument (my bad from 887fc4facdeb).
2008-08-11 10:40:24 -07:00
Brendan Eich
0d83651633
- Skip dense array object, try prototype, in all JSOP_GET*PROP variants, interpreter and tracer.
...
- Test entry instead of retesting aobj->map->ops->getProperty == js_GetProperty in JSOP_CALLPROP.
- Handle object and null types as well as booleans in record_JSOP_NOT.
- Trivially implement JSOP_STRICT{EQ,NE} recording by forwarding to the non-strict record methods. This works so long as the latter trace only same-type operands and do no conversions.
2008-08-11 00:05:39 -07:00
Brendan Eich
64fc3b0367
- Fix shapeless callee guarding to guard on function object value.
...
- Add JSOP_NULLTHIS to help the tracer guard shapeless callees (see trace-tests.js)
- Culled bogus record_JSOP_CALLGVAR left-over forwarding to record_JSOP_GETGVAR.
- Better shapeless callee tests.
2008-08-10 22:36:48 -07:00
Brendan Eich
337988cd85
Fix obj2 typo, meant obj (obvious use-before-set, sorry about that).
2008-08-09 13:30:49 -07:00
Brendan Eich
eaf4254c15
Merge from mozilla-central.
2008-08-08 18:58:04 -07:00
Brendan Eich
153e03bb32
Get operator new on interpreted functions working, along with JSOP_SETPROP on an unmutated object, or one of the right shape but where the setprop is adding the next property, and it's not in the object yet.
2008-08-08 14:38:44 -07:00
Igor Bukanov
b16852c1cd
bug 412296 - removal of minarg support for fast native
2008-08-08 18:02:50 +02:00
Graydon Hoare
aaf41f8ee5
Bug 447713, remove the import/export functionality from spidermonkey, r=brendan
2008-08-06 17:34:58 -07:00
Igor Bukanov
46b1a8edf2
bug 447762 - merging var and local JS bytecodes. r=brendan
2008-08-06 16:13:22 +02:00
Brendan Eich
8f837e0784
- Implement interpreter frame reconstruction (js_SynthesizeFrame).
...
- Fix MONITOR_BRANCH to restore frame-dependent interpreter locals (we want fewer of these if they can be removed with no perf loss).
- Fix FORALL_SLOTS_IN_PENDING_FRAMES not to scan argv in callee when it has scanned operand stack in caller.
- Fix import to take the localFrame from whose fun its localNames parameter was computed -- it was using cx->fp which is wrong when FORALL_SLOTS_IN_PENDING_FRAMES iterates other than the top of stack frame.
- A few interval tests that were double-ended are single-ended now.
- Add call.js mini-test (more cases needed).
2008-08-01 08:26:32 -07:00
David Anderson
921bbecea3
Fixed infinite looping on non-threaded tracing (rumor is that we do Windows builds of Firefox)
2008-07-29 19:04:17 -05:00
Igor Bukanov
0e9a6fa3da
bug 446320 - fixing -Wformat warnings in debug printouts. r=crowder
2008-07-29 16:11:36 +02:00
Igor Bukanov
0f9d60d4c4
Backed out changeset 65836af09dac - compilation errors
2008-07-27 23:05:52 +02:00
Igor Bukanov
e04b341333
bug 446320 - fixing -Wformat warnings in debug printf code. r=crowder
2008-07-27 22:52:10 +02:00
Brendan Eich
a8c6046d8c
Avoid JSOP_POPV in global scripts from load(), etc.
2008-07-26 01:23:12 +02:00
Andreas Gal
6df91a21a0
Make the interpreter notify us when frames are popped so we see he right cx->fp value. Fix return value tracking for JSOP_STOP.
2008-07-24 10:35:10 -07:00
shaver@mozilla.org
8a97552a28
merge (mostly, doesn't build)
2008-07-22 23:58:43 -04:00
Brendan Eich
c73f865645
Fix property cache fill to use the best shape (445899, r=shaver).
2008-07-20 16:27:10 -07:00
Igor Bukanov
fc68712767
bug 441686 - eliminating JSStackFrame.(nvars|vars). r=brendan
2008-07-20 22:13:17 +02:00
Igor Bukanov
d3223d86a3
[Bug 446229] Fixing GCC conversion warnings within SpiderMonkey. r=brendan
2008-07-20 14:53:21 +02:00
shaver@mozilla.org
991ee56658
fix no-tracer build
2008-07-21 06:59:38 -04:00
Brendan Eich
c278ae56e0
Nit patrol.
2008-07-20 16:09:08 -07:00
shaver@mozilla.org
ed1d0a8953
improve tracing/recording diagnostics
2008-07-20 15:42:19 -04:00
Brendan Eich
032f06cdc0
Property-cache JSOP_NAMEINC etc. direct slot case (445893, r=shaver).
2008-07-18 22:53:22 -07:00
L. David Baron
ff3cb68441
Backed out changeset 5c009a853d70 for hitting a fatal JS_Assert during xpcshell unit tests (xpcom/unit/test_bug374754.js) on the DO_NEXT_OP(JSOP_INCNAME_LENGTH) line on !JS_THREADED_INTERP platforms (Windows).
2008-07-18 21:53:07 -07:00
Brendan Eich
3ec5069d69
Property-cache JSOP_NAMEINC etc. direct slot case (445893, r=shaver).
2008-07-18 19:16:15 -07:00
shaver@mozilla.org
beb2ed6657
Propagate TCF_COMPILE_N_GO through to inner functions, so that we can avoid nulling their parents and then cloning expensively in DEFLOCALFUN.
...
Also make Process do COMPILE_N_GO.
2008-07-18 17:15:41 -07:00
Brendan Eich
08930f369e
Use the property cache for JSOP_NAMEINC, etc.
2008-07-17 16:54:01 -07:00
Brendan Eich
04a56fbab2
Fix property cache fill to use the right shape.
2008-07-17 16:51:27 -07:00
Igor Bukanov
708422ea13
[Bug 433337] jsinterp.cpp source no longer split between 2 compilation units when compiling on Windows. r=brendan
2008-07-17 10:57:34 +02:00
Andreas Gal
b243a8350a
Better naming of the after_JSOP_CALL event (EnterFrame).
2008-07-16 23:00:59 -07:00
Andreas Gal
2442099090
Notify the recorder when a new frame was created by JSOP_CALL.
2008-07-16 22:58:06 -07:00
Andreas Gal
db7e41ed40
Add generic recorder hooks that are called before and after all opcodes as we trace. We might want to instead just move to pre_OP and post_OP.
2008-07-16 17:29:08 -07:00
Andreas Gal
43b7ba1be4
Don't use a builtin for this. For functions its interned in the native frame. For global this we read from fp->thisp. Restore jsinterp.cpp and jsinterp.h (no longer need COMPUTE_THIS exposed).
2008-07-16 14:36:50 -07:00
shaver@mozilla.org
3a4c348313
Trace JSOP_THIS and JSOP_THISPROP.
...
Rename getprop to get_prop, just because.
Extract COMPUTE_THIS to jsinterp.h as JS_COMPUTE_THIS for reuse in tracer.
2008-07-15 21:37:00 -04:00
Andreas Gal
47d2c66cc7
Remove dead code.
2008-07-15 16:25:19 -07:00
Brendan Eich
a17263a036
1. Fix !JS_THREADED_INTERP bugs in BRANCH and recording switch case generation.
...
2. Rename TraceRecorder op methods to record_JSOP_xxx to avoid shadowing JSOP_*
enumerators used inside jsopcode.h macros -- death to ::JSOP_*!
3. Added atoms TraceRecorder member for giant literal pool scripts.
4. Condition assert in TraceRecorder::test_property_cache_direct_slot to avoid
false positive when executing function code accessing a global.
2008-07-10 21:55:09 -07:00