Commit Graph

81 Commits

Author SHA1 Message Date
Andreas Gal
47c6075eb2 Fix unstable trace rejection for optimized build. 2008-07-02 15:31:40 -07:00
Andreas Gal
7906238314 Fix type stability check. 2008-07-02 15:17:53 -07:00
Andreas Gal
6f3af33edf Add type stability check for loop variables. Rename readstack to import. 2008-07-02 15:14:43 -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
8907cd354b Flag ints as type INT in the incoming context if its merely a double holding an int that was too large to fit into jsval directly. Along the side exits make sure we can properly box oversized ints (by casting them to doubles). The fetch_int/store_int paths still need fixing to ensure that values are merely passed through (prim_copy) instead of explicit casting or calling to ValueToECMAInt32 etc. 2008-07-02 02:53:24 -07:00
Andreas Gal
08bd8d4245 Generate proper overflow detection code. Requires a trivial fix in nanojit (included, pending review to be pushed upstream). 2008-07-02 00:13:05 -07:00
Andreas Gal
7eba55b32b Merge. 2008-07-01 19:44:24 -07:00
Andreas Gal
f3fba20c9c Create type maps during trace entry and in each side exit and store them in the LIR using LIR_skip. Use these type maps during trace entry and exit. 2008-07-01 19:43:10 -07:00
Brendan Eich
9d20e12316 snprintf takes sizeof buffer. 2008-07-01 15:58:47 -07:00
Andreas Gal
39891951f4 Merge. 2008-07-01 13:36:33 -07:00
shaver@mozilla.org
da72d620b9 fix frame offset calculation for args, I think also non-entry frames 2008-07-01 08:11:49 -04:00
shaver@mozilla.org
50d599cb99 label arg/var/stack/sp/state for easier trace-reading 2008-07-01 08:06:02 -04: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
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
87396e1870 Rework memory management, don't leak memory in the filter pipeline. 2008-06-30 18:08:32 -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
7511e45275 Use #ifdef DEBUG instead of VERBOSE. 2008-06-30 11:44:47 -07:00
Andreas Gal
806d0de678 Must use (&gc) new otherwise memory doesn't get cleared (found by danderson). 2008-06-30 11:39:00 -07:00
Andreas Gal
5d1d997c9d Housekeeping (add comments, removed some dead code.) 2008-06-30 09:36:10 -07:00
Andreas Gal
d8d25140f9 Mockup of trace execution. Speedup is 10x for a tight loop. Keep in mind that this is a hack and the trace code is not optimized yet. 2008-06-29 23:02:22 -07:00
Andreas Gal
b1e24b8c98 Execute trace code. Boxing back the side exit state is not handled yet. 2008-06-29 20:56:06 -07:00
Andreas Gal
e267cb120c Fix native frame addressing (reported by vlad.) 2008-06-29 17:17:39 -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
ef71223de2 Remember JSContext instead of trying to keep track of frame pointer. 2008-06-28 18:47:12 -07:00
Andreas Gal
628a1f6985 Cleanup trace abort/end code. 2008-06-28 18:19:21 -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
Andreas Gal
552425ee07 Hook up pc and sp to the tracer in order to generate proper PC/SP adjustment code. 2008-06-28 11:00:18 -07:00
Andreas Gal
1f37ae3e62 Small cleanups and licensing blurb housekeeping. 2008-06-28 09:58:15 -07: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
40f1a90a78 Move recorder initialization into TraceRecorder and encapsulate its state. 2008-06-27 18:06:50 -07:00
Andreas Gal
2c370239e5 Add a way to calculate the current size of the native frame. 2008-06-27 16:24:17 -07:00
Andreas Gal
afd5f3b1e3 Clarified argument names in guard code and explain better why we guard for overflow the way we do. 2008-06-27 07:28:10 -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
a21ca6a788 Prepare LIR_ov to be used as soon Ed adds it and add a few comments that explain how overflow is handled. 2008-06-26 23:34:50 -08: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
f357ff14f0 Move the recorder functionality into TraceRecorder to unclutter trace inlines. 2008-06-26 21:58:57 -08:00
Andreas Gal
0c98250a90 Move set/get into recorder and introduce init. 2008-06-26 21:41:10 -08:00
Andreas Gal
431b7b810a Moved loading context slots into the recorder (more to follow). 2008-06-26 21:33:33 -08:00
Andreas Gal
2dca610f28 Make sure nativeOffset uses 64-bit slots on the native stack. 2008-06-26 21:25:30 -08:00
Andreas Gal
693ee7f0cc Turn macros into inline functions and start prepatations for inlining function calls. 2008-06-26 21:19:11 -08:00
Andreas Gal
c7bab6721b Drop JS prefix from classes related to traceing. 2008-06-26 19:49:04 -08:00
Andreas Gal
ad5ceed9cd Merge. 2008-06-26 19:46:51 -08:00
Andreas Gal
a1b42735cd Backed out changeset fa82b7eda72a 2008-06-26 19:44:23 -08:00
Andreas Gal
2fddbfdceb Removed debug printfs from tracker. 2008-06-26 19:41:58 -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
407b9cdf75 Parameterize tracker. 2008-06-26 17:13:54 -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
d8e0d5edec Removed debug code. 2008-06-23 17:17:48 -07:00
Andreas Gal
5e55f5e1f4 Merge. 2008-06-23 16:52:37 -07:00
Andreas Gal
5b30ba137c Merge. 2008-06-23 16:51:28 -07:00