Commit Graph

159 Commits

Author SHA1 Message Date
Andreas Gal
efb72df02a Re-integrate trace recording and trace activation infrastructure. Model more closely after Tamarin. 2008-07-04 00:51:30 -07:00
Andreas Gal
731614bfe9 Create a stub for each opcode in TraceRecorder and invoke them from the stubs that are pointed to by the recorder dispatch-table. 2008-07-03 23:57:57 -07:00
Andreas Gal
1d27756235 Extend dispatch table to include 256 extra cases for traceing. 2008-07-03 22:28:01 -07:00
Andreas Gal
62d0c7bbfb Switch back to mozilla-central jsinter.cpp. Lets try a different approach to attach the tracer to the interpreter. 2008-07-03 22:08:13 -07:00
Andreas Gal
ea9279b6d0 Sync with mozilla-central. 2008-07-03 21:45:09 -07:00
Andreas Gal
6eb6314e75 Support recording of ValueToECMAInt32, ValueToECMAUint32 and ValueToBoolean. 2008-07-02 21:48:42 -07:00
Andreas Gal
e39f6596d3 Fix returning from trace execution into the interpreter. 2008-07-02 18:00:13 -07:00
Andreas Gal
ce702fec67 Shortcut the wait time to activate fragments after compiling a new fragment. 2008-07-02 17:24:10 -07:00
Andreas Gal
523ba92b3d Use fragmento to track fragments and add proper trace activiation code. 2008-07-02 17:19:07 -07:00
Andreas Gal
e70272bfab Removed attempt to imply ints into doubles on the fly. This can't work. Use proper float loads where needed and add some initial code for builtin functions. 2008-07-02 14:38:12 -07:00
Andreas Gal
0d7c8f648b Indicated in a separate primitive when integers get stored as a double because they don't into a jsval. 2008-07-02 09:38:55 -07:00
Andreas Gal
8113879262 This patch eliminates ValueToECMAInt32 and instead tries to emit specialized code depending on the true type. 32-bit integers are detected and treated like integers in fetch_int via ValueToECMA32. Similarly, int store_int NewIntInRootedValue is used if the value is really an underlying int. NewIntInRootedValue is a nop on the trace. 2008-07-02 03:33:18 -07:00
Brendan Eich
d0966c0fc0 Clean up for-in ops and naming nit (443039, r=igor). 2008-07-01 18:59:18 -07:00
Andreas Gal
d3e7a57a68 Fix deallocation bug in the recorder. We will have to lift more code Tamarin's Interpreter to stabilize the recording. 2008-07-01 02:37:07 -07:00
Andreas Gal
1567618f99 Better naming (MARK_EXIT => MARK_REGS). 2008-06-30 18:41:22 -07:00
Andreas Gal
84274f1b33 Save the VM registers into markRegs at opcode entry and restore that state when ending or aborting recording. The same info is pushed into sideexit and used by guards. With this change we can eliminate the hack in MONITOR_BRANCH that had to adjust the stack pointer depending on the opcode type, and it also allows us to trace through the recently added boolean guard opcode fusing. This improves trace code quality, since only the pre-conditional check state is saved. The guard restores into that state, so the trace code doesn't have to emit the value of the conditional evaluation onto the stack, saving a handful ops. 2008-06-30 18:31:29 -07:00
Andreas Gal
19b4bcdc69 Save the side exit state at entry in to the opcode (since we want to restart ops) and enable store filter. 2008-06-30 17:12:52 -07:00
Andreas Gal
eff9ce9111 Disable fusing of conditional check and branch when recording. 2008-06-29 16:57:27 -07:00
Andreas Gal
b3060293c7 When a conditional branch instructions terminates the trace, we have to make sure its restartable, so put the conditional value it was deciding on back onto the stack by incrementing sp before jumping back to the outer interpreter. 2008-06-29 15:21:50 -07:00
Andreas Gal
253b2572b2 Initialize jump table when side-entering the interpreter. Keep track of cx and sp directly in the recorder instead of going through the tracker. 2008-06-29 13:53:40 -07:00
Andreas Gal
28d2ed62d9 Guard inside the clause, not seperately. 2008-06-29 12:21:16 -07:00
shaver@mozilla.org
d93ba06080 guard on inlined branch in TRY_BRANCH_AFTER_COND 2008-06-29 10:36:31 -04:00
shaver@mozilla.org
d571eaac32 Merge with mozilla-central as of c5dc9d84d476, and restore obj-to-boolean fixes
from 2b107c27dedf (accidentally backed out during an earlier merge).  22 test
suite failures for -L lc2 lc3 spidermonkey-n slow-n, probably needs some guard
work in TRY_BRANCH_AFTER_COND.
2008-06-29 10:01:59 -04:00
Andreas Gal
628a1f6985 Cleanup trace abort/end code. 2008-06-28 18:19:21 -07:00
Andreas Gal
91c85e9cb4 Merge. 2008-06-28 17:14:42 -07:00
Andreas Gal
6df975a5b5 Rewritten frame management. Use cx->fp->regs chain instead of direct passing of those structures. 2008-06-28 17:14:06 -07:00
shaver@mozilla.org
f81f153710 fix typo in DoIncDec leading to script termination 2008-06-28 19:28:56 -04:00
shaver@mozilla.org
fac133d1e5 Implement icmp_ne (in terms of LIR_ugt(i, 0)!) and make JSOP_NE traceable. 2008-06-28 17:47:33 -04:00
shaver@mozilla.org
8cb49dede9 avoid trace-troubling temporaries via cast gymnastics 2008-06-28 14:48:02 -04:00
Andreas Gal
b6773c0340 Move obj_is_xml into interp since its not a primitive. 2008-06-28 10:12:24 -07:00
shaver@mozilla.org
cc9079bc60 More work on tracing EQUALITY_OP. Still need to synthesize LIR_ne before it
traces correctly.  (This loses the length-test equality-check short-circuit
for strings, until such time as we have a builtin for EqualStrings as well:
regresses js1_5/String/regress-322772.)
2008-06-28 12:46:21 -04:00
shaver@mozilla.org
293db3763e abort tracing if we see an XML object in an equality op 2008-06-28 00:14:21 -04:00
shaver@mozilla.org
4fc71515e0 Add guards for XML objects, and some tracer bits to accommodate them. 2008-06-27 23:58:06 -04:00
Andreas Gal
e5d4f398ef Merge. 2008-06-27 18:09:33 -07:00
Andreas Gal
40f1a90a78 Move recorder initialization into TraceRecorder and encapsulate its state. 2008-06-27 18:06:50 -07:00
shaver@mozilla.org
06500a1a50 merge 2008-06-27 12:01:28 -04:00
shaver@mozilla.org
af19dd5627 rename ENABLE_TRACER to TRACING_ENABLED and explicitly parameterize on cx 2008-06-27 11:41:59 -04:00
Andreas Gal
5d9de143af More concise conversion from object to boolean. 2008-06-27 07:48:18 -07:00
Andreas Gal
e59076860a Instead of guarding on null -> boolean conversion just emit a null compare and use the boolean result. 2008-06-27 06:53:10 -07:00
Andreas Gal
3492763c96 Throw out a bunch of primitives (guards) that we are no longer interested in. 2008-06-27 06:18:12 -07:00
Andreas Gal
49fe7a95eb More cleanup and code move into TraceRecorder and prepare for LIR_ov. 2008-06-26 23:22:16 -08:00
Andreas Gal
5b4f0aaeaa Allocate recorder dynamically to avoid having a vtable in the struct holding the reference. Emit writebacks for every update to the tracker, not just stack writes. 2008-06-26 19:37:28 -08:00
Andreas Gal
4678be95aa Fix a bug in tracing can_do_fast_inc_dec (wasn't tracking a copy and traced incorrect code). Merge with TT tip. 2008-06-24 15:57:33 -07:00
Andreas Gal
6d192a7054 Added end-of-trace detection and make sure trace loops back to the loop header. 2008-06-22 09:30:04 -07:00
Andreas Gal
3197b76462 Mork work on attaching nanojit to our primitives. Traces have now their own box type (Box), which is an opaque 64-bit value. Its never supposed to appear in the trace since we will optimize away all boxing operations. 2008-06-21 22:28:41 -07:00
Andreas Gal
78da0668af Start attaching our tracer to nanojit. This is incomplete and meant for review by David only. 2008-06-21 14:55:32 -07:00
Andreas Gal
33ecda6e85 Added danderson's test cases for nanojit. Execute with nanojit() from JS shell. 2008-06-19 18:28:15 -07:00
Andreas Gal
e04746d2c0 Make fast inc/dec traceable. 2008-06-18 17:40:32 -07:00
Andreas Gal
1a0333027b Added new primitive guard_can_do_fast_inc_dec and report reason for trace aborts. 2008-06-18 16:23:24 -07:00
Igor Bukanov
d24b2f9846 [Bug 432881] SM: JSVAL_VOID as a pseudo-boolean. r=brendan 2008-06-25 11:43:02 +02:00