Commit Graph

315 Commits

Author SHA1 Message Date
Andreas Gal
fee752ae24 Cleaning code cache flush handling (510136, r=jorendorff). 2009-08-13 08:35:35 -07:00
Graydon Hoare
b8154cc364 Bug 504462 - Merge tamarin's CodeAlloc into tracemonkey, r=gal. 2009-07-15 16:50:01 -07:00
Andreas Gal
9c938dd547 Backout bug 506125 due to talos failures. 2009-08-04 18:42:53 -07:00
Andreas Gal
06ad033ff2 Memory-pressure based GC scheduler (506125, r=igor). 2009-08-04 14:58:21 -07:00
Jason Orendorff
2df7b71611 Bug 507665 - Avoid imacros for JSOP_GETELEM and JSOP_CALLELEM. r=gal. 2009-08-03 11:38:28 -05:00
Graydon Hoare
2e92fcbbe3 Backed out changeset d0be9284ea67 2009-07-30 14:28:26 -07:00
Graydon Hoare
caf3859643 Bug 504462 - Merge tamarin's CodeAlloc into tracemonkey, r=gal. 2009-07-15 16:50:01 -07:00
Andreas Gal
e7f2714ea1 When finalizing, deallocate memory in a separate thread (505612, r=bent,brendan,waldo). 2009-07-27 21:10:12 -07:00
Jason Orendorff
a22e8a6032 Bug 505932 - Shape regeneration does not touch most empty scopes. r=brendan. 2009-07-27 16:29:02 -05:00
Igor Bukanov
bfbac69d3f bug 506243 - eliminate GC thread-local lists pools. r=brendan 2009-07-26 18:24:39 +02:00
Brendan Eich
b4a10de944 Bug 488731 - Avoid shape regeneration and property cache purge during the GC (r=mrbkap). 2009-07-24 06:55:28 -07:00
Robert Sayre
6968ea2205 Merge backout. 2009-07-24 00:02:02 -04:00
Robert Sayre
9e0ade7287 Backed out changeset b3d459d23452 2009-07-24 00:01:37 -04:00
Robert Sayre
3722b48ae2 Merge backout. 2009-07-23 22:08:05 -04:00
Robert Sayre
d71c6818a0 Backed out changeset 047b9102dddb 2009-07-23 22:06:31 -04:00
Brendan Eich
cf4a2c7921 Avoid shape regeneration and property cache purging from the GC unless the shape generator overflows (488731, r=jorendorff). 2009-07-23 17:59:49 -07:00
Andreas Gal
eb711234db Use a background thread to free() memory while sweeping (505612, r=brendan,bent). 2009-07-23 15:12:34 -07:00
Andreas Gal
241532b53a Inline malloc accounting functions (504219, r=jwalden). 2009-07-16 18:36:19 -07:00
Andreas Gal
88cf1d87c6 Avoid integer math for GC trigger factor calculation in allocation path, take 2 (503463, r=dmandelin). 2009-07-14 17:03:20 -07:00
Peter Van der Beken
cf914cb140 Backed out changeset 2073d5aae8b6 (Avoid integer math for GC trigger factor calculation in allocation path (bug 503463)). 2009-07-14 11:49:15 +02:00
Andreas Gal
0c6942b658 Avoid integer math for GC trigger factor calculation in allocation path (503463, r=dmandelin). 2009-07-13 13:24:25 -07:00
Brendan Eich
f60779aef5 Bug 503343 - Change JSScope macros to methods. r=jorendorff 2009-07-09 15:27:21 -05:00
Robert Sayre
878a89a073 Merge mozilla-central to tracemonkey. 2009-07-06 12:20:54 -04:00
Luke Wagner
145fbf91c2 Bug 200505 - Optimization of jsref array_join_sub() function. r=waldo 2009-06-30 20:19:42 -04:00
Robert Sayre
3f97d5e6f5 Backed out changeset b2256abf53c0 2009-06-30 12:14:09 -07:00
Luke Wagner
a6311cf8b5 Bug 200505 - Optimization of jsref array_join_sub() function. r=waldo 2009-06-30 11:29:43 -07:00
Jason Orendorff
52fe5a97ba Bug 497618 - Change JSString macros to methods. r=Waldo. 2009-06-10 20:29:44 -05:00
Andreas Gal
ec254bec6f Support tracing instanceof operator (498351, r=jorendorff). 2009-06-15 16:44:30 +01:00
Johnny Stenback
a511964116 Fixing bug 442399. Remove LiveConnect from the tree. r=joshmoz@gmail.com, bclary@bclary.com, sr=brendan@mozilla.org 2009-06-30 15:55:16 -07:00
Brendan Eich
0416e1e679 Bug 492355 - Suspected Txul regression from JS engine changes (r=igor). 2009-05-13 17:11:23 -07:00
Graydon Hoare
2a50d488f5 Bug 489615 - TM: Store recording attempts in a long-lived hashtable rather than fragments, r=brendan. 2009-05-07 15:49:44 -07:00
jorendorff
93c6d226d3 Record all calls to native functions (487134, r=gal, brendan). 2009-05-05 14:26:06 -07:00
Igor Bukanov
35116060a2 bug 489501 - consolidating
js_SetProto must mutate the prototype chain. r=brendan
2009-05-01 13:48:27 -07:00
Graydon Hoare
bb4177dccd Bug 490044 - TM: Add deep-bailing write barrier to global shape change code, r=brendan. 2009-04-24 17:47:32 -07:00
Andreas Gal
a51f22dbdf Need an API exposed to control code cache size (474497, r=bent,brendan, sr=mrbkap). 2009-04-22 16:52:59 -07:00
Jason Orendorff
4ea515fa8b Bug 488874 - Change tm.onTrace to tm.tracecx. r=brendan.
--HG--
extra : rebase_source : bf683bee5e518cf5bfea8113c17685b8301d72c9
2009-04-22 15:07:55 -05:00
jorendorff
e1b8077e65 Leaving outermost request should js_LeaveTrace (480301, r=brendan). 2009-04-20 18:22:00 -07:00
Igor Bukanov
4ad2e764fa bug 488414 - js_GenerateShape just schedules, not run, the GC. r=brendan,gal 2009-04-20 12:10:29 +02:00
Igor Bukanov
fd49b19773 Backed out changeset f4662701526b (bug 488414) to fix !JS_THREADSAFE compilation errors 2009-04-20 11:59:36 +02:00
Igor Bukanov
56547f8087 bug 488414 - js_GenerateShape just schedules, not run, the GC. r=brendan,gal 2009-04-20 10:17:28 +02:00
Igor Bukanov
907592f765 bug 477627 - avoiding deadlocks in ClaimTitle. r=brendan 2009-04-16 00:01:24 +02:00
Jason Orendorff
4dd9ad09ef Bug 487845 - TM: After deep-bailing, we can lirbuf->rewind() and then return to a dead code page. r=gal.
--HG--
extra : rebase_source : b7de71b526d45c7caed1982fba80c65763a0a9c6
2009-04-15 09:47:02 -05:00
Andreas Gal
c11974bb60 Backed out changeset 4c157cfe2289 (bug 487845). 2009-04-14 21:28:40 -07:00
Jason Orendorff
0616f91d10 Bug 487845 - TM: After deep-bailing, we can lirbuf->rewind() and then return to a dead code page. r=gal. 2009-04-14 08:45:37 -05:00
Blake Kaplan
1c5e6afeac Bug 487684 - Store the last trace PC to pass into the decompiler. r=igor 2009-04-10 14:06:28 -07:00
Jason Orendorff
b5d4ba583e Bug 487676 - Nesting deep-aborting trace calls don't work. r=gal.
--HG--
extra : rebase_source : 436164485bd5e981e5ae8997eed2c371f3ecd77b
2009-04-09 18:07:00 -05:00
Brendan Eich
3f4a58e4f0 Bug 487271 - Crash [@ js_Invoke ], and missing google-maps background, at padmapper.com (r=mrbkap). 2009-04-08 13:14:02 -07:00
Jason Orendorff
a613c0d579 Backout changeset 143e997c858e (bug 484693) because it caused crashes on Mac tinderboxen. 2009-04-07 17:07:11 -05:00
Graydon Hoare
163d74068e Bug 484693 - Remove uses of alloca, r=gal. 2009-04-07 13:47:36 -07:00
Brendan Eich
962b187fe5 upvar2, aka the big one take 2 (452598, r=mrbkap). 2009-04-05 21:17:22 -07:00
Andreas Gal
3c19b8b7fc Merge. 2009-04-04 10:15:04 -07:00
Andreas Gal
706120c0fb Backed out changeset 972c44aa9d1f (bug 452598). 2009-04-04 10:14:52 -07:00
Brendan Eich
7485baa00c Merge. 2009-04-04 10:07:44 +01:00
Brendan Eich
5f4d9ff474 upvar2, aka the big one (452598, r=mrbkap). 2009-04-04 10:05:49 +01:00
Andreas Gal
8787072e96 Backed out changeset b512be855093 (bug 484693). See bug for details. 2009-04-04 01:06:04 -07:00
Graydon Hoare
a2d4d5a779 Bug 484693 - Remove uses of alloca, r=gal. 2009-04-03 16:30:46 -07:00
Jim Blandy
02252a653d Bug 482743: Fix up bytecode execution tracing. Allow tracing to file. r=igor
js_TraceOpcode: Remember the last bytecode we traced explicitly,
instead of subtracting 'len' from regs.pc, which isn't reliable.
Decline to trace values in script prologues (between 'code' and
'main').  Decline to walk off the bottom of the stack when the 'last
bytecode' is misleading.  Flush the stream after each bytecode.

