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
|
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
|
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
|
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 |
|
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 |
|
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 |
|
Vladimir Vukicevic
|
61a89af8e6
|
b=450176; trace parseInt and parseFloat; r=gal
|
2008-08-14 15:13:39 -07:00 |
|
David Anderson
|
9f7d261303
|
Fixed the known native arg handler from accidentally using 'continue' to break out of a loop one level higher. This was causing crashes when the arg didn't match the expected types (bug 450530).
|
2008-08-14 11:48:43 -07:00 |
|
Andreas Gal
|
bfcf6a784d
|
Write back outer tree frames, but exclude the current frame (which the next tree will do). This still crashes the trace-tests.js test case with nesting enabled and for the life of me I can't figure out why (try with TRACEMONKEY=nesting).
|
2008-08-14 01:44:32 -07:00 |
|
Andreas Gal
|
fa52d00c5a
|
Backed out changeset 089406b2b0aa
|
2008-08-14 00:45:39 -07:00 |
|
Andreas Gal
|
55bc4df432
|
Add an explicit start frame parameter to the FORALL macros, which allows FlushNativeStackFrame to be used for other frames than just the topmost N ones.
|
2008-08-13 23:20:44 -07:00 |
|
Andreas Gal
|
a5e83b133c
|
Fix outrageously incorrect comment.
|
2008-08-13 22:54:23 -07:00 |
|
Andreas Gal
|
0530506440
|
Restore state of the outer frames in case of a nested exit. Should be feature complete but needs more debugging.
|
2008-08-13 21:34:41 -07:00 |
|
Andreas Gal
|
8d4c97dbef
|
FlushNativeStackFrame currently only handles the innermost nested trees writeback, so at least make it use the proper adjusted stack base for that.
|
2008-08-13 19:23:28 -07:00 |
|
Andreas Gal
|
01efe3882f
|
Update inlineCallCount with the total call stack height, which is the sum of rp_adj and any adjustments nested trees added. Also make sure to read all stack adjustment information from the tree we exit on, not the tree we entered (might be different in case of nesting.)
|
2008-08-13 19:09:05 -07:00 |
|
Andreas Gal
|
30b82dbcbd
|
Print relative stack instead of absolute stack address upon side exit (debug mode).
|
2008-08-13 18:28:43 -07:00 |
|
Andreas Gal
|
9350282579
|
Implement nested side exits.
|
2008-08-13 18:10:19 -07:00 |
|
Andreas Gal
|
222e746fe7
|
Merge. If I had a cent for every merge. Sigh.
|
2008-08-13 17:48:04 -07:00 |
|
Andreas Gal
|
f1d87d6234
|
Reshuffle code lines in the side-exit return path (do asserts closer to the GlobalFrame writeback.)
|
2008-08-13 17:47:18 -07:00 |
|
David Anderson
|
4d25c18771
|
Merge.
|
2008-08-13 17:46:58 -07:00 |
|
David Anderson
|
87d9c2089d
|
Merge.
|
2008-08-13 17:45:50 -07:00 |
|