Commit Graph

11646 Commits

Author SHA1 Message Date
Brendan Eich
d5c6dcd638 - Add builtins to support for-in loops, both iterating and getting/setter properties by name using o[i] instead of o.p where i is 'p'.
- Record JSOP_ITER and JSOP_ENDITER, which must be handled since tracing could start in between them (and always will, until we nest or unless we outerline).
- Add a null state guard in JSOP_FORVAR's recorder method.
- Pick include order, indentation, and trailing space nits.
2008-08-06 13:36:29 -07:00
Andreas Gal
d4bbd9734b Properly deal with trace entry with non-empty stack. 2008-08-06 12:38:17 -07:00
Andreas Gal
fb421e671a Split side exit handling from js_ExecuteTree. 2008-08-06 06:34:16 -07:00
Brendan Eich
ac3b0f4557 Comment or/and test framework not being traceable. 2008-08-05 11:36:25 -07:00
Brendan Eich
ccb35b588d - Use JSStackFrame* fp over, don't declare another JSStackFrame* f, in the FORALL macros and clones (f is canonical variable name for nanojit::Fragment*, fp for JSStackFrame*).
- Nit-pick include order (alphabetical within each group).
- Trailing space and indentation no-knock raid.
2008-08-03 22:55:28 -07:00
Brendan Eich
5b49427b01 Strength-reduced unsigned modulus in the fragment quick cache, don't use signed % which requires a branch and less-than-zero test. 2008-08-03 22:35:15 -07:00
Brendan Eich
47dd9ac645 Misc. cleanup. 2008-08-03 01:34:07 -07:00
Brendan Eich
68106102f8 Use INS_CONST to addName a few lir->insImm immediates. 2008-08-02 20:01:36 -07:00
Brendan Eich
dcb09f96df Fix TraceRecorder::ifop backward logic bug in the OBJECT case, and implement the STRING case. Add tests for truthy and falsy strings. 2008-08-02 16:51:22 -07:00
Brendan Eich
b344a35dd0 Fix return NULL in bool to return false. 2008-08-02 16:05:29 -07:00
Brendan Eich
b57540a87a Avoid JSUint64 (NSPR style), use uint64 (SpiderMonkey style). 2008-08-02 16:05:16 -07:00
Brendan Eich
12a15d6872 Restore lost or/and tests (hg strikes again, grrrr!) 2008-08-02 15:56:28 -07:00
Andreas Gal
f92e18c58e Merge. 2008-08-02 03:24:03 -07:00
Andreas Gal
8d0e486947 Use quick cache to bypass fragmento is possible. 2008-08-01 22:56:52 -07:00
Andreas Gal
be665ae142 Factor out most of the remaining code in js_LoopEdge into js_RecordTree and move the code to attach new branches into js_ExecuteTree. 2008-08-01 22:47:15 -07:00
Andreas Gal
471c0b9fbb Factor out js_ContinueRecording from js_LoopEdge. 2008-08-01 22:39:52 -07:00
Andreas Gal
1157b3a775 Add a fragment cache data structure. This will be used to accelerate the fragment lookup during branching. 2008-08-01 22:33:05 -07:00
Andreas Gal
d89d579585 Split up FORALL_SLOTS_IN_PENDING_FRAMES macro in a macro that processes a frame, and a macro that uses that macro to process all pending frames. 2008-08-01 22:27:39 -07:00
Brendan Eich
f799bebb7f Merge. 2008-08-01 21:09:48 -07:00
Brendan Eich
5f7cffe7ec Backed out changeset 8421b003fb5f -- it broke string to number, demonstrated by running trace-test.js without the -j (jit) option (10 - "1.3" => NaN instead of 8.7).
/be
2008-08-01 21:07:17 -07:00
Brendan Eich
622bc54d90 Fix ifop null/object inverted logic sense bug. 2008-08-01 20:19:28 -07:00
Brendan Eich
73c8cc0659 Add || and && tests; use newlines to join pass and fail results now that there are too many tests to be readable joined by commas on one line. 2008-08-01 20:18:10 -07:00
Brendan Eich
3dad101a7c Add || and && tests. 2008-08-01 20:13:11 -07:00
Brendan Eich
b5e4c9bea4 Extend ifop to handle undefined tests; implement JSOP_OR and JSOP_AND (so much work\!). 2008-08-01 12:06:04 -07:00
Brendan Eich
4315f6173f Style police raid: function names start in column 1, with one blank line between functions. 2008-08-01 11:03:52 -07:00
Brendan Eich
298f9c6d8f 1. Don't store thisp literally in state.rp, get it from argv[-1]. 2. Fix DEBUG localNames code. 2008-08-01 10:40:38 -07:00
Brendan Eich
b792cd9836 Remove synthesizeFrames private declaration -- js_SynthesizeFrames is a static helper now. 2008-08-01 08:39:44 -07:00
Brendan Eich
2faf8f5d7c - Implement interpreter frame reconstruction (js_SynthesizeFrame).
- Fix MONITOR_BRANCH to restore frame-dependent interpreter locals (we want fewer of these if they can be removed with no perf loss).
- Fix FORALL_SLOTS_IN_PENDING_FRAMES not to scan argv in callee when it has scanned operand stack in caller.
- Fix import to take the localFrame from whose fun its localNames parameter was computed -- it was using cx->fp which is wrong when FORALL_SLOTS_IN_PENDING_FRAMES iterates other than the top of stack frame.
- A few interval tests that were double-ended are single-ended now.
- Add call.js mini-test (more cases needed).
2008-08-01 08:26:32 -07:00
Andreas Gal
ef57e12366 Remove entryStackDepth. Calculate sp_adj relative to entryNativeStackSlots. 2008-08-01 02:33:54 -07:00
Andreas Gal
a7d09b2ff1 Make synthesizeFrame private. 2008-07-31 16:30:00 -07:00
Andreas Gal
e6a729256a Merge. 2008-07-31 13:43:02 -07:00
Andreas Gal
78535943cb Add vprof source files (this time for real.) 2008-07-31 13:42:25 -07:00
David Anderson
b1160d5d83 Fixed builtin_dmod not working on Win32. 2008-07-31 15:42:03 -05:00
Andreas Gal
e606bdb17e Pull in Moh's vprof utility from tamarin-tracing. 2008-07-31 13:39:41 -07:00
Andreas Gal
5a99fbc025 Sync with tamarin-tracing/nanojit tip. 2008-07-31 13:28:12 -07:00
shaver@mozilla.org
097345ebe0 use optimized path for fromCharCode 2008-07-31 12:22:48 -07:00
shaver@mozilla.org
6c78fa07ea Refactor js_GetUnitString to permit passing in a bare jschar, and use in js_str_fromCharCode. 2008-07-31 12:21:59 -07:00
shaver@mozilla.org
a39e3b2846 Refactor trace-test.js to permit running a single test via js trace-test.js testName. 2008-07-31 12:15:22 -07:00
shaver@mozilla.org
6906e26d42 add specialized StringToInt32 and filter for it 2008-07-31 11:35:08 -07:00
shaver@mozilla.org
9250c74f1f give strtointeger a way to avoid octal, to streamline ValueToNumber a bit 2008-07-31 11:33:55 -07:00
shaver@mozilla.org
0fbbdb8209 Coerce strings to numbers for appropriate ops.
(Wants a specialized StringToInt32 and a filter to put it in place.)
2008-07-31 07:41:58 -07:00
shaver@mozilla.org
c52ac1a18f merge backout of d24e6005ee4c to fix the world 2008-07-31 06:36:53 -07:00
shaver@mozilla.org
9b0784225d Backed out changeset d24e6005ee4c (causing major array-fail). 2008-07-31 06:35:11 -07:00
Andreas Gal
a286f04a51 Merge. 2008-07-31 01:35:56 -07:00
Andreas Gal
f15f73500f Remove ANY_TYPE and move debug printf around to print entry point even if we can't enter due to type mismatch. 2008-07-31 01:35:18 -07:00
shaver@mozilla.org
b3bbda75fa Make guard return expected, so we can trace alternate cases easily.
Better diagnostic for non-global scope chain head.
2008-07-30 22:59:13 -07:00
Andreas Gal
3f1c0f5bbe If trees are not enabled, don't try to reuse state and param1. 2008-07-30 21:40:21 -07:00
David Anderson
5fd2db3bf4 Re-use initial parameters on tree fragments. 2008-07-30 23:30:58 -05:00
shaver@mozilla.org
b39a8fb62f Implement JSOP_EQ and JSOP_NE over strings, plus JSOP_STRING. 2008-07-30 17:28:59 -07:00
Andreas Gal
2bc0d1673f Merge. 2008-07-30 16:37:35 -07:00