Commit Graph

11646 Commits

Author SHA1 Message Date
Andreas Gal
824ec3d48f Track the type of guards and react accordingly if we bail out on them. Guards that protect against out-of-memory conditions don't try to grow the tree. Instead we just resume the interpreter. 2008-07-27 16:18:53 -07:00
Andreas Gal
255f1fe65f Don't use ABORT_TRACE outside the recorder. 2008-07-27 15:40:34 -07:00
shaver@mozilla.org
141edf8a24 do setelem in a builtin, so we don't abort trace every 8 times when growing 2008-07-27 18:34:23 -04:00
Andreas Gal
f9440fa493 If we see a f2i(UnboxDouble) chain, simplify it to UnboxInt32 which does the conversion internally. This also enables a fastpath to read 31-bit jsval integers from arrays. 2008-07-27 14:55:26 -07:00
Andreas Gal
16074fb8bb Merge. 2008-07-27 14:29:24 -07:00
Andreas Gal
03b0e4b45f Add limited outerlining. Much of this will be subsumed by nested trees. 2008-07-27 14:28:56 -07:00
shaver@mozilla.org
5cd77d7fc9 remove rval tracking, since it's no longer necessary 2008-07-27 15:47:43 -04:00
Andreas Gal
6604e884a5 Remove guardCount. No longer needed. 2008-07-27 12:05:01 -07:00
Andreas Gal
4da5c40227 Merge. 2008-07-27 02:15:42 -07:00
Andreas Gal
5234290eaf Smarter speculative demotion of numbers to integers and promotion of the trace seems to require actual doubles. If the number at entry looks like an int we make the slot an int and compile as such. If the loop-tail proves the slot to be a double, we recompile the trace. Currently such miss-speculation cannot be handled on secondary traces since we are currently unable to recompile the primary trace. Such secondary traces are blacklisted. 2008-07-27 02:15:17 -07:00
Brendan Eich
b9c3050076 Add JSSF_NO_SCRIPT_RVAL script flag, and uint8 flags field for it. 2008-07-27 00:12:01 +01:00
Brendan Eich
d6697763b7 Fix comment typo. 2008-07-27 00:11:30 +01:00
Andreas Gal
aec2839ca9 Don't try to demote slots on secondary traces (we have to recompile the primary trace as well for that, which we currently don't do.) 2008-07-25 19:30:33 -07:00
Andreas Gal
bd2d7b538a Add a test case for trees. 2008-07-25 19:10:23 -07:00
Andreas Gal
c39aa77689 Added sunspider tests to t/ for dvander. 2008-07-25 18:43:19 -07:00
Andreas Gal
67298590aa Eliminate EntryRegs. Its not safe to keep a reference to the entry SP since we might extend the tree from a different outer stack frame. Instead just store the entryStackDepth. 2008-07-25 18:22:15 -07:00
Andreas Gal
164b2b6bb5 Print real recording point, not entryRegs and add an assert that makes sure the guard we come out of is associated with the tree we entered into. 2008-07-25 18:13:57 -07:00
Andreas Gal
f38c550eea Merge. 2008-07-25 16:54:14 -07:00
Andreas Gal
5e2eaa71ff The VP engineering broke JSOP_NAME! We have to check whether the slot is actually interned and otherwise abort. 2008-07-25 16:51:42 -07:00
Brendan Eich
3106d2409e Avoid JSOP_POPV in global scripts from load(), etc. 2008-07-26 01:23:12 +02:00
David Anderson
d5d308b03a Fixed entry typemap having wrong allocation size. 2008-07-25 13:30:52 -07:00
Andreas Gal
3a43211d7f Can't use lr->from. Seems to not get set in certain cases. Go figure. The nanojit tree code is really weird. 2008-07-25 02:29:36 -07:00
Andreas Gal
c5c8b10c27 Factor out AttemptToGrowTree. 2008-07-25 02:00:02 -07:00
Andreas Gal
624bce597b Determine ahead of time whether a side exit is a loop-terminating side exit instead of re-determining this at every side exit. 2008-07-25 01:44:40 -07:00
Andreas Gal
861f0290c2 Move trace activation code into js_ExecuteTree(). 2008-07-25 01:20:40 -07:00
Andreas Gal
f5ffb0d227 Make demotion threshold optional (0=off, 32=default). Turn off to debug the type assert bug. 2008-07-24 17:33:34 -07:00
Andreas Gal
72432f4348 Don't demote slots in overly long traces (based on counting the number of guards, current threshold=32). 2008-07-24 16:25:18 -07:00
Andreas Gal
691b899b41 Cleanup iteration over all slots to use a single macro to avoid code duplication. 2008-07-24 14:51:14 -07:00
Andreas Gal
a2fc64ea01 Add shark support to md5.js directly, no longer around the recorder. 2008-07-24 11:08:37 -07:00
Andreas Gal
8278ce69a1 Make the interpreter notify us when frames are popped so we see he right cx->fp value. Fix return value tracking for JSOP_STOP. 2008-07-24 10:35:10 -07:00
Andreas Gal
9780602644 Backed out changeset a58e7ce6eb7f. stack(0) is wrong, if at all it should have been stack(-(1 + argc)). But anyway, its impossible to write through to the frame via set() at that point because leaveFrame() doesn't actually modify cx->fp. We need to wait for the interpreter to do so. Until then nativeFrameOffset produces incorrect values and the assert fails in set. 2008-07-24 10:09:51 -07:00
shaver@mozilla.org
3d0176f370 fix return-value handling for new stack layout 2008-07-24 00:31:37 -07:00
Andreas Gal
0a1e83ca07 Maintain a separate frame for globals using InterpState->gp.
This will allow nested loops to access the globals interned by outer loops while at the same time sharing parts of the stack of the outer loop.
2008-07-23 23:18:02 -07:00
Andreas Gal
d66db351a0 Add a fast path for nativeFrameOffset that walks entire groups at a time, not slots. Check against the result calculated by the FORALL macro in DEBUG builds (for sanity). 2008-07-23 16:39:17 -07:00
Andreas Gal
0c67428824 Merge. Make sure we clear out all slots from the tracker when leaving a frame. 2008-07-23 15:56:27 -07:00
Andreas Gal
475f3b2370 When addressing locations above the stack water level, use ->sp as base. Shaver accidently changed this to ->spbase when merging Igor's patch, so we were writing past the water mark and the stores were killed. 2008-07-23 15:48:15 -07:00
shaver@mozilla.org
ee1bc42ef1 tighten up some bounds, still not quite right 2008-07-23 11:42:52 -04:00
Andreas Gal
e0f05951e4 Lazy fill the stackTracker as we lookup the nativeFrameOffset for values. Purge all entries related to the current frame when it is popped. This code could be further simplified if Tracker was a template. 2008-07-23 02:57:56 -07:00
shaver@mozilla.org
d853312135 merge from andreas 2008-07-23 01:08:23 -04:00
shaver@mozilla.org
0ae0232183 merge (still not working, probably box/unbox dumbness) 2008-07-23 01:06:18 -04:00
shaver@mozilla.org
13beafcd1a merge (now compiling, untested) 2008-07-23 00:20:29 -04:00
shaver@mozilla.org
d6b7e95f5b merge (mostly, doesn't build) 2008-07-22 23:58:43 -04:00
Andreas Gal
28d41c849c Handle leaving of frames in one central place. 2008-07-22 20:16:12 -07:00
Andreas Gal
fa30479a65 Reduce HOTLOOP threshold to 2. 2008-07-22 18:31:44 -07:00
Andreas Gal
86108222f1 Avoid calculating native frame offset by tracking the last load/store for every slot and extracting the offset from there. 2008-07-22 17:54:04 -07:00
Andreas Gal
636de55594 Avoid nativeFrameOffset calls in import(). 2008-07-22 17:24:29 -07:00
Andreas Gal
4e7d7ebb5d Merge. 2008-07-21 19:38:03 -07:00
Andreas Gal
988bfce570 Add a pattern to recognize safe_add and emit a simple add for it. 2008-07-21 19:37:43 -07:00
shaver@mozilla.org
c998f5492d use nargs rather than argc, since bytecode only refers to [o-nargs) args 2008-07-21 22:31:08 -04:00
shaver@mozilla.org
4e20ef2007 make time.sh more useful 2008-07-21 21:44:21 -04:00
Andreas Gal
f75ac4ed76 Reverse the insanity that used to be tamarin's arg passing in ins2. Now it makes sense. 2008-07-21 17:59:42 -07:00
Andreas Gal
edaf656e39 Avoid overflow checks on integer adds when its safe to do so. 2008-07-21 17:50:17 -07:00
Andreas Gal
b149b25974 Eliminate entryFrame pointer (not safe to carry that around.) 2008-07-21 16:20:53 -07:00
Andreas Gal
cb8f2b1107 Use callDepth instead of entryFrame in the FORALL macro. 2008-07-21 16:19:38 -07:00
Andreas Gal
568e3f882c Eliminate exit filter, write the type map directly in snapshot. 2008-07-21 15:09:19 -07:00
Andreas Gal
81d604c67d Sink stack-targeting type conversion in the set() path instead of in the ExitFilter. 2008-07-21 15:01:47 -07:00
Andreas Gal
3ca6099bab Use callDepth, not entryFrame in nativeFrameSlots(). 2008-07-21 14:55:41 -07:00
Andreas Gal
7d41fd6a8e Remove excess parameters of verifyTypeStability. 2008-07-21 13:21:00 -07:00
Andreas Gal
83dcd55ff1 Track call depth in the trace recorder. This lays the groundwork to get rid of entryFrame. 2008-07-21 13:18:08 -07:00
shaver@mozilla.org
640220ca0f beginning of entryFrame removal 2008-07-21 15:57:02 -04:00
Andreas Gal
7466af13cc Merge. 2008-07-21 12:44:03 -07:00
Andreas Gal
e4b7f9cdbb Use ti instead of fi for TreeInfo pointers. 2008-07-21 12:43:51 -07:00
Andreas Gal
fe52907712 Rename VMFragmentInfo to TreeInfo. 2008-07-21 12:41:43 -07:00
Andreas Gal
6c9d3d7051 Merge. 2008-07-20 17:36:47 -07:00
Andreas Gal
a344d8eb92 Style cleanup and eliminate redundant f2u(i2f|u2f) chains. 2008-07-20 17:36:11 -07:00
Brendan Eich
796ede974c Cite bug 445262 with a FIXME instead of omfgHack_ prefix ;-). 2008-07-20 16:21:45 -07:00
Brendan Eich
bc62129a68 Tighten up js_IsLoopEdge and include JSOP_IFNEX. 2008-07-20 16:11:52 -07:00
Brendan Eich
9de8dbd4a7 Nit patrol. 2008-07-20 16:09:08 -07:00
shaver@mozilla.org
84071cde06 merge time is fun time 2008-07-20 18:04:27 -04:00
shaver@mozilla.org
f3fe654c91 add simple timing harness 2008-07-20 18:03:07 -04:00
Andreas Gal
ba670ddc66 Simplify updating of the side exit target. 2008-07-20 14:56:04 -07:00
shaver@mozilla.org
42c8798d31 simpler loop exit check (backwards is a loop exit, forwards is not) 2008-07-20 17:54:16 -04:00
shaver@mozilla.org
b881262443 force Math to be interned, and defend against non-interned globals until upvar saves us all 2008-07-20 17:23:39 -04:00
Andreas Gal
92ad36939a Use exponential backoff when trying to extend trees. 2008-07-20 14:28:56 -07:00
Igor Bukanov
139cdca010 bug 330765 - patch from romaxa to fix NativeCompareAndSwap implementation on ARM. r=myself 2008-07-22 16:12:04 +02:00
Johnny Stenback
438112013e Landing fix for bug 442708. JS_GC with GC_SET_SLOT_REQUEST doesn't loop until all threads are satisfied. Patch by brendan@mozilla.org, r=bent.mozilla@gmail.com 2008-07-21 16:58:24 -07:00
Johnny Stenback
6e95111554 Landing fix for bug 444880. Make the JS component loader use the JS context stack so that pending requests are suspended while components load. Patch by bent.mozilla@gmail.com, r+sr=jst@mozilla.org 2008-07-21 16:56:45 -07:00
Bob Clary
fa9992c713 Sisyphus|JavaScript Tests - allow user to execute tests from other location than TEST_DIR, bug 446097, r=cbook 2008-07-21 18:18:15 -04:00
Brendan Eich
c1547ca25f Always select gvar ops for declared global vars, instead of only if loopy/enough-used (445901, r=shaver). 2008-07-21 15:14:14 -07:00
Jason Orendorff
4a48e072f3 Bug 445624 - Delete dead code in JSObject2NativeInterface hot path (r+sr=jst) 2008-07-21 15:16:47 -05:00
Brendan Eich
46e183a6c2 Fix property cache fill to use the best shape (445899, r=shaver). 2008-07-20 16:27:10 -07:00
Andreas Gal
e42833b0db Merge. 2008-07-20 13:29:20 -07:00
Andreas Gal
6922d0cd5f Don't emit boxed values, use the unboxed representation for constants. 2008-07-20 13:28:53 -07:00
Andreas Gal
99e9e80629 Removed meaningless assert. 2008-07-20 13:25:36 -07:00
shaver@mozilla.org
65d84971d7 don't pretend we can trace INCELEM and friends (fixes trace-test.js, ahem) 2008-07-20 16:21:43 -04:00
shaver@mozilla.org
62dccff8dd move summarization to the end, so I can see it through the debug spew 2008-07-20 16:17:58 -04:00
Igor Bukanov
af90a7ef45 bug 441686 - eliminating JSStackFrame.(nvars|vars). r=brendan 2008-07-20 22:13:17 +02:00
shaver@mozilla.org
bddc445991 improve tracing/recording diagnostics 2008-07-20 15:42:19 -04:00
Igor Bukanov
d422c4995e [Bug 446229] Fixing GCC conversion warnings within SpiderMonkey. r=brendan 2008-07-20 14:53:21 +02:00
shaver@mozilla.org
f3857ddac7 discard trace on global shape mismatch 2008-07-19 22:32:45 -07:00
Brendan Eich
2e642f1990 Breathe, vertical-spacing, breathe! 2008-07-19 15:42:31 -07:00
Igor Bukanov
9b3583218a [Bug 444846] Fixing GCC warning on x86-64 about redefined HAVE_VA_LIST_AS_ARRAY. r=crowder 2008-07-19 19:51:05 +02:00
Igor Bukanov
538622bcaa merge 2008-07-19 19:31:48 +02:00
shaver@mozilla.org
3a9c816fe0 Avoid tracking object properties, make incElem work. 2008-07-19 10:24:10 -07:00
shaver@mozilla.org
3e6f34993a fix no-tracer build 2008-07-21 06:59:38 -04:00
shaver@mozilla.org
cfafd2fe01 Implement DEFLOCALFUN for the fully-lightweight case.
Reset atoms base register on function entry and exit.
2008-07-19 06:29:56 -07:00
Brendan Eich
96bdefd1f1 Improve js_IsLoopExit (unannotated JSOP_GOTO is still ambiguous). 2008-07-19 10:52:24 -07:00
Brendan Eich
e903444286 Fix incProp to box and store (incElem still todo). 2008-07-19 10:24:28 -07:00
Andreas Gal
3fd3d3a835 Merge. hg sucks. 2008-07-19 00:40:54 -07:00
Andreas Gal
00fd64b6e5 Don't demote fmul since it overflows in math-partial. We might try to demote it and then promote back if this happens (depends how aggressively we want so speculate). Speedup 6.6 for math-partial (since its sin/cos/pow heavy.) 2008-07-19 00:27:45 -07:00
Brendan Eich
90f08bf3bf First stab at incops, plus unbox_jsval tag-masking guard fixes, plus misc. cleanup. 2008-07-19 00:15:22 -07:00
Brendan Eich
d594b18211 Property-cache JSOP_NAMEINC etc. direct slot case (445893, r=shaver). 2008-07-18 22:53:22 -07:00
L. David Baron
4de7d5bbe6 Backed out changeset 5c009a853d70 for hitting a fatal JS_Assert during xpcshell unit tests (xpcom/unit/test_bug374754.js) on the DO_NEXT_OP(JSOP_INCNAME_LENGTH) line on !JS_THREADED_INTERP platforms (Windows). 2008-07-18 21:53:07 -07:00
Andreas Gal
cac6830023 Merge. 2008-07-18 19:16:16 -07:00
Brendan Eich
a98fde76a6 Property-cache JSOP_NAMEINC etc. direct slot case (445893, r=shaver). 2008-07-18 19:16:15 -07:00
Andreas Gal
fdce9ce73c Abort trace is STOP is leaving the recording context. 2008-07-18 19:15:49 -07:00
shaver@mozilla.org
e195fca1f0 Propagate TCF_COMPILE_N_GO through to inner functions, so that we can avoid nulling their parents and then cloning expensively in DEFLOCALFUN.
Also make Process do COMPILE_N_GO.
2008-07-18 17:15:41 -07:00
Andreas Gal
2422eabd22 Make entryFrame/entryRegs relative to the tree entry since we only adjust ip/sp/rp when exiting from the tree, not in between fragments. 2008-07-18 16:21:22 -07:00
Andreas Gal
7eea6badf4 Adjust ip/sp/rp in the interpreter recovery code, not on the trace. 2008-07-18 15:35:59 -07:00
Andreas Gal
13a006aee6 Write all the debug output to stdout (we can't easily make everything go to stderr, so this way at least it all goes into the same place.) 2008-07-18 14:13:31 -07:00
Andreas Gal
9af8ba0394 Rework some of David's changes. Make sure we don't modify the tree until we are ready to attach the new fragment. Share lirbufs between tree branches. 2008-07-18 14:11:01 -07:00
David Anderson
854288fbb0 Got side exits seemingly working, added if.js to trace-test.js 2008-07-18 10:33:17 -07:00
shaver@mozilla.org
43bff554d7 Handle more operand types in ifop(). 2008-07-18 08:01:51 -07:00
shaver@mozilla.org
0f5b220b76 Better diagnostic info for trace abort. 2008-07-18 07:59:37 -07:00
shaver@mozilla.org
3048327072 lookup/find, but do not fill prop cache from recorder 2008-07-18 00:46:18 -07:00
shaver@mozilla.org
51a8a7e736 When PROPERTY_CACHE_TEST misses, fall back to doing our own lookup via js_GetPropertyHelper. 2008-07-17 23:57:56 -07:00
Andreas Gal
b1cd6900dc Merge. 2008-07-17 21:32:23 -07:00
Andreas Gal
3bcedb1095 Try to clean up the memory allocation/deallocation through the avmplus glue code. 2008-07-17 21:31:50 -07:00
Brendan Eich
20608de4bf Warning elimination. 2008-07-17 18:30:54 -07:00
Andreas Gal
b85a05ff26 Make sure we compile again if we reject a trace by decrementing hits. 2008-07-17 18:15:55 -07:00
Andreas Gal
ec2639cd39 Fix hot loop triggering. 2008-07-17 18:10:47 -07:00
shaver@mozilla.org
c3b817fc24 can't easily find real names for globals, so just number them 2008-07-17 17:33:18 -07:00
Igor Bukanov
d68ca228cc [Bug 445818] Using explicit assembly to implement compare-and-swap on x86-64 to avoid __sync_bool_compare_and_swap (GCC intrinsic) as the latter is buggy at least on ARM. r=brendan 2008-07-18 02:18:45 +02:00
Andreas Gal
e0d138cd5c Merge. 2008-07-17 17:13:41 -07:00
Andreas Gal
c2f37ab89c Disable trees for the time being. 2008-07-17 17:12:28 -07:00
Andreas Gal
93c1fd0a24 Add if.js example for trees. 2008-07-17 16:38:09 -07:00
Andreas Gal
abaf140791 Add the beginning of support for trees. 2008-07-17 16:20:13 -07:00
Bob Clary
8ce164689b JavaScript Tests - update public-failures and universe.data to include mozilla-central 1.9.1 branch, remove unsupported machine configurations, bug 399387 2008-07-18 13:59:09 -04:00
Bob Clary
a007fa4e96 Sisyphus - JavaScript Tests - add detect-universe.sh, bug 446037 2008-07-18 12:56:47 -04:00
shaver@mozilla.org
f91a0cdef3 Label globals and locals with their source-names in trace.
Show line number on abort.
2008-07-17 15:09:48 -07:00
Brendan Eich
b333ac3111 Use the property cache for JSOP_NAMEINC, etc. 2008-07-17 16:54:01 -07:00
Brendan Eich
891c98121c Fix property cache fill to use the right shape. 2008-07-17 16:51:27 -07:00
Brendan Eich
094c419af4 Merge. 2008-07-17 16:50:09 -07:00
Andreas Gal
877cd419c5 Don't allocate FpRegs if sse2 is enabled. 2008-07-17 15:00:22 -07:00
Andreas Gal
8802c2daa2 Add js_IsLoopExit that indicates whether a side exit is likely to continue the loop or not. 2008-07-17 14:58:09 -07:00
Brendan Eich
421f1ba794 Always select gvar ops for declared global vars, instead of only if loopy/enough-used. 2008-07-17 14:37:25 -07:00
Brian Crowder
0af033d4da Bug 430740 - BOM characters are stripped from javascript before execution
r=igor
2008-07-17 16:58:06 -04:00
Andreas Gal
d2e031b38d Cleanup recorder activation, use a single hot loop threshold (10). 2008-07-17 13:42:58 -07:00
Andreas Gal
e70830b8ca Merge. 2008-07-17 10:30:00 -07:00
Andreas Gal
353383c65c Added statistics and a js_DestroyJIT hook. Also use debug_only and not verbose_only as #ifdef DEBUG shortcut. 2008-07-17 10:22:40 -07:00
Ben Turner
799c423cd5 Bug 443870 - Add JSAutoSuspendRequest to match JSAutoRequest
r=brendan
2008-07-17 12:37:32 -04:00
shaver@mozilla.org
1a7596120c remove pointless untracedCall test 2008-07-17 08:43:55 -07:00
Igor Bukanov
d184f89aa7 [Bug 444608] optimizing E4X constructor calls. r=brendan 2008-07-17 16:19:30 +02:00
Jason Orendorff
a663802904 Bug 423867 - Migrate js/src/README.html to developer.mozilla.org (r=brendan) 2008-07-17 07:24:33 -05:00
Andreas Gal
2b72c2eac9 Fix signature of insCall in the FuncFilter and remove f2i(i2f) elimination since we shouldn't really ever hit it. 2008-07-17 03:24:17 -07:00
Andreas Gal
acf999080a Merge. 2008-07-17 02:03:56 -07:00
Andreas Gal
8f9536a2a7 Move up addName to make sure it gets inline in non-debug mode. 2008-07-17 02:02:48 -07:00
shaver
f3c23074e0 Add setprop and tests for setprop and cleanup labling code for debug mode (m=gal). 2008-07-17 02:00:23 -07:00
shaver@mozilla.org
3a154456b3 merge, woo 2008-07-17 01:59:58 -07:00
shaver@mozilla.org
ffdbf9b5cd summarize test results 2008-07-17 01:58:34 -07:00