Commit Graph

15810 Commits

Author SHA1 Message Date
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
228a13576a Add a vmprivate field to the guard record (queued for review upstream). 2008-07-02 14:37:01 -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
42fcff4b38 Backed out changeset 745089a5d1c5 2008-07-02 09:35:08 -07:00
shaver@mozilla.org
fca47a2d95 no need for rooting of integer values 2008-07-02 08:11:27 -04: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
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
31ef2f7b34 Don't allocate 16MB code cache at startup. Instead use an exponentially increasing growth factor. 2008-07-02 00:42:40 -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
fd5b68ba5a Fix circular dependency in makefile. 2008-07-01 23:53:17 -07:00
shaver@mozilla.org
0e590880a5 use floating point LIR for dealing with doubles 2008-07-01 23:57:29 -04: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
shaver@mozilla.org
7d64331f38 beginning of trace-capability regression minisuite; will crash you today! 2008-07-01 22:21:11 -04:00
Brendan Eich
9d20e12316 snprintf takes sizeof buffer. 2008-07-01 15:58:47 -07:00
Andreas Gal
697a294d14 Sync up with TT tip. 2008-07-01 14:46:10 -07:00
Andreas Gal
39891951f4 Merge. 2008-07-01 13:36:33 -07:00
shaver@mozilla.org
6e5e783b3d Assembler requires that guard be on a cmp, so force that 2008-07-01 10:07:20 -04: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
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
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
e6b28ce4f8 Sync with TT-tip. 2008-06-30 15:33:41 -07:00
Andreas Gal
f8a6a789d0 Cleanup memory management. Use new char[] inside our overloaded new operator that clears out memory. 2008-06-30 12:00:31 -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
dbd9bb7b09 Merge. 2008-06-30 09:36:38 -07:00
Andreas Gal
5d1d997c9d Housekeeping (add comments, removed some dead code.) 2008-06-30 09:36:10 -07:00
shaver@mozilla.org
9cf9a554b6 synthesize LIR_ne using LIR_eq instead of LIR_ugt, per edwsmith's wisdom 2008-06-30 11:18:43 -04: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
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
4cc6b3292a Merge. 2008-06-28 18:51:59 -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
shaver@mozilla.org
47f657d0a4 Fix prim_object_as_boolean (was reversed in meaning in both interp and trace
cases).
2008-06-28 21:12:55 -04:00
Andreas Gal
ba35b66f90 Make internal form of nativeFrameSize private. 2008-06-28 17:22:08 -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