Use the TRACE_OPCODE macro in both threaded and non-threaded
interpreters.  Take care to make threaded and non-threaded
interpreters produce the same traces.

In the shell's 'tracing' function, use JS_ValueToBoolean to recognize
all sorts of booleans, and treat a string as the name of a file to
write the trace to.
2009-04-01 08:50:57 -07:00
Andreas Gal
78ced670dd specialize code for a specific global object, not just a global object shape (480905, r=graydon). 2009-03-31 11:49:44 -07:00
Igor Bukanov
a8094a7903 bug 437325 - JSThread is no longer shared between JSRuntime instances. r=brendan 2009-03-24 13:07:35 +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
4017bf1be3 str_match should use js_GetCurrentBytecodePC (484308, r=mrbkap). 2009-03-20 17:07:30 -07:00
Jim Blandy
debdb32ef3 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-16 09:55:06 -07:00
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
4ccdead266 bug 480700 - no more static asserts in headers. r=brendan 2009-03-05 12:12:50 +01:00
Andreas Gal
8c3223aab5 Browser spuriously sets runtime->anyArrayPrototypeHasElement and makes perf bad (481251, r=mrbkap). 2009-03-03 18:04:15 -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
Benjamin Smedberg ext:(%2C%20Jason%20Orendorff%20%3Cjorendorff%40mozilla.com%3E)
d40f9751c8 Bug 476643 - JS_REQUIRES_STACK errors in nsXPCWrappedJSClass::CallMethod. Mozilla code uses some JS-internal APIs and needs to bail off trace before doing so. This shouldn't affect performance now becuase XPConnect methods are not traceable yet. r=mrbkap, sr=mrbkap. 2009-02-18 12:47:16 -06:00
Jason Orendorff
c9b0918474 Bug 477142 - _FAIL builtins need to be GC-safe. r=brendan.
--HG--
extra : rebase_source : 10515f7d1f5a85c1965c812f55d91d3d0f49a28e
2009-02-11 13:33:17 -06: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
Jeff Walden
31fdce5e81 Bug 467747 - JS version/option unsyncing results in JS modules not being loaded with the very latest JS version, resulting in syntax errors when loading modules that use new JS syntax. r=brendan 2009-02-07 23:23:01 -08:00
Igor Bukanov
61cd533870 bug 476934 - JS_(Set|Clear)ContextThread() must wait bfor the GC. r=brendan 2009-02-07 05:05:32 +01:00
Jason Orendorff
1a135641c5 Bug 462042 - TM: Allow GC with traced machine code on stack. r=brendan. 2009-02-03 18:25:18 -06:00
Jason Orendorff
e4c1fb1cfd Bug 462027 - Bail off trace when reentering interpreter. r=gal. 2009-02-03 18:25:12 -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
df4d8addef Bug 462042 - TM: Allow GC with traced machine code on stack. r=brendan. 2009-02-02 20:49:53 -06:00
Jason Orendorff
f6ffd1d380 [mq]: bug-462027-v9 2009-02-02 20:42:46 -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
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
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
Graydon Hoare
5219181495 Bug 475474 - Maintain globalSlots per global, not just one per JIT instance, r=danderson. 2009-01-29 15:59:52 -08:00
Jason Orendorff
2ba2f5d3ed Bug 475761 - TM: js_Any_GetProp and friends can reenter. r=brendan. Note that this patch alone does not fix the bug. The rest of the fix comes in bug 462027. 2009-01-29 00:13:03 -06: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
3aa2396acf Merge. 2009-01-27 16:42:29 -08:00
Andreas Gal
3361accf0e Merge. 2009-01-27 16:42:10 -08:00