Andreas Gal
|
5ae4ef819e
|
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
|
b989e7b3e7
|
fix return-value handling for new stack layout
|
2008-07-24 00:31:37 -07:00 |
|
Andreas Gal
|
41e0593392
|
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
|
117bc4d9f9
|
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
|
4cc2061091
|
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
|
df280d08d7
|
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
|
c29aa4c3d2
|
tighten up some bounds, still not quite right
|
2008-07-23 11:42:52 -04:00 |
|
Andreas Gal
|
5dd9876515
|
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
|
f0a625f5bc
|
merge from andreas
|
2008-07-23 01:08:23 -04:00 |
|
shaver@mozilla.org
|
6f5e58e443
|
merge (still not working, probably box/unbox dumbness)
|
2008-07-23 01:06:18 -04:00 |
|
shaver@mozilla.org
|
a93fbcc99d
|
merge (now compiling, untested)
|
2008-07-23 00:20:29 -04:00 |
|
Andreas Gal
|
c9cac5757f
|
Handle leaving of frames in one central place.
|
2008-07-22 20:16:12 -07:00 |
|
Andreas Gal
|
c6828d3504
|
Reduce HOTLOOP threshold to 2.
|
2008-07-22 18:31:44 -07:00 |
|
Andreas Gal
|
06365155c2
|
Avoid calculating native frame offset by tracking the last load/store for every slot and extracting the offset from there.
|
2008-07-22 17:54:04 -07:00 |
|
Andreas Gal
|
48b195e651
|
Avoid nativeFrameOffset calls in import().
|
2008-07-22 17:24:29 -07:00 |
|
Andreas Gal
|
14b0a0827d
|
Merge.
|
2008-07-21 19:38:03 -07:00 |
|
Andreas Gal
|
9b799905ed
|
Add a pattern to recognize safe_add and emit a simple add for it.
|
2008-07-21 19:37:43 -07:00 |
|
shaver@mozilla.org
|
e0b2e86c09
|
use nargs rather than argc, since bytecode only refers to [o-nargs) args
|
2008-07-21 22:31:08 -04:00 |
|
Andreas Gal
|
2d2bcf0fc8
|
Reverse the insanity that used to be tamarin's arg passing in ins2. Now it makes sense.
|
2008-07-21 17:59:42 -07:00 |
|
Andreas Gal
|
3b2a943332
|
Avoid overflow checks on integer adds when its safe to do so.
|
2008-07-21 17:50:17 -07:00 |
|
Andreas Gal
|
410c0b9a98
|
Eliminate entryFrame pointer (not safe to carry that around.)
|
2008-07-21 16:20:53 -07:00 |
|
Andreas Gal
|
b30f4c9be6
|
Use callDepth instead of entryFrame in the FORALL macro.
|
2008-07-21 16:19:38 -07:00 |
|
Andreas Gal
|
f1ef7f0175
|
Eliminate exit filter, write the type map directly in snapshot.
|
2008-07-21 15:09:19 -07:00 |
|
Andreas Gal
|
9495f9cb50
|
Sink stack-targeting type conversion in the set() path instead of in the ExitFilter.
|
2008-07-21 15:01:47 -07:00 |
|
Andreas Gal
|
a7cc4892f9
|
Use callDepth, not entryFrame in nativeFrameSlots().
|
2008-07-21 14:55:41 -07:00 |
|
Andreas Gal
|
bce8e13528
|
Remove excess parameters of verifyTypeStability.
|
2008-07-21 13:21:00 -07:00 |
|
Andreas Gal
|
a0cd046167
|
Track call depth in the trace recorder. This lays the groundwork to get rid of entryFrame.
|
2008-07-21 13:18:08 -07:00 |
|
shaver@mozilla.org
|
124244af4b
|
beginning of entryFrame removal
|
2008-07-21 15:57:02 -04:00 |
|
Andreas Gal
|
5067fc2638
|
Merge.
|
2008-07-21 12:44:03 -07:00 |
|
Andreas Gal
|
3f6f0d1ea5
|
Use ti instead of fi for TreeInfo pointers.
|
2008-07-21 12:43:51 -07:00 |
|
Andreas Gal
|
e9b2918575
|
Rename VMFragmentInfo to TreeInfo.
|
2008-07-21 12:41:43 -07:00 |
|
Andreas Gal
|
2f5e227963
|
Merge.
|
2008-07-20 17:36:47 -07:00 |
|
Andreas Gal
|
221f99adce
|
Style cleanup and eliminate redundant f2u(i2f|u2f) chains.
|
2008-07-20 17:36:11 -07:00 |
|
Brendan Eich
|
4a9828f126
|
Cite bug 445262 with a FIXME instead of omfgHack_ prefix ;-).
|
2008-07-20 16:21:45 -07:00 |
|
Brendan Eich
|
464b70d055
|
Tighten up js_IsLoopEdge and include JSOP_IFNEX.
|
2008-07-20 16:11:52 -07:00 |
|
Brendan Eich
|
c278ae56e0
|
Nit patrol.
|
2008-07-20 16:09:08 -07:00 |
|
Andreas Gal
|
e82ab0c21f
|
Simplify updating of the side exit target.
|
2008-07-20 14:56:04 -07:00 |
|
shaver@mozilla.org
|
368d1588bf
|
simpler loop exit check (backwards is a loop exit, forwards is not)
|
2008-07-20 17:54:16 -04:00 |
|
shaver@mozilla.org
|
7546f723f5
|
force Math to be interned, and defend against non-interned globals until upvar saves us all
|
2008-07-20 17:23:39 -04:00 |
|
Andreas Gal
|
0b74e54db8
|
Use exponential backoff when trying to extend trees.
|
2008-07-20 14:28:56 -07:00 |
|
Andreas Gal
|
a0e38ffd84
|
Merge.
|
2008-07-20 13:29:20 -07:00 |
|
Andreas Gal
|
d4d2117f7c
|
Don't emit boxed values, use the unboxed representation for constants.
|
2008-07-20 13:28:53 -07:00 |
|
Andreas Gal
|
71eb1da52f
|
Removed meaningless assert.
|
2008-07-20 13:25:36 -07:00 |
|
shaver@mozilla.org
|
cadc5891e5
|
don't pretend we can trace INCELEM and friends (fixes trace-test.js, ahem)
|
2008-07-20 16:21:43 -04:00 |
|
shaver@mozilla.org
|
ed1d0a8953
|
improve tracing/recording diagnostics
|
2008-07-20 15:42:19 -04:00 |
|
shaver@mozilla.org
|
d03348f92d
|
discard trace on global shape mismatch
|
2008-07-19 22:32:45 -07:00 |
|
Brendan Eich
|
5b009b1b49
|
Breathe, vertical-spacing, breathe!
|
2008-07-19 15:42:31 -07:00 |
|
shaver@mozilla.org
|
ef2e8305dc
|
Avoid tracking object properties, make incElem work.
|
2008-07-19 10:24:10 -07:00 |
|
shaver@mozilla.org
|
f34cd71b78
|
Implement DEFLOCALFUN for the fully-lightweight case.
Reset atoms base register on function entry and exit.
|
2008-07-19 06:29:56 -07:00 |
|
Brendan Eich
|
293e6bd4c4
|
Improve js_IsLoopExit (unannotated JSOP_GOTO is still ambiguous).
|
2008-07-19 10:52:24 -07:00 |
|
Brendan Eich
|
a26be1bd4b
|
Fix incProp to box and store (incElem still todo).
|
2008-07-19 10:24:28 -07:00 |
|
Andreas Gal
|
f2ad868fc0
|
Merge. hg sucks.
|
2008-07-19 00:40:54 -07:00 |
|
Andreas Gal
|
457c855d15
|
Don't demote fmul since it overflows in math-partial. We might try to demote it and then promote back if this happens (depends how aggressively we want so speculate). Speedup 6.6 for math-partial (since its sin/cos/pow heavy.)
|
2008-07-19 00:27:45 -07:00 |
|
Brendan Eich
|
d1b171e5e2
|
First stab at incops, plus unbox_jsval tag-masking guard fixes, plus misc. cleanup.
|
2008-07-19 00:15:22 -07:00 |
|
Andreas Gal
|
5495ccf586
|
Abort trace is STOP is leaving the recording context.
|
2008-07-18 19:15:49 -07:00 |
|
Andreas Gal
|
47ae25da20
|
Make entryFrame/entryRegs relative to the tree entry since we only adjust ip/sp/rp when exiting from the tree, not in between fragments.
|
2008-07-18 16:21:22 -07:00 |
|
Andreas Gal
|
a8b127d5af
|
Adjust ip/sp/rp in the interpreter recovery code, not on the trace.
|
2008-07-18 15:35:59 -07:00 |
|
Andreas Gal
|
1c9c67b6a1
|
Write all the debug output to stdout (we can't easily make everything go to stderr, so this way at least it all goes into the same place.)
|
2008-07-18 14:13:31 -07:00 |
|
Andreas Gal
|
89b50ed124
|
Rework some of David's changes. Make sure we don't modify the tree until we are ready to attach the new fragment. Share lirbufs between tree branches.
|
2008-07-18 14:11:01 -07:00 |
|
David Anderson
|
4770d4b3e0
|
Got side exits seemingly working, added if.js to trace-test.js
|
2008-07-18 10:33:17 -07:00 |
|
shaver@mozilla.org
|
61d58bad87
|
Handle more operand types in ifop().
|
2008-07-18 08:01:51 -07:00 |
|
shaver@mozilla.org
|
983e9cdb83
|
Better diagnostic info for trace abort.
|
2008-07-18 07:59:37 -07:00 |
|
shaver@mozilla.org
|
3eaeae50b5
|
lookup/find, but do not fill prop cache from recorder
|
2008-07-18 00:46:18 -07:00 |
|
shaver@mozilla.org
|
7078a99d21
|
When PROPERTY_CACHE_TEST misses, fall back to doing our own lookup via js_GetPropertyHelper.
|
2008-07-17 23:57:56 -07:00 |
|
Brendan Eich
|
84c0998916
|
Warning elimination.
|
2008-07-17 18:30:54 -07:00 |
|
Andreas Gal
|
f94180fbe2
|
Make sure we compile again if we reject a trace by decrementing hits.
|
2008-07-17 18:15:55 -07:00 |
|
Andreas Gal
|
f58160134a
|
Fix hot loop triggering.
|
2008-07-17 18:10:47 -07:00 |
|
shaver@mozilla.org
|
859ec6fbb6
|
can't easily find real names for globals, so just number them
|
2008-07-17 17:33:18 -07:00 |
|
Andreas Gal
|
dded69f2a3
|
Merge.
|
2008-07-17 17:13:41 -07:00 |
|
Andreas Gal
|
19ed222624
|
Disable trees for the time being.
|
2008-07-17 17:12:28 -07:00 |
|
Andreas Gal
|
43fbfbfe1e
|
Add if.js example for trees.
|
2008-07-17 16:38:09 -07:00 |
|
Andreas Gal
|
dbf2dc54bd
|
Add the beginning of support for trees.
|
2008-07-17 16:20:13 -07:00 |
|
shaver@mozilla.org
|
3db81baa04
|
Label globals and locals with their source-names in trace.
Show line number on abort.
|
2008-07-17 15:09:48 -07:00 |
|
Andreas Gal
|
f91ca871ac
|
Add js_IsLoopExit that indicates whether a side exit is likely to continue the loop or not.
|
2008-07-17 14:58:09 -07:00 |
|
Andreas Gal
|
3df09fb85c
|
Cleanup recorder activation, use a single hot loop threshold (10).
|
2008-07-17 13:42:58 -07:00 |
|
Andreas Gal
|
954c5830e1
|
Added statistics and a js_DestroyJIT hook. Also use debug_only and not verbose_only as #ifdef DEBUG shortcut.
|
2008-07-17 10:22:40 -07:00 |
|
Andreas Gal
|
bfb3e457f1
|
Fix signature of insCall in the FuncFilter and remove f2i(i2f) elimination since we shouldn't really ever hit it.
|
2008-07-17 03:24:17 -07:00 |
|
Andreas Gal
|
e12047397c
|
Move up addName to make sure it gets inline in non-debug mode.
|
2008-07-17 02:02:48 -07:00 |
|
shaver
|
87eacb1139
|
Add setprop and tests for setprop and cleanup labling code for debug mode (m=gal).
|
2008-07-17 02:00:23 -07:00 |
|
Andreas Gal
|
9d6fa41738
|
Cleanup trace abort handling.
|
2008-07-17 01:29:41 -07:00 |
|
Andreas Gal
|
3fa6978605
|
Merge.
|
2008-07-17 00:48:30 -07:00 |
|
Andreas Gal
|
3cd2b84ec4
|
Fixed ASSERT JS_DOUBLE != JS_VOID issue. If the root fragment fails to compile, trash the type-map and re-capture it when we try to re-compile.
|
2008-07-17 00:48:10 -07:00 |
|
shaver@mozilla.org
|
acde4fceb0
|
JSOP_LENGTH
|
2008-07-16 23:53:14 -07:00 |
|
Andreas Gal
|
6cfd498b7c
|
Increase code cache size.
|
2008-07-16 23:47:57 -07:00 |
|
Andreas Gal
|
ad6b349616
|
Merge.
|
2008-07-16 23:39:12 -07:00 |
|
Andreas Gal
|
e2a0438e22
|
Fix f2i(i2f) filter (broken since the last TT sync, argument order changed from right to left to left to right).
|
2008-07-16 23:38:39 -07:00 |
|
Brendan Eich
|
13d6469f9b
|
Prefer getarg;length, etc. to getargprop.
|
2008-07-16 23:33:04 -07:00 |
|
Andreas Gal
|
83ac88d4c7
|
Don't clear out arguments, clear out variables at method entry.
|
2008-07-16 23:04:50 -07: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
|
2379d6dcde
|
Initialize arguments to void and write JSVAL_HOLE's value onto the native stack, not its boxed representation.
|
2008-07-16 22:25:56 -07:00 |
|
Andreas Gal
|
df5005a322
|
Hand in typemap the recorder is supposed to use (preparation for side exit compilation and trees).
|
2008-07-16 21:49:42 -07:00 |
|
Andreas Gal
|
def4afc614
|
Move the allocation of the LIR buffer and the FragmentInfo data structure creation (which includes typemap and interned global calculation) into loopedge.
|
2008-07-16 21:41:03 -07:00 |
|
Andreas Gal
|
af95344998
|
Make JSOP_CALLNAME tell us why it doesn't like to trace.
|
2008-07-16 19:00:14 -07:00 |
|
Andreas Gal
|
74f767e62b
|
Fix generation of VOID immediates and initialize rval after the new frame was setup by CALL.
|
2008-07-16 17:44:44 -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
|
c041bad939
|
Don't intern global function objects onto the native frame since we rarely ever need them anyway (we call them via the property cache).
|
2008-07-16 15:48:51 -07:00 |
|
Andreas Gal
|
7f119dc35a
|
Enable CALLNAME and add test case for it so we can call global functions.
|
2008-07-16 15:40:35 -07:00 |
|
Andreas Gal
|
c7714a3ad5
|
Make sure this/argv[-1] is set fpr CALLVAR and CALLARG.
|
2008-07-16 15:13:27 -07:00 |
|
Andreas Gal
|
04ea9e0e09
|
Enable inlining for calls. Deep bailouts (from within side exits) are generated but are not allowed to be ever taken (for now).
|
2008-07-16 15:01:55 -07:00 |
|