Brendan Eich
|
87a6e416ef
|
1. Fix json2.js (it crashes later, another bug) to restore a non-empty stack for a call with missing args after a nested bail-out. This involves changing js_SynthesizeFrame to return the number of stack slots it reconstructed that map to native slots. It also means not counting the missing args in the spdist uint16 pushed onto the state.rp stack (this was the root of all over-counting evil, for this bug).
2. Use if (C) { do {...} while (C); } instead of if (C) { while (C) {...} } and other style fixage.
|
2008-08-18 18:36:05 -07:00 |
|
Brendan Eich
|
21b6e353e2
|
Cosmetic cleanup.
|
2008-08-18 15:32:17 -07:00 |
|
Andreas Gal
|
f1b353f1c2
|
Add a place to store the current shape of the global object as we add slots it the global slot list.
|
2008-08-18 13:14:19 -07:00 |
|
Andreas Gal
|
ad4bfa3b5b
|
Add a global slot list to the trace monitor.
|
2008-08-18 13:12:19 -07:00 |
|
Andreas Gal
|
199891edab
|
Merge.
|
2008-08-18 12:55:09 -07:00 |
|
Andreas Gal
|
afc782cbe2
|
Make sure to trasm the vmprivate of dependent trees as well.
|
2008-08-18 12:53:38 -07:00 |
|
David Anderson
|
b39fadd1f3
|
Updated nanojit for the AMD64 patch.
|
2008-08-18 12:32:14 -07:00 |
|
Andreas Gal
|
f7aac4002e
|
Tighter fencepost in getTop, don't overshoot the stack (450997).
|
2008-08-18 10:09:24 -07:00 |
|
Andreas Gal
|
202a9de38b
|
Doh. Deep bailots are pretty rare and js_SynthesizeFrame already uses the fairly slow js_ReconstructStackDepth helper internally, so anotherone to avoid counting stack slots via spbase can't hurt.
|
2008-08-18 10:04:03 -07:00 |
|
Andreas Gal
|
e7645176d5
|
Merge.
|
2008-08-18 08:03:51 -07:00 |
|
Andreas Gal
|
535584eecb
|
Add a method to type map that captures missing slots (which have been lazily added to the slot list since the type map was created.)
|
2008-08-18 07:32:42 -07:00 |
|
Brendan Eich
|
4d8c1fda9b
|
Fix missing paren in comment; also s/scope/frame/ in same comment.
|
2008-08-17 12:04:33 -07:00 |
|
Andreas Gal
|
9f71dd226f
|
Extend the globalTypeMap import(), not in the caller, since we missed extending it in case of re-reading registers after a tree call.
|
2008-08-17 11:38:49 -07:00 |
|
Andreas Gal
|
f08e18fc14
|
If RecordTree is triggered, create a new peer fragment (or recycle and unused one) if we already have a tree for this location.
|
2008-08-17 00:49:59 -07:00 |
|
Andreas Gal
|
2d983bcee2
|
Try to execute the tree first, and if that fails worry about counting and triggering compilation. This speeds up trace activiation by a tiny bit, but makes code that we can't trace a little bit slower. We use a micro optimization to bypass the call to js_ExecuteTree when its clear that it wouldn't find a tree to executed to reduce this overhead. This change is necessary for multiple trees per bytecode location.
|
2008-08-17 00:30:36 -07:00 |
|
Andreas Gal
|
ef8a6041cc
|
Give root fragments a treeInfo decorator only if the trace was successfully compiled. Otherwise just keep a reference in the recorder and delete it when the recorder is destroyed. Review welcome. The involved state machine is a bit complex. Added lots of asserts as safety net.
|
2008-08-16 23:43:49 -07:00 |
|
Andreas Gal
|
26fc76213a
|
Only capture the shape of the global object in a tree once that tree tries to access a global, and only check the stored global shape in trees against the current global shape if the tree actually uses globals (which also doesn't trash trees when global variables are added if that tree doesn't actually use globals.) This is approx. a 1% win for sunspider.
|
2008-08-16 21:05:03 -07:00 |
|
Andreas Gal
|
efd76e5daf
|
Change interface of js_ExecuteTree to indicate which of the peer fragments it really executed (since we soon will have more than one tree that could be activated for that particular bytecode location).
|
2008-08-16 15:45:48 -07:00 |
|
Andreas Gal
|
c7f1119cef
|
Add a ->first pointer to all fragments that points to the first fragment in the peer list. This is the fragment we do JIT throttling/blacklisting on.
|
2008-08-16 15:41:21 -07:00 |
|
Andreas Gal
|
af92aac55a
|
Append peer fragments at the end of the list (so f->blacklist() always counts against the same fragment).
|
2008-08-16 11:42:38 -07:00 |
|
Andreas Gal
|
dcb470b104
|
Add a simple script that calculates an aggregate score over all tests running with the jit in t/*.
|
2008-08-15 20:26:45 -07:00 |
|
Andreas Gal
|
b9e946d830
|
Merge.
|
2008-08-15 20:16:46 -07:00 |
|
Andreas Gal
|
7b954b5cd7
|
Add the concept of peer fragments to nanojit. Each loop fragment can have a number of peer fragments, which we can use to have several different specialized variants of a loop (i.e. for different types). The makefile doesn't pick up the change to Fragmento.h, so make sure you clobber by hand or you will end up wasting an hour of your life in gdb (like me.)
|
2008-08-15 20:15:47 -07:00 |
|
Brendan Eich
|
ede29d299e
|
Merge.
|
2008-08-15 18:02:30 -07:00 |
|
Brendan Eich
|
bfc9f75d14
|
Update stale comment.
|
2008-08-15 18:01:26 -07:00 |
|
Andreas Gal
|
10a24ff80c
|
Don't allow inner trees to lazily pick up any globals since we currently can't handle that. We already ensure that we don't inline trees that have globals. This patch merely makes sure they don't get some additional globals on the fly.
|
2008-08-15 18:00:22 -07:00 |
|
Andreas Gal
|
dea1843401
|
Similarly to attaching new branches to a side exit, we might end up with a partial type map when exiting from a trace during tree execution, so make sure to merge in missing types from the tree's entry map in this case as well.
|
2008-08-15 17:11:57 -07:00 |
|
Andreas Gal
|
1d0582a6ec
|
Add test case for type map merging (450535).
|
2008-08-15 16:04:44 -07:00 |
|
Andreas Gal
|
d51fdd4130
|
If we extend a tree along a side exit that knew about fewer global slots that we have now in the tree, merge in the types for those additional slots from the entry map (450535).
|
2008-08-15 16:00:24 -07:00 |
|
Andreas Gal
|
d356a10871
|
Funnel all write-backs to the stack and the global frame through TraceRecorder::writeBack() so we can intercept and manipulate them in one central location.
|
2008-08-15 14:47:49 -07:00 |
|
Andreas Gal
|
8938c62c44
|
Enable nested trees by default. This is going to be exciting.
|
2008-08-15 10:21:07 -07:00 |
|
Andreas Gal
|
432ca408ef
|
I honestly to god don't know why this change is necessary but with this nesting works now for SunSpider and all of my test cases. The stack layout calculation needs some reviewing, seriously.
|
2008-08-15 10:19:24 -07:00 |
|
Andreas Gal
|
c42833b03c
|
Merge.
|
2008-08-15 10:12:47 -07:00 |
|
Andreas Gal
|
91a71447a9
|
Change sp_adj in guards to always reflect the current stack depth, so if we enter a trace/loop with something on the stack, sp_adj will reflect always at least that minimum amount. InterpState->sp now always runs in parallel with regs->sp of the current frame. This breaks nesting badly. I really need help with the stack layout logic.
|
2008-08-15 10:09:36 -07:00 |
|
Blake Kaplan
|
40e749ecc6
|
bug 450765 - Fix aliasing in LIR.h
|
2008-08-15 09:55:32 -07:00 |
|
Blake Kaplan
|
a6f7e7c0f7
|
Merge
|
2008-08-15 09:35:16 -07:00 |
|
Blake Kaplan
|
5aa5360905
|
bug 450529 - pass pc to String.prototype.match so we can avoid unnecessary object creation when tracing. r=brendan
|
2008-08-15 09:29:03 -07:00 |
|
Andreas Gal
|
9474c22bf7
|
Merge.
|
2008-08-14 23:23:15 -07:00 |
|
Andreas Gal
|
07cb6236c0
|
Add callee onto the stack to make sure our native frame layout matches the interpreter during calls.
|
2008-08-14 23:22:51 -07:00 |
|
Brendan Eich
|
bb1e475a4d
|
Fix gc hazard just introduced in fix for bug 450538.
|
2008-08-14 23:20:24 -07:00 |
|
Andreas Gal
|
1274eac1f3
|
Merge. I love hg.
|
2008-08-14 17:52:37 -07:00 |
|
Andreas Gal
|
6ba62a6fa7
|
Cleanup stack adjustment during tree calling.
|
2008-08-14 17:52:11 -07:00 |
|
Blake Kaplan
|
7bbee60c81
|
Don't just undepend the string, canonicalize it as well.
|
2008-08-14 17:31:39 -07:00 |
|
David Anderson
|
238cf072dd
|
Merge.
|
2008-08-14 17:28:32 -07:00 |
|
David Anderson
|
a41cb6c005
|
Fixed js_ValueToNumber overwriting values on the stack as different types, causing the exit type map to assert. The breaking conversion was JSVAL_VOID becoming a NaN. (bug 450538)
|
2008-08-14 17:27:45 -07:00 |
|
Brendan Eich
|
af7353e4e9
|
Consolidate tracing-out-of-js_Interpret abort code at bottom of js_Interpret.
|
2008-08-14 17:00:03 -07:00 |
|
Andreas Gal
|
801923081c
|
Make sure sp points to the native stack base of the inner tree when calling a nested tree.
|
2008-08-14 16:22:01 -07:00 |
|
Andreas Gal
|
13a4a98604
|
Merge.
|
2008-08-14 16:04:14 -07:00 |
|
Andreas Gal
|
1edbe7e6bf
|
Don't over-compensate sp_adj (exclude the callee).
|
2008-08-14 16:02:33 -07:00 |
|
David Anderson
|
f2223e2048
|
Merge.
|
2008-08-14 15:29:25 -07:00 |
|