Commit Graph

2823 Commits

Author SHA1 Message Date
Igor Bukanov
8cc1d392ca bug 452786 - optimizing JS date access. r=mrbkap 2008-09-01 10:30:41 +02:00
Jason Orendorff
d8e1964581 Fix for build breakage on Windows due to bad dom_quickstubs.depends file.
The bad file contains a backslash, which causes GNU make to choke.
This fix causes the file to be generated correctly, but the file on
the Windows build machines is still there and still contains backslashes;
a clobber should fix this.

The Try Server didn't catch this because every Try build is a clobber.
2008-08-31 09:51:52 -05:00
Peter Weilbacher
046dd17991 [OS/2] Bug 452630: Build break in jstracer.cpp (r=gal) 2008-08-28 18:28:52 +03:00
Jesse Ruderman
df0d2c793b Remove extra space in tracing statistics message (bug 452571). r=gal 2008-08-28 00:16:50 -07:00
Jesse Ruderman
2530465041 Bug 452570 - NanoAssert doesn't end the message with a line break 2008-08-28 00:15:34 -07:00
Brendan Eich
5d132dba83 Record JSOP_IN (452563, r=gal). 2008-08-27 23:00:43 -07:00
David Anderson
d3cb344df7 Fixed asserting on valid LIR in AMD64 LIR_qcmov (bug 452545, patch from Makoto Kato). 2008-08-27 19:49:26 -07:00
Blake Kaplan
b9bf10f53c Merge again 2008-08-27 17:48:56 -07:00
Andreas Gal
2316d281a0 Keep unrolling inner loops as long we are not hitting the same inner loop edge twice in a row (452362). 2008-08-27 17:48:15 -07:00
Andreas Gal
4b9cda096c Merge. 2008-08-27 17:26:36 -07:00
Andreas Gal
cff18f06cd Fix trashing of inner trees. Keep track of trees that call to a tree and flush them as well since they directly embed the code address. Since flushing an inner tree might invalidate the tree we are currently compiling, trees are now trashed in the destructor of TraceRecorder. 2008-08-27 17:25:56 -07:00
David Anderson
f166d24a5c Merge. 2008-08-27 16:54:17 -07:00
David Anderson
bc995a482b Fixed AMD64 loop branch patching for >32-bit offstes. 2008-08-27 16:52:28 -07:00
David Anderson
ccc26331ca Removed INS_CONSTPTR use with JSVAL_TAG to discourage future 64-bit problems. Fixed 32-bit build. 2008-08-27 16:32:11 -07:00
Blake Kaplan
6a60ec5ab8 Re-merge to pick up changeset 6464982e3c7f 2008-08-27 16:27:49 -07:00
David Anderson
98306ccb74 Merge. 2008-08-27 16:09:17 -07:00
David Anderson
d0d64bbeff Added LIR_qior/pior. Fixed more AMD64 page jumping bugs. Fixed some other AMD64 usage bugs in jstracer. 2008-08-27 16:08:59 -07:00
Ben Turner
e13eae15fb Bug 451732 - Always do LAST_FRAME_CHECKS, even if the compile failed (since that sets a pending exception). r=mrbkap 2008-08-27 15:45:13 -07:00
Andreas Gal
e8fcb3bd37 Merge. 2008-08-27 14:48:59 -07:00
Andreas Gal
3fb237f38c Loops with a single iteration start tracing, but never complete since we immediately walk past the loop edge after the first iteration. At least try to complete the loop around it by walking past such thin inner loops when compiling the outer loop (452362). 2008-08-27 14:46:57 -07:00
Brendan Eich
fc0f763f3c Fix upvar decompilation for eval-from-fun case (451884, r=mrbkap). 2008-08-27 14:35:41 -07:00
Blake Kaplan
ccbbafd88d Merge mozilla-central -> tracemonkey 2008-08-27 14:28:27 -07:00
Blake Kaplan
eba28651d8 bug 418051 - Don't allow shorthand object initializer through destructuring assignment. r=brendan 2008-08-27 13:56:43 -07:00
Blake Kaplan
0a3ec02bb5 Bug 452295 - Deal with embeddings that don't use principals. r=brendan 2008-08-27 13:56:34 -07:00
Brendan Eich
4842b435c5 Oops, not enough copying... 2008-08-27 13:54:05 -07:00
Brendan Eich
510ec8bdce Fix a bug Jesse reported: insufficient copy/paste from record_JSOP_CALL to record_JSOP_NEW. 2008-08-27 13:52:46 -07:00
Blake Kaplan
f27c2b3c5f Bug 452346 - Fix latent bug in rv_alloc. r=crowder 2008-08-27 11:43:35 -07:00
Brian Crowder
4670191ed2 Merge initial patches for bug 97954: autoconf build environment for spidermonkey 2008-08-27 10:16:56 -07:00
Brendan Eich
4de45a4139 Fix upvar decompilation for eval-from-fun case. 2008-08-27 02:21:04 -07:00
Brendan Eich
fb2a1431d7 Fix another broken assert (452372). 2008-08-27 01:11:06 -07:00
Brendan Eich
9cb246a8fc Fix another broken assert (452372). 2008-08-27 01:10:44 -07:00
Brendan Eich
df16afe946 Correct (but sadly a bit slower) property cache guarding (452140, r=shaver). 2008-08-27 00:44:37 -07:00
Brendan Eich
cbb33d1a83 Remove bogus assertion (452178). 2008-08-27 00:41:57 -07:00
Brendan Eich
6c59f88abd Merge. 2008-08-27 00:36:57 -07:00
Brendan Eich
722ff40a11 Remove bogus assertion (452178). 2008-08-27 00:34:53 -07:00
David Anderson
d7c7f1645b Improved AMD64 out-of-range jumping, some cases are still broken though. Fixed i386 build. 2008-08-26 23:14:13 -07:00
David Anderson
d030e910fb Merge. 2008-08-26 21:51:12 -07:00
David Anderson
8464bf22ba Merge. 2008-08-26 21:47:10 -07:00
Andreas Gal
7df899a9f5 Merge. 2008-08-26 21:46:21 -07:00
Andreas Gal
4f51cac33e Add test case for decaying inner loops that sometimes are not executed at all since the condition fails pre-entry. 2008-08-26 21:45:53 -07:00
Andreas Gal
418b15eadd Flag a side exit as loop exit only if the underlying loop condition actually targets the current loop header, otherwise treat it as a branch exit. This is required for inner loops where we unroll the first iteration but the loop condition immediately fails. If we report such exits as loop exits, no branch gets ever attached to them and we keep side-exiting over and over. 2008-08-26 21:43:59 -07:00
Brendan Eich
ae9605be38 Correct (but sadly a bit slower) property cache guarding (452140, r=shaver). 2008-08-26 21:26:10 -07:00
Brendan Eich
a596a75f05 Why wasn't this hunk in the .rej file, or else merged properly? 2008-08-26 21:05:17 -07:00
Brendan Eich
ff1b59a197 Bug 452340 - knownNative for num_toString (r=danderson). 2008-08-26 20:55:52 -07:00
David Anderson
357f1d4e64 Test case for bug 452340. 2008-08-26 20:02:59 -07:00
Brendan Eich
e326b78b55 Added knownNative for num_toString (bug 452340, r=dvander). 2008-08-26 20:00:11 -07:00
Robert Sayre
4bd48080dc Add some tests for loops that should exit trace. 2008-08-26 18:46:50 -04:00
David Anderson
2a4faa131c Fixed crashing with the incremental allocation changes. Very long jumps are still a problem but at least now we assert. 2008-08-26 15:15:15 -07:00
Jim Blandy
7633d7d0d6 Place these libraries in EXTRA_LIBS, not LDFLAGS, so we can easily
capture them in the js-config script later.
2008-08-26 14:34:36 -07:00
Jim Blandy
468980d37c There is no 'pathsubst' function in GNU make. This assignment has
been around forever, and it's never done anything, so it should be
safe to delete.
2008-08-26 14:34:36 -07:00
Andreas Gal
c4af944fe9 Merge. 2008-08-26 13:26:05 -07:00
Andreas Gal
40796f4154 For global code assume that no slots are below the current frame. 2008-08-26 13:25:40 -07:00
Brendan Eich
7adb43eaa6 Align test order with mozilla-central to avoid merge conflicts (I hope). 2008-08-26 12:50:01 -07:00
Brendan Eich
b764cdd7da Fix TM assert on wikipedia (451806, r=mrbkap). 2008-08-26 12:49:10 -07:00
Brendan Eich
772be6e2bf Fixed cases where argc varied between recording time and execution time (bug 451727; also warning fix fe54f7fb89d1 from tracemonkey). 2008-08-26 12:28:26 -07:00
Boris Zbarsky
21251ac0c5 Bug 449233. Assert when decrementing the jsdhash/pldhash recursion level past 0. r=dbaron,brendan, sr=dbaron 2008-08-26 13:02:04 -04:00
Igor Bukanov
5202ccb583 bug 450392 - fixing -Wstrict-aliasing=2 warnings 2008-08-26 10:46:34 +02:00
Andreas Gal
795f7ae426 Merge. 2008-08-26 01:01:24 -07:00
Andreas Gal
eb0c261390 When extending an outer tree from its nesting guard, the guard we actually exited on determines the typemap for the current frame and all inlined frames, whereas the nesting guard is consulted for all type information frames below the current frame. 2008-08-26 01:00:53 -07:00
Brendan Eich
a7cdb3ddb2 Fix warning. 2008-08-25 23:22:20 -07:00
Andreas Gal
4bb68b852c Rename lr->anchor in AttemptToExtendTree() 2008-08-25 23:19:00 -07:00
Andreas Gal
24b663fd61 Determine the tree we have to grow from the side exit we attach to in AttemptToExtendTree() instead of passing the parameter in. 2008-08-25 23:17:38 -07:00
Brendan Eich
43b25b3c09 Rename gcDontBlock to runningJittedCode, and assert it's false on entry to js_Interpret (for 451657, but not the fix, just prolog). 2008-08-25 23:08:21 -07:00
Andreas Gal
e86ad8730d Merge. 2008-08-25 22:11:23 -07:00
Andreas Gal
d00742c962 Add an assert checking that celldepth is zero upon loop exit side exits and better verbose diagnostic for trace exits. 2008-08-25 22:11:04 -07:00
Andreas Gal
c86c7d09fb Generate an always taken LOOP_EXIT guard when an inner loop encounters a break statement. When returning from such an inner tree, make sure the recorder resumes at the target address of the goto the break was emitted as, otherwise the outer tree confuses the location with a break in its own loop. Disabled outerlining (this patch subsumes it, but we might enable it later since it might handle some cases more efficiently, currently off for debugging through). fasta currently asserts, and fannkuch hits a perf regression. These are probably bugs this change exposed. 2008-08-25 17:24:49 -07:00
Blake Kaplan
48d275806e Bug 451785 - Trace == and != involving booleans. r=gal 2008-08-25 16:58:18 -07:00
Blake Kaplan
298caaa80f Bug 451782 - Trace Math.ceil. r=brendan 2008-08-25 16:54:02 -07:00
Ted Mielczarek
8a69f6fb57 bug 436495 - build DumpJSStack in release builds. r=shaver 2008-08-25 20:25:19 -04:00
Blake Kaplan
63f33e654d Bug 451483 - Array.splice() should return an empty array. r=brendan 2008-08-25 17:12:30 -07:00
Brendan Eich
70173fadfb Merge. 2008-08-25 16:38:38 -07:00
Brendan Eich
9d19499490 Oops, forgot to make Print set *vp to undefined when I made it a FastNative. 2008-08-25 16:36:57 -07:00
David Anderson
e4ef2c3451 Merge. 2008-08-25 16:06:17 -07:00
Brendan Eich
b385e456d9 Fixed cases where argc varied between recording time and execution time (bug 451727). 2008-08-25 16:04:10 -07:00
Neil Rashbrook
0cf05ab4dc Bug 452061 Clobbering TraceMonkey shouldn't be needed 2008-08-25 23:51:30 +01:00
Andreas Gal
99505fce2e Merge. 2008-08-25 15:18:12 -07:00
Andreas Gal
fc5667ef13 Split closeLoop() and compile() and add endLoop(), which omits an always-exit guard (will be used for break statements.) 2008-08-25 15:17:46 -07:00
Robert Sayre
7fd9b9c91b Merge 2008-08-25 17:38:42 -04:00
Andreas Gal
8a6d79d6b6 Annotate gotos that are emitted for break statements with SRC_BREAK (452122, r=mrbkap). 2008-08-25 14:34:26 -07:00
Robert Sayre
8ce085e0c6 Add test of (attempted) trace recording with an active call object 2008-08-25 17:12:41 -04:00
Brendan Eich
73d280798c Bug 451906 - Regression: Array index has different results (r=shaver). 2008-08-25 12:38:12 -07:00
Brendan Eich
eb8bbd11d2 Cope with sub-optimal JSOP_FORNAME instead of JSOP_FORVAR inside a with, or similar (eval-created locals; 451806). 2008-08-24 08:18:17 -07:00
Andreas Gal
e944751f2e Merge. 2008-08-23 15:13:55 -07:00
Andreas Gal
71b12b53fe Enable outlining. If a loop doesn't connect back to its own header (i.e. break inside the loop), see if the outer loop path can be attached to the inner loop (outerlining). Added test case (failure mode is high number of activated traces in trace-test.js). This test exposes a regression in access-fannkuch. Committing so we can diagnose that separately. 2008-08-23 15:11:38 -07:00
Brendan Eich
d28554f3cc Remove over-eager gvar optimization for JSOP_DEFFUN (451678, r=shaver). 2008-08-22 18:07:32 -07:00
David Anderson
04ab3326c8 Merge. 2008-08-22 17:36:37 -07:00
David Anderson
e88386ec38 Fixed bogus assertion in debug mode. 2008-08-22 17:32:45 -07:00
Andreas Gal
f5462e1c0a Merge. 2008-08-22 17:32:01 -07:00
Andreas Gal
454b252c63 If the outer loop has a value in a float register but the inner tree expects an int, tell the oracle that we want doubles in that slot in the inner tree and trash the inner tree so it gets re-compiled with a matching layout (451673). 2008-08-22 17:31:23 -07:00
Andreas Gal
2fb04231fe Allocate nanojit code cache incrementally (bug 443111). 2008-08-22 16:37:37 -07:00
David Anderson
36ea645fbe Bug 451743 - On x86 processors, only use SSE2 if the processor supports it, otherwise default back to x87 FPU (r=gal, sr=mrbkap) 2008-08-22 12:21:27 -07:00
David Anderson
f0606ee551 Fixed x86_64 build issue (accidentally trying to build 32-bit nanojit). 2008-08-21 18:07:26 -07:00
Andreas Gal
1b29fd53e4 Merge. 2008-08-21 16:50:57 -07:00
Andreas Gal
666aeff29e Fix builtins that were accidentally flagged as CSE/FOLD but really aren't (Math.random i.e.) 2008-08-21 16:49:51 -07:00
Andreas Gal
7da39648cf Cleanup spacing in builtins.tbl 2008-08-21 16:35:05 -07:00
Blake Kaplan
26c3cd4ea9 Fixed js_String_p_split passing in an undersized array. 2008-08-21 15:17:47 -07:00
Andreas Gal
2563d2bd3d Merge. 2008-08-21 11:42:03 -07:00
Andreas Gal
80088cd777 Fix warning about signed/unsigned comparison. 2008-08-21 11:40:56 -07:00
Robert Sayre
c6a7088bae Bug 451580, fix string split assertions and return values. Tests fail with JIT on for other reasons, it seems. r=shaver 2008-08-21 14:06:42 -04:00
Andreas Gal
ee5f8e441f Merge. 2008-08-21 05:21:37 -07:00
Andreas Gal
8f6bbaaa5f Abort recording when an error occurs. 2008-08-21 05:21:01 -07:00
Brendan Eich
d62ee36613 Fix script->owner maintenance; also fix warning. 2008-08-21 05:04:20 -07:00
Brendan Eich
b1e05f4fc9 JSThread is not zeroed when allocated, grrr. 2008-08-21 04:51:46 -07:00
Brendan Eich
e4a3506856 Fix typo. 2008-08-21 04:22:48 -07:00
Brendan Eich
7ebaf5bf1c Merge. 2008-08-21 04:17:49 -07:00
Andreas Gal
a49e15bd85 Remove FastEval builtin. 2008-08-21 04:17:17 -07:00
Brendan Eich
791221dfae Followup upvar fix, easy assertbotch avoidance. 2008-08-21 04:16:50 -07:00
Brendan Eich
fd148818e1 Add split built-in, also sort knownNatives for my own sanity (should sort builtins.tbl and jsbuiltins.cpp by function while at it, but too tired). 2008-08-21 04:13:07 -07:00
Brendan Eich
147018b013 Merge, plus restore TraceRecorder::activeCallOrGlobalSlot. 2008-08-21 03:51:37 -07:00
Brendan Eich
9cd8e5a539 Upvar, v0.1 (limited to looking up from eval in a function, to the function's args and vars). 2008-08-21 03:47:33 -07:00
shaver@mozilla.org
35915d94ea disable tracing with active call object pending perf fix 2008-08-21 03:19:17 -07:00
Andreas Gal
f2c2859267 Merge. 2008-08-21 03:13:57 -07:00
Andreas Gal
d9acfb10f0 Remove FastEval, broken by design (r=brendan). 2008-08-21 03:13:31 -07:00
David Anderson
f34f92698f Fixed code generation bug in AMD64 port. Enabled AMD64 JIT now. 2008-08-21 02:53:53 -07:00
Brendan Eich
324b9c7f4e Remove lambda-replace built-in, it's not safe to record into a nested js_Interpret. 2008-08-21 01:39:16 -07:00
Brendan Eich
2c4e22add3 Fix CHECK_RECORDER macro to use XOR to evaluate both terms. 2008-08-21 01:38:50 -07:00
Andreas Gal
2e767b124c Convert undefined to NULL on tree entry if the tree wants an object type. 2008-08-21 01:13:07 -07:00
shaver@mozilla.org
ed7fab1440 trace |new Array|, via the magic of copy and paste 2008-08-21 00:50:20 -07:00
Brendan Eich
321ae383ba Merge. 2008-08-21 00:47:51 -07:00
Andreas Gal
5a8f2bff2b Merge. 2008-08-21 00:45:44 -07:00
Andreas Gal
fcd8670fec If we expect a concrete value but see an undefined come into the trace, convert undefined to the concerete value. 2008-08-21 00:43:45 -07:00
Brendan Eich
9b56ca4984 Tidy up globalShape mismatch reporting. 2008-08-21 00:19:04 -07:00
Andreas Gal
a7b0f45c3f Export js_NaN. 2008-08-21 00:13:40 -07:00
Brendan Eich
e5f489dcbb Merge. 2008-08-20 23:47:47 -07:00
Brendan Eich
b9d10512b7 Use JS_FRIEND_API for new JS_ArrayToJSUint8Buffer, etc., and use it on prototypes and definitions (fixes some platform builds). 2008-08-20 23:46:31 -07:00
Andreas Gal
e26e3234f4 Merge. 2008-08-20 23:40:24 -07:00
Andreas Gal
12fcdd141f Remove bogus fadd +1 check at the end of the loop. We have long switched over to starting slots as int and hence n++ will be emitted as integer add with i2f, so checking for i2f only is sufficient. 2008-08-20 23:39:57 -07:00
Andreas Gal
ddf445130e Increase HOTEXIT to 1 (from 0). 2008-08-20 23:35:00 -07:00
Andreas Gal
1261e82b42 Eliminate redundant BoxDouble(UnboxDouble) chains. 2008-08-20 23:19:48 -07:00
shaver@mozilla.org
6870d297ef say what we're returning from from EnterFrame 2008-08-20 23:12:28 -07:00
Brendan Eich
9e4119701e Merge. 2008-08-20 22:44:16 -07:00
Brendan Eich
e9b635b38a 1. Add activeCallOrGlobalSlot, used by JSOP_NAME, JSOP_CALLNAME, etc. recorders to cope with Call objects on the scope chain, if they represent still-active frames covered by callDepth.
2. Add builtin for eval, to be optimized further, to handle very short eval'ed programs as found in popular benchmarks.
3. Add common scopeChain TraceRecorder helper, to generate the LIR to load cx->fp->scopeChain.
4. Add ABORT_TRACE to LeaveFrame for clarity.
2008-08-20 22:40:39 -07:00
Andreas Gal
8468ac7444 Support multiple returns from called trees by continueing the outer tree with a new nested guard. 2008-08-20 22:37:00 -07:00
Andreas Gal
36ddb45efb Restore state.sp and state.rp before the nested guard exit point so we can have a sequence of them and still have rp/sp adjusted correctly. 2008-08-20 22:23:17 -07:00
Brendan Eich
4a25cf5a32 Defer eval'ed script destruction to next GC; expose js_obj_eval for tracing. 2008-08-20 22:18:42 -07:00
Andreas Gal
e9f3ccf839 Push actual guard that failed in a nested call, not the expected. 2008-08-20 20:12:19 -07:00
Andreas Gal
87295d3d95 Merge. 2008-08-20 19:25:26 -07:00
Andreas Gal
1b99fe0e1e Don't emit a guard at the end of CALLNAME and friends since the values CALLNAME puts on the stack (callee, this) are not seen by the interpreter yet, and thus get store killed. Instead, emit the guard in CALL, at which point the values are properly stacked. 2008-08-20 19:24:57 -07:00
shaver@mozilla.org
9817a0cd97 fix js_IsLoopExit to better handle for-in exits, r=mrbkap 2008-08-20 18:50:49 -07:00
Andreas Gal
49f0b4f6cb Add a switch to disable the oracle, in which case we never demote any slots. 2008-08-20 16:10:56 -07:00
Andreas Gal
fdb661bd5e Clear the oracle on every GC. 2008-08-20 16:01:56 -07:00
Andreas Gal
3a2b40e4c4 Merge. 2008-08-20 15:43:57 -07:00
Andreas Gal
3e55729492 If at loop entry we expect a double, but at the loop tail we store an int because we suck the i2f into the side exit, we have to explicitly cast back up to double using i2f otherwise we won't be able to make sense of the value when we load it at the top of the next iteration. 2008-08-20 15:43:26 -07:00
shaver@mozilla.org
913b472c52 disable vprof building so that we can build on XP 2008-08-20 15:23:44 -07:00
Andreas Gal
98f67af6d0 Add a way to clear the oracle. 2008-08-20 15:18:43 -07:00
Andreas Gal
0954618ab1 Merge. 2008-08-20 15:04:22 -07:00
Andreas Gal
ccfca5d79f Clear global slots and global type map when clearing the code cache. 2008-08-20 15:03:51 -07:00
Andreas Gal
f3972bfb84 Backed out changeset be63a51a0a3b. Breaks tofte if run from ./time.sh. 2008-08-20 14:57:49 -07:00
Vladimir Vukicevic
9a3d208ae4 b=451242, add fast-paths for dense array to uint/int/double buffer conversion; r=bent/mrbkap 2008-08-20 14:47:01 -07:00
Brendan Eich
6bc330ef33 Don't disable property caching in eval (this requires GC'ing eval scripts). Do tolerate active Call object at head of scope chain in record_JSOP_CALLNAME, and go straight to the stack slots. 2008-08-20 14:04:37 -07:00
Andreas Gal
1859be808c Stub the getter and setter on class prototypes and constructor (bz, r=brendan, bug 451154). 2008-08-20 12:58:07 -07:00
Andreas Gal
8df2fc18c8 When adjusting integers to doubles in tree calls start with the current stack frame only. 2008-08-20 12:47:39 -07:00
David Anderson
d6aef7cf26 Fixed some valgrind whinings (not actual bug fixes). 2008-08-20 12:17:31 -07:00
Vladimir Vukicevic
1bbc109274 wrong condition check in nanojit with qjoin(qlo,qhi) 2008-08-20 11:32:22 -07:00
David Anderson
54cfb5e424 Fixed typo that broke the tree. Sorry! 2008-08-20 10:38:50 -07:00
shaver@mozilla.org
d1f7543e1b default to non-verbose for DEBUG, set TRACEMONKEY=verbose in env to go verbose 2008-08-20 10:15:42 -07:00
David Anderson
d84ad33955 Another portability fix. math-spectral-norm is crashing in the test harness so keeping 64-bit JIT off (everything else works). 2008-08-20 09:59:23 -07:00
David Anderson
738ce385fa Merge. 2008-08-20 09:50:41 -07:00
shaver@mozilla.org
5d3ad68bbe merge from mozilla-central 2008-08-20 08:17:17 -07:00
Brendan Eich
deca6a9d50 Add str + obj concatenation for 3d-raytrace.js. 2008-08-20 02:35:17 -07:00
Dave Camp
fd49970e20 Backed out changeset af00b3f27c64 (Bug 418051) 2008-08-20 01:15:25 -07:00
Andreas Gal
3a4d105a0f If the outer tree has a slot in an integer register, but the inner tree expects a double, make sure to promote the value before calling the tree, otherwise the inner tree will read the value from the stack incorrectly. 2008-08-20 00:51:56 -07:00
Andreas Gal
fb3cf056d9 Correctly calculate tree call stack adjustment, even if we don't have any arguments in the current frame and hand pick some cleanups from the backed-out changeset. 2008-08-19 23:31:33 -07:00
Blake Kaplan
62fcdc68d4 bug 418051 - Don't allow shorthand object initializer through destructuring assignment. r=brendan 2008-08-19 23:31:21 -07:00
Andreas Gal
39d9d53d83 Back out multi-trees. There is absolutely no way this will be debugged in time for tomorrow. Need a bit more gdb man-power. 2008-08-19 23:28:13 -07:00
Andreas Gal
55c1e3d15d Always blacklist the first fragment in the peer list, and blacklist if we see a loop that is not type-stable. 2008-08-19 23:10:28 -07:00
Andreas Gal
25bf562fe6 Don't build trees inside tree calls if no suitable tree can be found (for now.) 2008-08-19 23:00:19 -07:00
Andreas Gal
4ee5ead209 Improved debug output. 2008-08-19 22:59:08 -07:00
David Anderson
69c4638355 Merge. 2008-08-19 22:33:43 -07:00
Andreas Gal
8569359e49 Add debugging facilities for typemaps and fix sp_adj calculation for tree calls. 2008-08-19 22:29:02 -07:00
David Anderson
9fa5be54af Merge. 2008-08-19 21:32:22 -07:00
David Anderson
20e464b4f9 More AMD64 fixes (release build works now, and fixed verbosity bug). 2008-08-19 21:31:23 -07:00
Andreas Gal
454c89d72b Support multiple fragments with different entry maps per PC location. 2008-08-19 20:30:16 -07:00
Jason Orendorff
f9365c3994 Backing out changeset cf6c811e1272 (bug 407216) due to debug assertions. 2008-08-19 22:28:26 -05:00
Jason Orendorff
4b74677d5e Bug 407216 - DOM quick stubs - faster paths for top N DOM methods (r+sr=jst, security r=mrbkap, build r=bsmedberg)
* * *
* * *
* * *
2008-08-19 21:38:24 -05:00
Jason Orendorff
b94820fbeb Bug 451571 - Delete SetExceptionWasThrown (r=dbradley, sr=jst) 2008-08-30 18:58:36 -05:00
Igor Bukanov
bafd289e60 bug 445705 - eliminate Namespace and QName GC things. r=brendan 2008-08-29 10:10:34 +02:00
Igor Bukanov
91905c13d0 bug 452586 - fastcall attribute should only be used on i386. r=shaver 2008-08-29 09:51:00 +02:00
Brendan Eich
1b762e34e4 Fix upvar decompilation for eval-from-fun case (452441, r=igor). 2008-08-28 17:17:55 -07:00
Daniel Holbert
bfcab9f023 Backed out changeset 9ecf699d4047 to see if it fixes linux mochitest failures 2008-08-28 15:04:18 -07:00
Brendan Eich
4300c6ec35 Fix upvar decompilation for eval-from-fun case (452441, r=igor). 2008-08-28 11:01:39 -07:00
Peter Weilbacher
a39ac3faf1 [OS/2] Bug 451686: fix build break and fastcall warnings in js/src, r=shaver 2008-08-22 11:53:26 +03:00
Brendan Eich
bea371d215 Record JSOP_IN (452563, r=gal). 2008-08-28 00:18:05 -07:00
Jason Orendorff
fe99024391 Bug 407216 - DOM quick stubs - faster paths for top N DOM methods (r+sr=jst, security r=mrbkap, build r=bsmedberg)
* * *
* * *
2008-08-19 21:38:24 -05:00
David Anderson
9a5b3b4307 AMD64 trace-tests.js passes now (hacked in LIR_qcmov opcode, corrected builtin return types). 2008-08-19 17:19:19 -07:00
Neil Rashbrook
f48015a1f0 Bug 450651 Use host outoption for host binaries r=mrbkap 2008-08-20 00:02:44 +01:00
Andreas Gal
b3efe4fbeb Clear out the list of global slots when the shape changes. 2008-08-19 13:34:20 -07:00
Andreas Gal
1ee261ca2e Emit the tree call stack setup code before executing the inner tree, otherwise we might see stale references to instructions prior to the call that no longer guarantee certain types (since the inner tree overwrite them.) 2008-08-19 13:11:18 -07:00
Andreas Gal
1ded8ec0ad Merge. 2008-08-19 11:32:52 -07:00
Andreas Gal
e79f9ed689 Intern globals per-context, not per tree, which allows transitioning between trees that use globals. The type of all global slots compiled code uses is expected to remain stable, otherwise the entire code cache has to be flushed. Changes to the shape of the global object also flush the code cache. Working for trace-tests.js, but fails math-partial-sum.js 2008-08-19 11:32:36 -07:00
David Anderson
b279c87417 Disabled 64-bit JIT for now, failing 3 test cases. 2008-08-19 11:19:56 -07:00
David Anderson
ee4a887045 Merge. 2008-08-19 11:02:57 -07:00
David Anderson
aef458673b Fixed codegen bug for amd64 64-bit binary ops. 2008-08-19 11:00:17 -07:00
Brendan Eich
c2229dbd5e Back out changeset 1d0574db8320 (for 450997), it was based on a bum steer. 2008-08-18 22:18:33 -07:00
Andreas Gal
dfb94ccec1 Add a global type map to the monitor and rename slotList to globalSlots. 2008-08-18 21:08:35 -07:00
Brendan Eich
76380c598b Add a final js_ReconstructStackDepth assert after setting fp->regs->sp in js_ExecuteTree's bail-out epilog. 2008-08-18 19:26:47 -07:00
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
David Anderson
e503629dbe Fixed AMD64 accidentally treating the shape as a 64-bit integer. 2008-08-18 17:36:24 -07:00
David Anderson
908183cf6f Merge. 2008-08-18 16:38:32 -07:00
David Anderson
0f46c5d568 Fixed some bugs in the AMD64 port, still crash in 5 sunspider tests. 2008-08-18 16:23:37 -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
David Anderson
938044313a Added AMD64 JIT building to the makefile. 2008-08-18 12:57:35 -07:00
Andreas Gal
199891edab Merge. 2008-08-18 12:55:09 -07:00
David Anderson
751ef6d2af Improved AMD64 nanojit compatibility. 2008-08-18 12:54:04 -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
d584e27cb8 Fixed compiling on AMD64. 2008-08-18 12:41:55 -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
Robert O'Callahan
5c0b889677 Backing out changeset 043ea4ef249c to try to fix failed mochitests on Windows and Linux 2008-08-26 01:06:15 +12:00
Ginn Chen
2b4f50f46f Bug 451504 js/src/jslock.cpp failed to compile on Solaris x86 r=igor 2008-08-25 19:01:30 +08:00
Igor Bukanov
7d91e81268 bug 450392 - fixing -Wstrict-aliasing warnings, r=crowder 2008-08-25 12:33:23 +02:00
Ted Mielczarek
69f1723ed2 bug 451678 - TM: mochi chrome tests fail under TM. xpcshell unit test. r=brendan 2008-08-23 18:12:42 -04:00
Brendan Eich
eddb7e1614 Remove over-eager gvar optimization for JSOP_DEFFUN (451678, r=shaver). 2008-08-22 18:11:47 -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
David Anderson
2c45d81524 Fixed recorder not aborting when leaving js_Execute (bug 450532). 2008-08-14 15:29:04 -07:00
Blake Kaplan
8440f739f0 Avoid the malloc altogether if we're going to use a unit string. 2008-08-14 15:19:57 -07:00
Vladimir Vukicevic
61a89af8e6 b=450176; trace parseInt and parseFloat; r=gal 2008-08-14 15:13:39 -07:00
Blake Kaplan
e0872c3629 bug 450641 - Add missing JS_free call. 2008-08-14 15:03:08 -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
d0056d1820 Assert on the recording table only if we have enabled the tracer (446551). 2008-08-14 09:04:22 -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
d6e6e333e2 Added bitsinbyte-ish testcase to trace-test.js. This currently still crashes the VM in nested mode. 2008-08-13 21:44:01 -07:00
Andreas Gal
2f533e6051 Merge. I miss CVS. 2008-08-13 21:37:33 -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
Brendan Eich
bb2a177553 LOL ANDR3AS SUX0RZ!!! 2008-08-13 19:24:40 -07:00
Brendan Eich
a0bf39bbaa MERGE LOL HG SUX0rz! 2008-08-13 19:23:56 -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
Brendan Eich
8efccf4d7d Abort recording if unwinding from js_Interpret to js_Invoke and still recording (this can happen via fun.call/.apply). Also assert in threaded interpreter BEGIN_CASE and DO_OP (from END_CASE) that we either have no recorder or are using the recordingJumpTable. 2008-08-13 19:22:07 -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
c0e640829a Added test case for nested exits. 2008-08-13 18:13:22 -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
Brendan Eich
fc782418ee Set rval_ins with initializing=true because nothing will get the callee, so the tracker won't have tracked it yet if it's in virgin stack. 2008-08-13 17:45:49 -07:00
David Anderson
3652f7c126 Fix from brendan for propertyIsEnumerable having an inconsistent return type. 2008-08-13 17:44:26 -07:00
Brendan Eich
880030b373 Forgot to string-tag before going from atom to jsid in two builtins. 2008-08-13 17:20:16 -07:00
Andreas Gal
eac5c3ed47 Merge. Lame. 2008-08-13 17:13:53 -07:00
Andreas Gal
201341cfc5 Add nestedExit to InterpState and comment its fields. 2008-08-13 17:12:55 -07:00
David Anderson
a9922db939 Merge. 2008-08-13 17:12:08 -07:00
David Anderson
4c7aaa248b Merge. 2008-08-13 17:11:22 -07:00
Brendan Eich
ca1e2a283a Fix prototype hit case in prop to advance obj and obj_ins up the proto chain. 2008-08-13 17:10:18 -07:00
David Anderson
fe66e966ca Fixed from brendan for counting disparity between nativeStackSlots and FORALL_SLOTS_IN_PENDING_FRAMES.
Added debug code to catch future disparities.
2008-08-13 17:09:16 -07:00
Andreas Gal
ee55743358 Don't print LeaveFrame debug info when falling out of the global frame. 2008-08-13 16:57:14 -07:00
Andreas Gal
9c95a20382 Merge. 2008-08-13 16:43:46 -07:00
Andreas Gal
e702dc5ac4 When re-importing register values after a tree call, make sure to use the inner tree's nativeStackBase, since we also use the inner tree's sp. 2008-08-13 16:29:59 -07:00
Brendan Eich
7fc14c40cf Fix bogus varval assert. 2008-08-13 16:14:22 -07:00
Andreas Gal
27c128f706 Merge. 2008-08-13 15:50:40 -07:00
Andreas Gal
e68f9ee859 Read back registers used by inner tree relative to inner_sp (the adjusted sp value). Print frames we enter into and return to in Enter/LeaveFrame. 2008-08-13 15:50:11 -07:00
Brendan Eich
3d21588b2c Major and winning overhaul to for-in codegen (mad props to Andreas for advice). 2008-08-13 14:02:35 -07:00
Andreas Gal
892137794b Don't call inner trees if they use global slots since we don't support those in inner trees yet. 2008-08-13 14:00:37 -07:00
Andreas Gal
1d809d7adf Merge. 2008-08-13 13:52:21 -07:00
Andreas Gal
fa09943222 Flexible call stack allocation with proper guarding for call stack overflows. 2008-08-13 13:51:59 -07:00
David Anderson
ff9bb9ea9d Fixed ifop predicting NaNs as true when they should be false. 2008-08-13 12:25:50 -07:00
Andreas Gal
76a2288dcc Assert on bogus always-exit guards. 2008-08-13 12:01:06 -07:00
David Anderson
b070351870 Fixed ExprFilter emitting corrupt LIR when reducing guards. 2008-08-13 11:11:37 -07:00
Andreas Gal
fa3085ca3d Merge. Nothing to see here. Move along. 2008-08-13 03:55:24 -07:00
Andreas Gal
5d7914a698 Blacklist a trace if we hit a global shape mismatch. This makes us suck less on date-format-tofte until we find a way to fix the property cache misses. 2008-08-13 03:54:54 -07:00
Andreas Gal
2a60d7a27b Only trash the tree, not the entire cash, on global shape mismatch. 2008-08-13 03:50:53 -07:00
Brendan Eich
ed5f8343a2 Fix deep for-in loop bug (450334). 2008-08-13 00:41:13 -07:00
Brendan Eich
9226769821 Add missingArgTest2 to cover the nativeStackOffset bug fixed recently. 2008-08-12 23:58:50 -07:00
Andreas Gal
335fb1edd8 Merge. 2008-08-12 23:31:12 -07:00
Andreas Gal
91e81a361d Don't cache loads in import into the nativeFrameTracker, since when coming back from a nested tree we re-load the frame state into registers using import() based on the called tree's state, which pushes loads into the nativeFrameTracker that are relative to the inner tree's call depth. Only cache on writes now, which should be always safe. 2008-08-12 23:30:49 -07:00
Brendan Eich
17a4dd5c46 Remove bogus assertion. 2008-08-12 23:30:38 -07:00
Andreas Gal
8af146d25b Merge. 2008-08-12 23:25:40 -07:00
Andreas Gal
a271a0ee0e When re-importing registers after a tree call, make sure to use the inner trees calldepth at its side exit, not the call depths of the calling tree. 2008-08-12 23:25:17 -07:00
Brendan Eich
452bea0c69 Fix missing argument stack offset computation (in both places: FORALL_FRAME_SLOTS and nativeStackOffset). Clear missing args in nativeFrameTracker. 2008-08-12 23:21:52 -07:00
Andreas Gal
58cd4dc419 Introduce a large fixed-size native frame stack and store its ceiling in state->eos. 2008-08-12 21:39:44 -07:00
Andreas Gal
3fd013cd9b Merge. 2008-08-12 20:19:05 -07:00
Andreas Gal
ed3125b915 Hands down the hardest bug I had to debug in TM so far. Make sure to read back any registers an inner tree might have changed before writing out the typemap for the nested_exit guard, otherwise we might be pointing to old stale pre-(inner-)loop state and pick an incorrect (in this case too narrow) type. fannkuch=2.8x with this. 2008-08-12 20:18:29 -07:00
Brendan Eich
967ec56341 - Add String match and three replace overloadings, and allow known native matching to continue in search of exact match (not best, and not abort on first mismatch).
- Add CallGetter built-in and use it for regexp class-getter-implemented prototype properties.
- Add BUILTIN5 support (this should be "it" ;-).
2008-08-12 18:52:28 -07:00
Andreas Gal
4ebf8a417d Merge. 2008-08-12 17:40:56 -07:00
Andreas Gal
95c7647b28 Add constvalp and isconstp to LIR instructions (nanojit). 2008-08-12 17:37:38 -07:00
Brendan Eich
48181da4e7 Use aobj consistently in test_property_cache (450317). 2008-08-12 17:21:32 -07:00
Andreas Gal
9ea4e8a477 Merge. 2008-08-12 16:57:55 -07:00
Andreas Gal
d56662f293 Enumerate missing argument slots on the caller's stack and initialize them to undefined (450304). 2008-08-12 16:51:55 -07:00
Brendan Eich
a4111eea56 Fix shapelessUnknownCalleeHelper. 2008-08-12 16:36:32 -07:00
Brendan Eich
0ceb399b55 Merge. 2008-08-12 16:35:11 -07:00
David Anderson
a8821cdfc6 Added NaN test case that fails when jitting; currently looking into why. 2008-08-12 15:45:06 -07:00
Brendan Eich
25fc093756 Fix annoying warnings, finally. 2008-08-12 14:50:42 -07:00
Andreas Gal
4b6c770288 Merge. 2008-08-12 14:29:09 -07:00
Andreas Gal
1819586877 js_obj_hasOwnProperty is supposed to return a boolean but was incorrectly generating code to return a number, resulting on a failure in the boolean comparison due to an unexpected i2f (450304). 2008-08-12 14:28:15 -07:00
David Anderson
f4b6e09a98 Merge. 2008-08-12 11:53:24 -07:00
David Anderson
c340cb93c0 Only use fastcall on x86. 2008-08-12 11:46:57 -07:00
Brendan Eich
64fa74acf5 More guard argument formatting. 2008-08-12 11:36:52 -07:00
David Anderson
5e75ec729a Merge. 2008-08-12 10:47:50 -07:00
David Anderson
40213894ff Fixed nanojit using a variable before it got set (verbosity mode only it seems). 2008-08-12 10:45:24 -07:00
shaver@mozilla.org
3e4452be3c fix !JS_TRACER build 2008-08-12 13:16:47 -04:00
shaver@mozilla.org
3f2af7e42d add way to explicitly disable tracer for easier testing 2008-08-12 13:16:30 -04:00
Brendan Eich
827b341985 Consolidate common name (global slot) addressing code. 2008-08-12 09:42:29 -07:00
Brendan Eich
26c7507913 Put trailing args on their own lines when they otherwise would seem to associate with a nested call in a previous arg position. 2008-08-12 09:27:54 -07:00
Brendan Eich
74c6d3ffe3 Merge, plus ((void)0) parens. 2008-08-12 09:23:38 -07:00
Brendan Eich
fd08308ba0 Fix goto over init whinage. 2008-08-12 09:18:19 -07:00
shaver@mozilla.org
41a6158c57 fix build for !JS_TRACER, both threaded and switch interps 2008-08-12 12:09:59 -04:00
shaver@mozilla.org
9d4a33a8c6 guard all of jstracer.h against non-tracer builds 2008-08-12 11:36:29 -04:00
shaver@mozilla.org
1813fb2fa7 NAMEINC, INCNAME, NAMEDEC, DECNAME 2008-08-12 11:33:40 -04:00
Andreas Gal
b94f5433e5 Merge. 2008-08-12 03:40:16 -07:00
Andreas Gal
b4f7639e6e Don't read type from typemap if we already have it in a local variable. 2008-08-12 02:00:05 -07:00
Andreas Gal
7e95e972d8 Don't re-record traces over and over in case of excessive type mismatches. Instead, blacklist the fragment and slowly back away from recording it. 2008-08-12 01:31:28 -07:00
Brendan Eich
8d77aad49c JSOP_FORNAME. 2008-08-12 01:06:02 -07:00
Brendan Eich
d2e6e9e641 Factor forInOp from JSOP_FORLOCAL, use it from JSOP_FORARG's recorder too; tighten up JSOP_SETNAME. 2008-08-12 00:34:43 -07:00
Brendan Eich
d491ed65d3 Fix some comments and tighten up assertions about block scope (mrbkap please look). 2008-08-11 23:45:40 -07:00
Brendan Eich
e90731a3b6 Comments for JSOP_{,STRICT}{EQ,NE} about the layering and constraints on evolution of the non-strict equality ops' recorders. 2008-08-11 23:44:43 -07:00
shaver@mozilla.org
cfc93a30d9 cmp over number and (string or bool or undefined) 2008-08-12 01:05:33 -04:00
shaver@mozilla.org
2553ace88f mistaken relanding, didn't track merges well enough 2008-08-12 00:41:23 -04:00
shaver@mozilla.org
2b16f54740 reland eb01b1d55d9b after the mismerge 2008-08-12 00:37:16 -04:00
shaver@mozilla.org
ba5a56aa89 reland 3ea1e1317707 after the mismerge 2008-08-12 00:36:25 -04:00
Brendan Eich
2cbfd79ea0 Restore lost shaver rev 0e50c89c476b -- how did that get lost? 2008-08-11 20:27:47 -07:00
Brendan Eich
daba5ef959 Dependent string test. 2008-08-11 20:26:04 -07:00
Brendan Eich
a63e9a65ba Merge, sigh. 2008-08-11 19:21:42 -07:00
Brendan Eich
bba0ea3906 Rename js_DestroyJIT to js_FinishJIT to match Init/Finish vs. New/Destroy naming scheme used elsewhere; use same #if conditions around #include jstracer.h as around code depending on it. 2008-08-11 19:17:30 -07:00
shaver@mozilla.org
16a7af3ef4 JSOP_EQ/NE for objects 2008-08-11 22:11:31 -04:00
Brendan Eich
0ab33d4bfd Argh, I hate hg. 2008-08-11 19:10:24 -07:00
Brendan Eich
9dd296d70a Merge, in the name of all that which does not suck\! 2008-08-11 18:53:21 -07:00
David Anderson
9ce9cb42b5 Merge. 2008-08-11 18:49:34 -07:00
David Anderson
9c0315ccf7 Fragmento lifetime is now associated with the thread/runtime instead of the context. 2008-08-11 18:47:22 -07:00
Brendan Eich
7fbc9732fd JSOP_LENGTH handles dependent strings now. 2008-08-11 18:41:06 -07:00
shaver@mozilla.org
6a35d8134e implement JSOP_ADD(str, num) 2008-08-11 21:32:26 -04:00
David Anderson
c0b377bb8b Fixed some explicit deallocation bugs that cropped up running in the browser. 2008-08-11 18:20:10 -07:00
Andreas Gal
ade8388ef5 Merge. 2008-08-11 18:03:31 -07:00
Andreas Gal
20318a6ce0 Trash tree if we see an obsolete treeinfo object on record. 2008-08-11 18:03:13 -07:00
Brendan Eich
5137a68ca5 Merge. 2008-08-11 17:54:59 -07:00
Andreas Gal
1f5ce03d99 Don't try to delete names if we are not building a DEBUG build. 2008-08-11 17:49:56 -07:00
Brendan Eich
d004346b52 Object.prototype.{hasOwnProperty,propertyIsEnumerable}. 2008-08-11 17:47:05 -07:00
Brendan Eich
9849ef7434 Handle multi-level property cache hits; put BRANCH_EXIT on its own line so it stands out as the third param to guard in ifop. 2008-08-11 17:40:26 -07:00
Brendan Eich
20ef6499d6 Make Print a fast native. 2008-08-11 16:19:55 -07:00
David Anderson
8e63b13307 Merge. 2008-08-11 16:15:01 -07:00
David Anderson
c5a85f7524 Merge. 2008-08-11 16:14:29 -07:00
Andreas Gal
b6bc18350b Support non-flat strings in Any_getelem and Any_setelem. 2008-08-11 16:12:52 -07:00
David Anderson
1b623f7d25 Added explicit deallocation (bug 443500, r=gal) 2008-08-11 16:01:21 -07:00
Andreas Gal
80ab94547d Remove obsolete Tests.cpp file. 2008-08-11 15:59:11 -07:00
Andreas Gal
020e68ab1e Remove default parameter for guard, specify MISMATCH_EXIT explicitly. 2008-08-11 15:40:04 -07:00
Andreas Gal
00e5631b45 Remove dead code, add a debug printf. 2008-08-11 15:23:37 -07:00
Andreas Gal
7bcf550b11 If we get a series of tree type mismatches, trash the tree (and all dependent trees in case of nesting.) 2008-08-11 15:16:34 -07:00
Brendan Eich
391f5513d4 Fix FastNewObject built-in to create dense array instance with its own map. 2008-08-11 15:03:32 -07:00
Brendan Eich
0280e606df Beware macro argument multiple expansion... 2008-08-11 14:44:22 -07:00
Brendan Eich
a2af1922f6 Merge. 2008-08-11 13:07:00 -07:00
Brendan Eich
40050a1e4d Try fixing LOAD_INTERRUPT_HANDLER based on Andreas's patch. 2008-08-11 13:05:28 -07:00
Brendan Eich
7e793185ea Match JSOP_NULLTHIS up to JSOP_NULL special cases in the decompiler. 2008-08-11 13:03:47 -07:00
Andreas Gal
120117749e Don't try to access the name of arguments beyond nargs (r=brendan). 2008-08-11 12:47:18 -07:00
Andreas Gal
285acf8b9c Merge. 2008-08-11 11:43:59 -07:00
Andreas Gal
a8e0893484 Avoid goto across initialization of sprop2 (446508). 2008-08-11 11:43:40 -07:00
Andreas Gal
ca11b2e069 Don't use asprintf (446508). 2008-08-11 11:37:35 -07:00
Brendan Eich
13cfac8f97 Rework GCF_DONT_BLOCK to be cx->gcDontBlock, assert it's set, set before entering trace and clear on exit. 2008-08-11 11:18:16 -07:00
Brendan Eich
a56862bdff Make js_ConcatStrings JS_FASTCALL and use directly as a built-in; remove gcflag param from it and from js_NewString. 2008-08-11 11:03:54 -07:00
Brendan Eich
40573b479e Unregress FastNewObject builtin to handle user-defined constructors (note to self: run tests before coffee...). 2008-08-11 10:41:08 -07:00
Brendan Eich
7967defc01 Fix ASSERT_VALID_PROPERTY_CACHE_HIT pcoff argument (my bad from 887fc4facdeb). 2008-08-11 10:40:24 -07:00
Brendan Eich
56fac8fe90 Back out extra gcflag param change (859b9a23adbf), I set bad precedent and will back out previous such shortly. Want cx->gcflags instead. 2008-08-11 10:33:23 -07:00
Brendan Eich
fced00a77b - Trace JSOP_NEWINIT/INITPROP/INITELEM/ENDINIT, which required extending the FastNewObject builtin to create a dense Array or a new Object (easy to discriminate on the constructor function's u.n.clasp member).
- Fix record_JSOP_SETELEM to avoid storing if a JSOP_POP that will be skipped follows.
2008-08-11 10:24:47 -07:00
shaver@mozilla.org
ee67ea9db4 extend js_NewObjectWithGivenProto to permit specifying additional new-thing flags (such as GCX_DONT_BLOCK) 2008-08-10 22:56:10 -04:00
Brendan Eich
0d83651633 - Skip dense array object, try prototype, in all JSOP_GET*PROP variants, interpreter and tracer.
- Test entry instead of retesting aobj->map->ops->getProperty == js_GetProperty in JSOP_CALLPROP.
- Handle object and null types as well as booleans in record_JSOP_NOT.
- Trivially implement JSOP_STRICT{EQ,NE} recording by forwarding to the non-strict record methods. This works so long as the latter trace only same-type operands and do no conversions.
2008-08-11 00:05:39 -07:00
Brendan Eich
43649cd01e Record JSOP_LOOKUPSWITCH. 2008-08-10 23:20:24 -07:00