Commit Graph

194343 Commits

Author SHA1 Message Date
Andreas Gal
578c29bb08 Sort interned global slots in ascending order for fast comparison of two different global frames when switching between them. 2008-07-28 16:49:13 -07:00
shaver@mozilla.org
f4add49f3e not-yet-working beginnings of frame reconstruction 2008-07-28 09:05:55 -04:00
Andreas Gal
cc8e0edecd Trash the interned globals of a tree if we experience a global shape mismatch. 2008-07-27 21:44:08 -07:00
Andreas Gal
3dd8ac9ceb Trash the typemap if a change of the global shape forces us to throw away a tree. 2008-07-27 19:18:51 -07:00
Andreas Gal
38fc2aafda Abort trace if we inline too deeply. 2008-07-27 16:28:09 -07:00
Andreas Gal
f0df78b6da Merge. 2008-07-27 16:19:15 -07:00
Andreas Gal
824ec3d48f Track the type of guards and react accordingly if we bail out on them. Guards that protect against out-of-memory conditions don't try to grow the tree. Instead we just resume the interpreter. 2008-07-27 16:18:53 -07:00
Andreas Gal
255f1fe65f Don't use ABORT_TRACE outside the recorder. 2008-07-27 15:40:34 -07:00
shaver@mozilla.org
141edf8a24 do setelem in a builtin, so we don't abort trace every 8 times when growing 2008-07-27 18:34:23 -04:00
Andreas Gal
f9440fa493 If we see a f2i(UnboxDouble) chain, simplify it to UnboxInt32 which does the conversion internally. This also enables a fastpath to read 31-bit jsval integers from arrays. 2008-07-27 14:55:26 -07:00
Andreas Gal
16074fb8bb Merge. 2008-07-27 14:29:24 -07:00
Andreas Gal
03b0e4b45f Add limited outerlining. Much of this will be subsumed by nested trees. 2008-07-27 14:28:56 -07:00
shaver@mozilla.org
5cd77d7fc9 remove rval tracking, since it's no longer necessary 2008-07-27 15:47:43 -04:00
Andreas Gal
6604e884a5 Remove guardCount. No longer needed. 2008-07-27 12:05:01 -07:00
Andreas Gal
4da5c40227 Merge. 2008-07-27 02:15:42 -07:00
Andreas Gal
5234290eaf Smarter speculative demotion of numbers to integers and promotion of the trace seems to require actual doubles. If the number at entry looks like an int we make the slot an int and compile as such. If the loop-tail proves the slot to be a double, we recompile the trace. Currently such miss-speculation cannot be handled on secondary traces since we are currently unable to recompile the primary trace. Such secondary traces are blacklisted. 2008-07-27 02:15:17 -07:00
Brendan Eich
42886dee5f Pass null instead of &val is no result is wanted by EvaluateString's caller. 2008-07-27 00:17:12 +01:00
Brendan Eich
b9c3050076 Add JSSF_NO_SCRIPT_RVAL script flag, and uint8 flags field for it. 2008-07-27 00:12:01 +01:00
Brendan Eich
d6697763b7 Fix comment typo. 2008-07-27 00:11:30 +01:00
Andreas Gal
aec2839ca9 Don't try to demote slots on secondary traces (we have to recompile the primary trace as well for that, which we currently don't do.) 2008-07-25 19:30:33 -07:00
Andreas Gal
bd2d7b538a Add a test case for trees. 2008-07-25 19:10:23 -07:00
Andreas Gal
0a0cc2af67 Merge. 2008-07-25 18:43:48 -07:00
Andreas Gal
c39aa77689 Added sunspider tests to t/ for dvander. 2008-07-25 18:43:19 -07:00
Andreas Gal
66a85bf710 Fix and cleanup rp_adj and sp_adj calculation. 2008-07-25 18:28:09 -07:00
Andreas Gal
67298590aa Eliminate EntryRegs. Its not safe to keep a reference to the entry SP since we might extend the tree from a different outer stack frame. Instead just store the entryStackDepth. 2008-07-25 18:22:15 -07:00
Andreas Gal
164b2b6bb5 Print real recording point, not entryRegs and add an assert that makes sure the guard we come out of is associated with the tree we entered into. 2008-07-25 18:13:57 -07:00
Andreas Gal
f38c550eea Merge. 2008-07-25 16:54:14 -07:00
Andreas Gal
5e2eaa71ff The VP engineering broke JSOP_NAME! We have to check whether the slot is actually interned and otherwise abort. 2008-07-25 16:51:42 -07:00
Brendan Eich
3106d2409e Avoid JSOP_POPV in global scripts from load(), etc. 2008-07-26 01:23:12 +02:00
David Anderson
d5d308b03a Fixed entry typemap having wrong allocation size. 2008-07-25 13:30:52 -07:00
Andreas Gal
3a43211d7f Can't use lr->from. Seems to not get set in certain cases. Go figure. The nanojit tree code is really weird. 2008-07-25 02:29:36 -07:00
Andreas Gal
c5c8b10c27 Factor out AttemptToGrowTree. 2008-07-25 02:00:02 -07:00
Andreas Gal
624bce597b Determine ahead of time whether a side exit is a loop-terminating side exit instead of re-determining this at every side exit. 2008-07-25 01:44:40 -07:00
Andreas Gal
861f0290c2 Move trace activation code into js_ExecuteTree(). 2008-07-25 01:20:40 -07:00
Andreas Gal
f5ffb0d227 Make demotion threshold optional (0=off, 32=default). Turn off to debug the type assert bug. 2008-07-24 17:33:34 -07:00
Andreas Gal
72432f4348 Don't demote slots in overly long traces (based on counting the number of guards, current threshold=32). 2008-07-24 16:25:18 -07:00
Andreas Gal
691b899b41 Cleanup iteration over all slots to use a single macro to avoid code duplication. 2008-07-24 14:51:14 -07:00
Andreas Gal
a2fc64ea01 Add shark support to md5.js directly, no longer around the recorder. 2008-07-24 11:08:37 -07:00
Andreas Gal
8278ce69a1 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
Andreas Gal
9780602644 Backed out changeset a58e7ce6eb7f. stack(0) is wrong, if at all it should have been stack(-(1 + argc)). But anyway, its impossible to write through to the frame via set() at that point because leaveFrame() doesn't actually modify cx->fp. We need to wait for the interpreter to do so. Until then nativeFrameOffset produces incorrect values and the assert fails in set. 2008-07-24 10:09:51 -07:00
shaver@mozilla.org
3d0176f370 fix return-value handling for new stack layout 2008-07-24 00:31:37 -07:00
Andreas Gal
0a1e83ca07 Maintain a separate frame for globals using InterpState->gp.
This will allow nested loops to access the globals interned by outer loops while at the same time sharing parts of the stack of the outer loop.
2008-07-23 23:18:02 -07:00
Andreas Gal
d66db351a0 Add a fast path for nativeFrameOffset that walks entire groups at a time, not slots. Check against the result calculated by the FORALL macro in DEBUG builds (for sanity). 2008-07-23 16:39:17 -07:00
Andreas Gal
0c67428824 Merge. Make sure we clear out all slots from the tracker when leaving a frame. 2008-07-23 15:56:27 -07:00
Andreas Gal
475f3b2370 When addressing locations above the stack water level, use ->sp as base. Shaver accidently changed this to ->spbase when merging Igor's patch, so we were writing past the water mark and the stores were killed. 2008-07-23 15:48:15 -07:00
shaver@mozilla.org
ee1bc42ef1 tighten up some bounds, still not quite right 2008-07-23 11:42:52 -04:00
Andreas Gal
e0f05951e4 Lazy fill the stackTracker as we lookup the nativeFrameOffset for values. Purge all entries related to the current frame when it is popped. This code could be further simplified if Tracker was a template. 2008-07-23 02:57:56 -07:00
shaver@mozilla.org
d853312135 merge from andreas 2008-07-23 01:08:23 -04:00
shaver@mozilla.org
0ae0232183 merge (still not working, probably box/unbox dumbness) 2008-07-23 01:06:18 -04:00
shaver@mozilla.org
13beafcd1a merge (now compiling, untested) 2008-07-23 00:20:29 -04:00