Commit Graph

194477 Commits

Author SHA1 Message Date
Andreas Gal
2e2794eef3 When merging globals from inner trees to outer trees, make sure to push the expected type upstream as well. 2008-08-07 17:08:27 -07:00
Andreas Gal
be8f6e47a8 When we trash a tree, we have to trash all outer trees that call it as well. 2008-08-07 17:01:00 -07:00
Andreas Gal
abbfda929e Recognize loop edges that hit a nested tree. 2008-08-07 16:41:20 -07:00
Andreas Gal
0305a8e41d Fix typo (missing memcmp in statement). 2008-08-07 16:27:26 -07:00
Andreas Gal
b0a78d17be Remove type-map hash code. A direct memcmp seems to be faster (probably some SSE magic behind it in gcc/glibc). 2008-08-07 16:26:56 -07:00
Andreas Gal
41532c2743 Factor out the code to capture the current stack type map and move around the type map method implementations to make sure they can see the FORALL macros. 2008-08-07 16:23:50 -07:00
Andreas Gal
62afe41fcb We expect no interned globals in a new tree. Assert on that. 2008-08-07 15:44:11 -07:00
Andreas Gal
762fe3fac8 Merge. 2008-08-07 15:41:50 -07:00
Andreas Gal
b9d1cbb1b2 Always trash TreeInfo when we recompile. This avoids the much dreaded JS_ASSERT(insInt32) errors and we can do this now because the demotion information is provided by the oracle and no longer stored in the typemap directly. 2008-08-07 15:38:54 -07:00
Andreas Gal
74c0c68853 Use an oracle to predict when slots are demotable. This allows trashing the TreeInfo* object in the root fragment more aggressively. Rebuild the stack type map at every compile to avert type map mismatches. Purge all global slot info when we re-record a tree. 2008-08-07 15:28:43 -07:00
Brendan Eich
61d94fdc59 Don't fail to flush cx->thread's JIT cache if JS_THREADSAFE. 2008-08-06 23:38:57 -07:00
Andreas Gal
7d11225df2 If we run into an error during compilation, blacklist that fragment. If we run out of memory, flush the cache. 2008-08-06 22:26:20 -07:00
Andreas Gal
a750469f1a Flush JIT cache for all contexts. Clear nanojit error state when we start compiling. 2008-08-06 22:18:33 -07:00
Andreas Gal
1405e5e0a2 Remove dead code. 2008-08-06 22:10:30 -07:00
Andreas Gal
72f8db35a1 Add a helper to flush the JIT code cache (and the fragment lookup quick cache). On a global shape mismatch trash the entire cache (might be a bit overly aggressive). Similary, during GC flush the code cache. 2008-08-06 21:56:25 -07:00
Andreas Gal
95bebc4e66 Merge. 2008-08-06 19:31:52 -07:00
Andreas Gal
36af9ec40c Tracker outer trees for every tree and merge globals of inner trees into all outer trees as we register inner trees with outer trees. 2008-08-06 19:25:24 -07:00
shaver@mozilla.org
a88153c229 add tests for missing and excess arity for trace-entry function context 2008-08-06 22:24:39 -04:00
Andreas Gal
2d0cef9e4a Add a contains method to Queue. 2008-08-06 19:06:37 -07:00
Andreas Gal
9c88e4b9fb Fix misleading debug text. 2008-08-06 19:04:41 -07:00
Andreas Gal
0a8f2e58f6 Fix tracing of code inside methods that were called with arity mismatch. 2008-08-06 18:51:26 -07:00
Brendan Eich
f9b7d1c86b Replace bogus assertion with runtime test for correct abort test (getter or setter, given sprop hit from propcache). 2008-08-06 17:54:36 -07:00
Andreas Gal
84d7e74c31 Fix nonEmptyStack1 test. 2008-08-06 17:44:39 -07:00
Andreas Gal
822dc23276 Disable outerlining, to be replaced with nesting. 2008-08-06 17:34:06 -07:00
Andreas Gal
bc5952ccb5 Add a helper to emit a tree-call into the currently recording trace. 2008-08-06 16:24:29 -07:00
Andreas Gal
12dad038be Add CallTree builtin. 2008-08-06 15:56:31 -07:00
Andreas Gal
9a3359278f Make ip in InterpStruct const*. 2008-08-06 15:55:00 -07:00
Andreas Gal
9a985cecb6 Merge. 2008-08-06 15:04:18 -07:00
Andreas Gal
8d9bd943f9 Cleanup stack offset calculation and eliminate the stack offset fiddling that was necessary for nanojit prior to adding the getTop hook. 2008-08-06 15:04:02 -07:00
Brendan Eich
81ca3977ff Add first non-empty stack testcase, which now passes (yay). 2008-08-06 13:53:34 -07:00
Brendan Eich
8aea5e6c49 Merge again, I lost to Andreas\! 2008-08-06 13:44:07 -07:00
Andreas Gal
f3a597c35d Always trashing the tree on a type mismatch can't work since the first iteration comes in as undefined for loop-outputs and then kills the main tree that deals with the proper stable types. Have to find a different way to deal with this. 2008-08-06 13:41:04 -07:00
Brendan Eich
ada0e648fa Merge. 2008-08-06 13:37:45 -07:00
Andreas Gal
2b7f0ed256 Pull recompile flag out of the state and pass in as argument. Trash the tree if a secondary trace can't be connected to the loop header. This is very aggressive and might need more tinkering. Trashing the tree on every mismatch doesn't seem to work well, so thats currently disabled. 2008-08-06 13:37:29 -07:00
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
3fcf2d0688 Merge. 2008-08-06 13:23:55 -07:00
Andreas Gal
2f936f6cc5 If we stop recording, immediately attempt to trigger the tree. 2008-08-06 13:18:30 -07:00
shaver@mozilla.org
8bccd00c7f add test for non-empty stack on trace entry (fails currently, but no longer crashes) 2008-08-06 16:12:49 -04: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