Andreas Gal
|
626026b70a
|
Merge.
|
2008-07-09 10:06:24 -07:00 |
|
Andreas Gal
|
202ec610da
|
Removed assert that compares nativeFrameSlots to nativeFrameOffset since nativeFrameOffset is undefined in case sp is at sp+depth, so the assert sometimes randomly bites. Also fixed typo in cmp(). trace-test.js compiles now.
|
2008-07-09 10:05:59 -07:00 |
|
Brendan Eich
|
cffa8d2279
|
Tweak a few interval tests, eliminate casts, space patrol.
|
2008-07-09 09:59:51 -07:00 |
|
shaver@mozilla.org
|
893dd15071
|
Update with some additional test coverage (crashes in setgvar test)
|
2008-07-09 08:11:03 -04:00 |
|
Andreas Gal
|
f4e8e89333
|
Sync with mozilla-central.
|
2008-07-09 01:18:56 -07:00 |
|
Andreas Gal
|
05554d05b3
|
Stricter typing of the tracker code path which now only accepts jsval as suggested by Brendan.
|
2008-07-09 00:29:23 -07:00 |
|
Andreas Gal
|
19a2dcb6f5
|
Fixed bug in nativeFrameSlots and use an assert to compare the result with nativeFrameOffset (which is slower, but more precise).
|
2008-07-09 00:26:01 -07:00 |
|
Andreas Gal
|
1c24e264ad
|
Removed numMapEntries since typeMap is not really part of the SideExit struct yet anyway.
|
2008-07-09 00:13:35 -07:00 |
|
Andreas Gal
|
d6b834b98a
|
Move builtin[] table in jsbuiltin.cpp
|
2008-07-08 23:48:06 -07:00 |
|
Andreas Gal
|
5ee8b4abd7
|
Housekeeping. Remove a few warnings during BUILT_OPT and spelling in comments.
|
2008-07-08 22:40:07 -07:00 |
|
Andreas Gal
|
216f33a0bb
|
sp_adj is now maintained in bytes, not words, so +8 is now the magic value to point to the top of the stack. All stores above that watermark are eliminated by StackFilter in nanojit.
|
2008-07-08 21:03:30 -07:00 |
|
Andreas Gal
|
c9ee018202
|
Merge.
|
2008-07-08 20:20:24 -07:00 |
|
shaver@mozilla.org
|
815f787a8a
|
merge
|
2008-07-08 23:14:47 -04:00 |
|
Andreas Gal
|
ade00cfeb0
|
Removed bogus debug printfs.
|
2008-07-08 20:09:15 -07:00 |
|
Andreas Gal
|
795edf3334
|
Fixed frame walking FORALL_PENDING_FRAME_SLOTS and add 4 to sp in getTop (hotfix, not the right way to do it.)
|
2008-07-08 20:06:54 -07:00 |
|
shaver@mozilla.org
|
4fcad3cb1e
|
rval tracking and JSOP_POPV
|
2008-07-08 22:21:25 -04:00 |
|
Andreas Gal
|
4d84965bb8
|
Merge.
|
2008-07-08 19:17:15 -07:00 |
|
Andreas Gal
|
8e439abde3
|
Use more efficient address mode for LIR_load if possible and removed bogus printf.
|
2008-07-08 19:16:56 -07:00 |
|
Bob Clary
|
7f04f4a297
|
JavaScript Tests - remove unreliable test machines from test universe, update public-failures.txt, universe.data, bug 404367
|
2008-07-08 21:29:27 -04:00 |
|
shaver@mozilla.org
|
ff2b728cfd
|
protect printf with DEBUG
|
2008-07-08 21:22:46 -04:00 |
|
Brendan Eich
|
6a2a47ede9
|
Merge.
|
2008-07-08 18:14:14 -07:00 |
|
Brendan Eich
|
654d46135f
|
Single-ended interval tests, plus space patrol.
|
2008-07-08 18:12:22 -07:00 |
|
shaver@mozilla.org
|
46bdd14d57
|
Implement JSOP_SETNAME for globals.
|
2008-07-08 21:07:27 -04:00 |
|
David Anderson
|
daa8ef943b
|
Merge.
|
2008-07-08 17:20:11 -07:00 |
|
David Anderson
|
fcf8410125
|
Builds against latest nanojit; merged VMSideExitInfo into SideExit
|
2008-07-08 17:16:51 -07:00 |
|
Andreas Gal
|
444ffb8230
|
Fixed argv[n] and vars[n], should be [0] of course.
|
2008-07-08 17:14:01 -07:00 |
|
David Anderson
|
202828fb20
|
Merged with tamarin-tracing (Moved SideExit and GuardRecord out of nanojit, improved labelling)
|
2008-07-08 17:09:53 -07:00 |
|
Andreas Gal
|
27628a1abf
|
Add dummy vpname/vpnum parameters when not compiling in DEBUG mode.
|
2008-07-08 16:46:54 -07:00 |
|
Andreas Gal
|
9670ada6a1
|
Merge.
|
2008-07-08 16:29:43 -07:00 |
|
Andreas Gal
|
4550dd77f0
|
Introduce a generic stack frame walking macro. This eliminates the 6 (hg pull) redundant blocks of code that all walked the stack in 6 different ways, each with their individuals quirks.
|
2008-07-08 16:29:23 -07:00 |
|
shaver@mozilla.org
|
28fa12337c
|
root converted argv[0]
|
2008-07-08 17:10:59 -04:00 |
|
shaver@mozilla.org
|
ae64a20e56
|
Add disfile() helper to debug shell, to make it easier to see disassembly of top-level scripts.
|
2008-07-08 14:33:56 -04:00 |
|
Blake Kaplan
|
10f59fb6a7
|
Follow the invariant that we flow through label exit2. bug 442358, r=igor
|
2008-07-08 14:04:02 +02:00 |
|
Igor Bukanov
|
9ea0007595
|
[Bug 430617] Optimized shell uses the same options as the the non-debug browser build. r=mrbkap, not-part-of-browser-build
|
2008-07-08 11:15:43 +02:00 |
|
Andreas Gal
|
9a4e0a6467
|
Don't check the types for invalid global slots in checkType. Proper gvar lookup in boxing path. We have to unify the stack frame traversal and enumeration code. I fixed this bug before, just in a different place. 11x speedup for gvar.js
|
2008-07-08 01:30:29 -07:00 |
|
Andreas Gal
|
c1491b01c2
|
Properly display the 'any' type in the side exit map printout.
|
2008-07-08 01:14:02 -07:00 |
|
Andreas Gal
|
0afa601949
|
Cleanup definition of tracker (don't use LInsp, use T, its a template now).
|
2008-07-08 00:46:53 -07:00 |
|
Andreas Gal
|
ac0b138197
|
Hack: demotable stores have to be flagged as int in the exit typemap. This needs cleanup.
|
2008-07-07 22:41:58 -07:00 |
|
Andreas Gal
|
64bf4baa1c
|
Don't expect args and vars in a top-level frame that is mapped to the native frame.
|
2008-07-07 22:20:27 -07:00 |
|
Andreas Gal
|
1e0a9a8363
|
Merge.
|
2008-07-07 22:00:25 -07:00 |
|
Andreas Gal
|
a6d30ed7c2
|
Fixed native frame offset calculation for globals.
|
2008-07-07 22:00:07 -07:00 |
|
shaver@mozilla.org
|
8fa1b5215f
|
fix type checking of gvars
|
2008-07-08 00:19:20 -04:00 |
|
shaver@mozilla.org
|
4b276d07c9
|
reduce loop count in trace-test for faster interp runs
|
2008-07-08 00:18:10 -04:00 |
|
shaver@mozilla.org
|
3f51971710
|
more detailed type-instability diagnostics
|
2008-07-07 23:51:56 -04:00 |
|
Andreas Gal
|
205ab22204
|
We urgently need shaver's magic native stack/typeframe iterator. Fixed exit map builder to skip argv/vars for global scope.
|
2008-07-07 19:29:54 -07:00 |
|
Andreas Gal
|
2f939b51d1
|
Fixed increment for DECGVAR.
|
2008-07-07 19:27:36 -07:00 |
|
Andreas Gal
|
a0c960adee
|
Bugfixes to the native stack and typemap handling code.
|
2008-07-07 19:20:40 -07:00 |
|
Andreas Gal
|
56397d3c0e
|
Attempt at cleaning up the typemap/stack frame iteration code.
|
2008-07-07 18:35:38 -07:00 |
|
Andreas Gal
|
6aaa63a172
|
ngvars and the slot index are not related, so don't rely on ngvars < JS_INITIAL_NSLOTS to decide whether dslots exists
|
2008-07-07 18:08:28 -07:00 |
|
Andreas Gal
|
0fe5682c00
|
Make gvar ops use the global varobj values we unbox onto the native stack. The stack offset handling needs more work.
|
2008-07-07 17:21:54 -07:00 |
|
Andreas Gal
|
a4f454ae32
|
We shouldn't read globals onto the stack if the global object is used by another context so we just refuse to execute the trace in this case.
|
2008-07-07 15:23:48 -07:00 |
|
Andreas Gal
|
1d36b97516
|
Unbox global variables onto the native stack and re-box them. This has certain synchronization implications but will make top-level scripts quite a bit faster.
|
2008-07-07 15:15:56 -07:00 |
|
Blake Kaplan
|
8a415a087a
|
Don't use 'i' if the id was not an index. bug 443843, r=shaver
|
2008-07-07 23:01:09 +02:00 |
|
Blake Kaplan
|
ec01159cac
|
Don't do things to the object before we're sure it's the right type of object. bug 443569, r=brendan
|
2008-07-07 23:00:56 +02:00 |
|
Andreas Gal
|
4da1b65be4
|
Don't try to demote a slot we already decided we can't demote. Also, make sure we only demote additions with constants where the constant fits into an int.
|
2008-07-07 12:58:28 -07:00 |
|
Andreas Gal
|
f764b4bb28
|
Merge.
|
2008-07-07 02:59:41 -07:00 |
|
Andreas Gal
|
399a49e73a
|
Removed an unused variable from the avmplus glue code.
|
2008-07-07 02:59:20 -07:00 |
|
Brendan Eich
|
affcda00d2
|
Merge.
|
2008-07-07 02:56:52 -07:00 |
|
Brendan Eich
|
175ce14f5b
|
Indentation and comment wrapping (at 79, 99 looks too long and most comments still avoid going past 80+/-).
|
2008-07-07 02:55:03 -07:00 |
|
Andreas Gal
|
ef4a0f7533
|
Merge.
|
2008-07-07 02:51:36 -07:00 |
|
Andreas Gal
|
e4f8fa2f97
|
Sync nanojit with tamarin-tracing tip.
|
2008-07-07 02:47:40 -07:00 |
|
Brendan Eich
|
6d65efee60
|
Use jsopcode.tbl for tracer JSOP_* method decls; trim trailing whitespace.
|
2008-07-07 02:21:04 -07:00 |
|
Andreas Gal
|
e15355bc04
|
Cleanup the native frame -> interpreter frame boxing code. We sometimes end up with numbers on our stack in double format that are really ints. We have to detect those and properly store them as in on the interpreter stack.
|
2008-07-07 01:37:40 -07:00 |
|
Andreas Gal
|
a38e8a96c3
|
Add support to demote stores of constants that are currently represented as float but are really integers. bitwise.js is now compiled complete fp-casts free.
|
2008-07-07 01:05:53 -07:00 |
|
Andreas Gal
|
efa3309778
|
Demote floating point comparisons even if one side is constant (bug in nanojit, filed as #443884 against tamarin). Also demote add/sub/mul using the integer overflow detection side exit code that Ed adopted upstream. Tight loops (bitwise) are not emitted completely as integer code after the initial compilation using doubles triggered a speculative demotion of the context slots.
|
2008-07-07 00:43:40 -07:00 |
|
Andreas Gal
|
8ce0de1ad7
|
Sink type conversions into the side exit by updating the map and seeing though the cast in the store (in ExitFilter). Add a whole bunch of asserts on the varios speculative type states to make sure we get the state machine right. Import speculated integer values as integers into the trace (indicate in entry map).
|
2008-07-07 00:10:22 -07:00 |
|
Andreas Gal
|
34c2283213
|
Added loop-tail driven context slot type demotion. Without all the buzzwords, what this essentially means is that we detect if the last value that the trace leaves in a slot (which is the value that flows along the backedge back to the loop header) is known to originate from an integer value via i2f, we flag the slot as type integer and recompile the trace. We do this where type stability is certain (result of an and, i.e.) or where its very likely (++operator). If the speculation fails, the same analysis flags the slot as blocked, which means it will always be double. The hope is that this analysis converges quickly (1-2 recompilations tops).
|
2008-07-06 22:35:19 -07:00 |
|
Andreas Gal
|
d6172e525e
|
Make sure we don't get the argument order in BoxDouble wrong again.
|
2008-07-06 20:27:50 -07:00 |
|
Andreas Gal
|
efee2381b5
|
Make typemap uint8_t and fix order of arguments in call to BoxDouble.
|
2008-07-06 20:25:49 -07:00 |
|
shaver@mozilla.org
|
9ed160ad12
|
remove outdated guard (now inferred via filter as needed)
|
2008-07-06 23:11:59 -04:00 |
|
shaver@mozilla.org
|
2c69d44f6f
|
we only speak double around here now
|
2008-07-06 23:01:58 -04:00 |
|
shaver@mozilla.org
|
10d122ba09
|
remove bogus NOT_REACHED
|
2008-07-06 22:39:02 -04:00 |
|
Andreas Gal
|
312d176937
|
Strength reduce i2f(doubleToInt32(x)) and u2f(doubleToUint32(x)) to x. This eliminate most of the on-trace overhead, but we still need type peeling of loop variable into int to win back the performance loss casting introduced.
|
2008-07-06 17:43:08 -07:00 |
|
Andreas Gal
|
bd6deef4fc
|
Reduce redundant doubleToInt32(i2f(x)) chains to simply x.
|
2008-07-06 17:32:21 -07:00 |
|
Andreas Gal
|
5ec69f76a7
|
Strength reduce BoxDouble(i2f(x)) to BoxInt32(x). Make sure loop indexes are actually integers. This guard will be eliminated further down in the pipeline if we decided to peel the type of the loop variable (index) down to integer.
|
2008-07-06 16:38:54 -07:00 |
|
Andreas Gal
|
a990d4a2e6
|
Since numbers are now always represented by doubles at the recorder/type level, using BoxDouble and UnboxDouble only when moving numbers from or to memory. A filter will then turn f2i(UnboxDouble) into UnboxInt where appropriate.
|
2008-07-06 16:18:45 -07:00 |
|
Andreas Gal
|
aeeff83beb
|
Move the type level from int/double to number. All traces start out as double in all slots, and denote and promote to/from int as needed. The FuncFilter optimizes on-trace casting and elininates redundant f->i-> chains. More optimization needed on this of course, and this code is now a bit slower than the previous integer-register use. However, this does solve the q += 2.5 issues. The heap access code does not properly cast yet and is likely unstable.
|
2008-07-06 15:55:04 -07:00 |
|
shaver@mozilla.org
|
b28afaa80d
|
Trace GETGVAR and INCGVAR, though not yet correctly.
|
2008-07-06 16:59:59 -04:00 |
|
Andreas Gal
|
d30b7d1c8a
|
Add unary and binary helpers that automatically demote and promote when dealing with integer operations (not used yet, need loop typemap peeling in place first.)
|
2008-07-06 13:16:34 -07:00 |
|
Andreas Gal
|
4e1aa1d977
|
JSVAL_IS_BOOLEAN does what isTrueOrFalse was trying to do.
|
2008-07-06 12:16:55 -07:00 |
|
Andreas Gal
|
5816dee707
|
Fix template, should use typename, not class.
|
2008-07-06 12:03:51 -07:00 |
|
Igor Bukanov
|
e1c0b7d628
|
Bug 443746 – Optimizing the enumeration state allocation. r=brendan
|
2008-07-06 21:02:44 +02:00 |
|
Andreas Gal
|
1343901446
|
Add ExitFilter, which builds side exit typemaps for us. This had to be moved into a filter, because this has to happen after we eliminate redundant i2f-f2i chains as we can sink those into the side exit by simply storing the unpromoted/undemoted value and just flip the type in the exit map.
|
2008-07-06 11:48:41 -07:00 |
|
Andreas Gal
|
84ec537a0c
|
Merge.
|
2008-07-06 11:19:06 -07:00 |
|
Andreas Gal
|
9501bcd749
|
Added doubleToUint32 builtin and make tracker a template.
|
2008-07-06 10:59:55 -07:00 |
|
shaver@mozilla.org
|
d881a494aa
|
fix builtin_UnboxInt32 signature and name shape_ins for debugging
|
2008-07-06 13:58:59 -04:00 |
|
shaver@mozilla.org
|
45b3826103
|
Trace JSOP_NAME, and refactor out jsval unboxing.
|
2008-07-06 13:38:55 -04:00 |
|
shaver@mozilla.org
|
06a27ca367
|
begin on JSOP_NAME, refactor stobj_get_slot to chain better
|
2008-07-06 12:15:55 -04:00 |
|
shaver@mozilla.org
|
d5f1772186
|
Fix optimizer flags for interp and builtins in debug mode, and clean out old
TestNanojit.
|
2008-07-06 10:24:09 -04:00 |
|
shaver@mozilla.org
|
f463dc6891
|
actually record at HOTLOOP1 (fencepost)
|
2008-07-06 09:56:25 -04:00 |
|
shaver@mozilla.org
|
7f5f2ae1c8
|
some remaining low-hanging ops
|
2008-07-06 09:52:50 -04:00 |
|
shaver@mozilla.org
|
38235e2eec
|
move JSOP_DOUBLE impl to, er, JSOP_DOUBLE (wtf?)
|
2008-07-06 09:33:13 -04:00 |
|
shaver@mozilla.org
|
2d307b4b59
|
Implement JSOP_DOUBLE.
|
2008-07-06 07:28:36 -04:00 |
|
Andreas Gal
|
100f4ea5e0
|
Added support for semi-stable loop variables. Compiling for(...) q += 2.5; is ridiculously difficult because it flip-flops between int and double. Add support to promote integer values to doubles at the loop tail if at loop entry we expect a double. Since this isn't possible the other way around, we have to get luck that we catch a path into the loop where q is already double. For this we add 3 trigger points (10, 13, 37). We will try three times to record a trace at those iteration counts of a loop. If none succeed the loop is blacklisted. This probably needs more tuning down the road.
|
2008-07-05 23:21:53 -07:00 |
|
Andreas Gal
|
41efb6c488
|
Merge and rename jsIf to ifop.
|
2008-07-05 22:23:34 -07:00 |
|
Andreas Gal
|
a48c36fae3
|
Added FuncFilter from tamarin core (not part of nanojit yet since its slightly VM dependant).
|
2008-07-05 22:20:35 -07:00 |
|
Andreas Gal
|
0b28897ad3
|
Add helpers for i->f and f->i conversion. The f->i path goes via builtin calls.
|
2008-07-05 22:04:58 -07:00 |
|
Andreas Gal
|
68359155b9
|
Add type primitives for numbers (isNumber and asNumber).
|
2008-07-05 21:51:26 -07:00 |
|
shaver@mozilla.org
|
a268883f3c
|
Implement JSOP_IFEQ, JSOP_IFNE, JSOP_DUP, JSOP_DUP2.
|
2008-07-05 23:47:24 -04:00 |
|
Andreas Gal
|
075e3f00a6
|
Add casting for objects and cleanup casting code.
|
2008-07-05 20:30:11 -07:00 |
|