Commit Graph

2612 Commits

Author SHA1 Message Date
Andreas Gal
c466258c18 Limit tree growth to 16 traces per tree to avoid code explosion due to tail duplication (452869, r=danderson). 2008-09-02 23:52:11 -07:00
Andreas Gal
78b5b7fc05 Merge. 2008-09-02 23:11:51 -07:00
Andreas Gal
59b5581857 Add V8 benchmark suite. 2008-09-02 23:11:15 -07:00
Brendan Eich
3cd36a3b5f Fix JS_THREADSAFE build, pick extern nit. 2008-09-02 23:00:23 -07:00
Vladimir Vukicevic
dfd7f72c0a Fix up some ifdefs and debug printfs 2008-09-02 22:42:25 -07:00
Vladimir Vukicevic
a4ec50d569 Add VFP for floating point ops to nanojit ARM backend. 2008-09-02 22:29:23 -07:00
Vladimir Vukicevic
628b27d198 Indentation sanity fixes; no code changes. 2008-09-02 22:29:23 -07:00
Vladimir Vukicevic
2a520bab9f Split NativeThumb.cpp into NativeThumb.cpp and NativeARM.cpp; no code changes. 2008-09-02 22:29:23 -07:00
Vladimir Vukicevic
420e72ed85 b=449526, TM: fix up ARM code generation / softfloat 2008-09-02 22:29:23 -07:00
Brendan Eich
e3916b316d Teach js_IsLoopExit about JSOP_AND, JSOP_OR, etc. and separate extended jump cases so they can get the extended offsets. 2008-09-02 22:29:06 -07:00
Blake Kaplan
3d517dff43 Remove outdated comment. r=gal 2008-09-02 22:18:57 -07:00
Andreas Gal
f91071f139 Allocate the oracle dynamically instead of making it a global object to avoid atexit C compatibility issues (453388, r=danderson). 2008-09-02 21:56:22 -07:00
Taras Glek
b9b82a2bc3 bug 443286: avoid hidden return in CHECK_AND_SET_JUMP_OFFSET. r=igor 2008-09-02 20:50:19 -07:00
Brendan Eich
48926ba363 Fix bool FASTCALL vs. Nanojit calling convention bug, also some non-bool whoppers caught in the process (453361, r=mrbkap). 2008-09-02 15:37:22 -07:00
Brendan Eich
743793bc50 Fix warning pulled over from m-c (mrbkap will track down). 2008-09-02 15:30:42 -07:00
David Anderson
be89898254 Merge with mozilla-central. 2008-09-02 14:17:19 -07:00
Blake Kaplan
8f80eec070 Don't flush anything if we're not even enabled. r=gal 2008-09-02 14:02:13 -07:00
Taras Glek
c8962c44c2 bug 441362: Avoid an invisible return. r=igor 2008-09-02 13:32:27 -07:00
David Anderson
0af468fa80 Fixed accidental debugging change I pushed with changeset de2d26b3c902. 2008-09-02 12:36:23 -07:00
Ginn Chen
76f8dc0daf On x86 compilers without fastcall, simulate it when invoking traces and un-simulate it when invoking builtins (bug 452390, r=dvander). 2008-09-02 11:43:55 -07:00
David Anderson
ceb2e8139c Build fixes for MSVC 7.1 and mingw (bug 451881, patch from neil@parkwaycc.co.uk). 2008-09-02 10:28:14 -07:00
David Anderson
b6b115b496 Fix for building on FreeBSD (bug 452315, patch from Jeremy Lea). 2008-09-02 10:21:41 -07:00
David Anderson
1be49b5c2e Use mmap() instead of valloc() in nanojit, abort on mprotect() failure (bug 451946, patch+r from Asko Tontti). 2008-09-02 10:15:26 -07:00
Andreas Gal
1d525db0e4 New attempt at fixing 453235. If building without JIT (like PPC/MacOSX), don't include the deep abort calls in jsinterp.cpp 2008-09-01 18:40:45 -07:00
Andreas Gal
1632042ed8 Merge. 2008-09-01 18:37:27 -07:00
Andreas Gal
4a36a6b709 Backed out changeset 25f856429db3. Wrong fix. Looks like jstracer.h is not included. We in fact can call methods of TraceRecorder directly. Sigh. I wish we had a try server. 2008-09-01 18:37:04 -07:00
Andreas Gal
d85543063d Merge. 2008-09-01 18:33:05 -07:00
Andreas Gal
fe70cfea9b Introduce js_DeepAbort to be used from jsinterp.cpp, instead of trying to call TraceRecorder->deepAbort directly (453235). 2008-09-01 18:32:41 -07:00
Brendan Eich
b3042b928d Holey single-element dense array has null dslots, requires nulld defense (453173). 2008-09-01 13:59:30 -07:00
Brendan Eich
cda5a77a1b Fast followup fix for unintended change to 'f' prefix handling in TraceRecorder::record_JSOP_NEW (452878). 2008-09-01 01:44:26 -07:00
Brendan Eich
5a8cb06838 Kind of an Array initialiser tour-de-force for bug 452878:
1. Split FastNewArray from FastNewObject built-in for greater speed/specialization and further splitting into Array_1str, etc.
2. Add Array_1str, Array_2obj, and Array_3num builtins for benchmarked new Array(...) constructions.
3. Export ARRAY_SET_DENSE_LENGTH and ARRAY_GROWBY via jsarray.h to jstracer.cpp.
4. Tweaked SetArrayElement to make common/best case code be the predicted/prefetched path.
5. js_MakeArraySlow now preserves the pre-slow length in JSSLOT_ARRAY_COUTN as a jsval-tagged int if possible -- this will help the tracer avoid aborting on dense arrays that turned slow but not sparse by addition of a named property.
6. Export js_fun_apply and js_Object from their respective .cpp files, in these cases just to jstracer.cpp via local prototypes (no .h files involved).
7. More INS_CONSTPTR and INS_CONST macrology for better names in trace debug spew.
8. Fix TraceRecorder::test_property_cache to avoid aborting on JSOP_SETNAME that creates a new global, by setting it to undefined so it can be lazily imported. This helps 3d-raytrace.js, which has an unintended global loop control variable in a function.
9. JSTraceableNative loses its premature-deadwood tclasp member (my bad).
10. TraceRecorder::record_JSOP_NEW() handles 'new Object' now along with the 'new Array' variations. I also cut down the copy-paste code from JSOP_CALL's record method to mostly what is needed now.
11. Add KNOWN_NATIVE_DECL macro for concise prototype of library-private js_* native functions, and alphabetized the lists (too long for any other order to be winning).
12. Big honking special case for foo.apply(obj, [str]), which we can generalize as needed. Helps string-tagcloud.js. What's cool is how tracing allows us to rewrite this to foo(str) with this set to obj, eliminating the Function.prototype.apply. This requires some rewriting in JSOP_ENDINIT's record method.
2008-09-01 01:24:58 -07:00
Robert Sayre
7cca7713be Add tests containing switch statements 2008-08-30 19:35:38 -04:00
Robert Sayre
52a7fb0b98 Add test for more bitwise ops 2008-08-30 19:20:54 -04:00
Jesse Ruderman
1b5148d940 Bug 452905 - Make js_RecordTree printfs only appear with TRACEMONKEY=verbose. r=gal 2008-08-30 02:21:00 -07:00
Brendan Eich
c7604aac4c - Support JSOP_CONDSWITCH's JSOP_CASE and extended-jump-offset JSOP_CASEX variants properly.
- Fix sleep-deprived constant conditions due to failure to test flags & CMP_TRY_BRANCH_AFTER_COND!
- Use new TraceRecorder::fuseIf that Andreas added in a few more places where the previous try-branch-after-cond logic was open-coded.
2008-08-30 00:01:59 -07:00
Blake Kaplan
2782b3de85 Fix gmail crash by not tracing switches. r=brendan 2008-08-29 19:01:00 -07:00
Blake Kaplan
219161a0aa Abort (deeply) if we re-enter js_Interpret in the middle of a trace. r=brendan 2008-08-29 18:59:21 -07:00
Andreas Gal
ea15fc19ef Fixed an signed/unsigned comparison warning in an assert in jstracer.cpp. 2008-08-29 17:54:39 -07:00
Andreas Gal
33c4a8e742 Merge. 2008-08-29 17:35:34 -07:00
Andreas Gal
113ad8babe Add builtins for toLowerCase, toUpperCase and replace(str,str) (452885, r=mrbkap). 2008-08-29 17:35:00 -07:00
Brendan Eich
45ea54d2d1 Don't let GC run when recording. 2008-08-29 16:04:54 -07:00
Blake Kaplan
ee86ee3cf1 Bug 452329 - Fix a bad assumption. r=brendan 2008-08-29 16:03:18 -07:00
Blake Kaplan
48fb3e7f94 Bug 452875 - Ensure we intern the id for JSOP_IN. r=brendan 2008-08-29 15:59:09 -07:00
David Anderson
7515a0583e Merge. 2008-08-29 15:38:05 -07:00
David Anderson
f720beb914 Fixed double-as-integer check not handling negative zero (bug 452170, r=gal). 2008-08-29 15:37:37 -07:00
Andreas Gal
f29178e950 Track number of breaks we generate loop exits for. 2008-08-29 15:29:55 -07:00
Andreas Gal
1e41ca88af Long-form conditional branches (IFEQX, IFNEX) are never fused, so don't check for them in fuseIf. 2008-08-29 15:20:36 -07:00
Andreas Gal
57a8fae3d1 Merge. 2008-08-29 15:17:20 -07:00
Andreas Gal
9e7246a2b9 Track locations of control-flow merges in cfgMerges during recording (452869). 2008-08-29 15:12:17 -07:00
David Anderson
a2fdc866ff Fixed assumptions that nanojit's insCall() would not clobber the input argument array (bug 452853, r=gal). 2008-08-29 14:22:21 -07:00
David Anderson
f10bd19c8e Abort recording on invalid string indexes for JSOP_GETELEM (bug 452713, r=brendan). 2008-08-29 13:05:41 -07:00
Robert Sayre
f35adba372 Add tests covering division. 2008-08-29 13:04:08 -04:00
Robert Sayre
5d1f73ba74 Add tests for continue statement. 2008-08-29 11:01:56 -04:00
Brendan Eich
f92de94117 Fix bogus JOF_VARPROP test; fix uninitialized id in JSOP_IN recorder, should have caught it when I reviewed danderson's patch. 2008-08-29 00:58:10 -07:00
Brendan Eich
18d5749230 Fix upvar decompilation for eval-from-fun case (452441, r=igor). 2008-08-29 00:24:11 -07:00
Brendan Eich
655888f31e Consolidate equal and cmp code harder, trace switch ops, use INS_CONST more (bug to be filed -- bugzilla down atm). 2008-08-28 23:50:48 -07:00
Andreas Gal
1115d0162b Unroll loops we were not able to call once, but only if we don't have a tree available for that loop header. 2008-08-28 23:19:23 -07:00
Andreas Gal
535bdef3ee Merge. 2008-08-28 22:34:14 -07:00
Andreas Gal
c263b7a218 Merge. 2008-08-28 22:33:45 -07:00
David Anderson
951c95658a Fixed trying to record JSOP_IN with some unusuable left-hand values (bug 452724, r=brendan). 2008-08-28 22:33:32 -07:00
Andreas Gal
4fb4d1fdc5 Monitor downward branches only during recording (452709). 2008-08-28 22:33:22 -07:00
Brendan Eich
1f07d79c75 Abort trace if forInLoop values are not stable; currently, not strings (bug 452703). 2008-08-28 21:41:15 -07:00
Brendan Eich
25a591f870 Fixed bogus assertion in test_property_cache (bug 452693, r=dvander). 2008-08-28 21:15:39 -07:00
Jesse Ruderman
5663d9166a Turn NANO_DIE macro into NanoAssertFail function so that it shows up in stack traces. Having it appear in stack traces makes it clear the exit was due to an assertion failure rather than a real crash. Followup to bug 452674. 2008-08-28 19:07:49 -07:00
Andreas Gal
aaf46f467e Merge. 2008-08-28 17:47:11 -07:00
Andreas Gal
f10a08c384 Cleanup detection of gotos that were emitted as a result of a BREAK statement. 2008-08-28 17:46:25 -07:00
David Anderson
6ab07e371a Merge. 2008-08-28 17:28:36 -07:00
David Anderson
d5e48e84d7 Added descriptive messages to always-taken assertions in Nativei386.cpp. 2008-08-28 17:27:29 -07:00
Jesse Ruderman
db3a854298 Fix NanoAssertMsgf in non-debug builds. Regression from my patch in bug 452674. 2008-08-28 17:15:51 -07:00
Andreas Gal
65bc53f864 Merge. 2008-08-28 17:01:22 -07:00
Andreas Gal
c0e0852952 Notify the monitor of all branches, not just backwards branches. 2008-08-28 17:00:52 -07:00
Jesse Ruderman
67955c4c42 Add a message to a NanoAssert(0) to make it possible to match against. r=gal 2008-08-28 17:00:52 -07:00
Jesse Ruderman
12aa1d345a Bug 452674: change NanoAssert* macros to make it easier to check for nanojit assertions in automated testing. r=danderson. 2008-08-28 16:57:49 -07:00
Blake Kaplan
977123733e Bug 452338 - Abort on the weird case where we find a global name on the prototype of the scope chain. r=brendan 2008-08-28 16:37:03 -07:00
Andreas Gal
c274daed5c Merge. 2008-08-28 14:51:16 -07:00
David Anderson
1b50da7117 Abort recording on JSOP_INCPROP with an invalid slot (bug 452336, r=brendan). 2008-08-28 14:43:44 -07:00
Andreas Gal
453ea3339f If the inner tree cannot be adjusted to match the call site of the outer tree because it uses an int where the outer tree uses a double, trash the inner tree, not the outer one. In CallTree, return the innermost guard we return from, not the outermost one. Jump over at most 1 loop edge that doesn't go back to our own header, not an arbitrary amount. 2008-08-28 14:24:58 -07:00
David Anderson
48fe80af99 Merge. 2008-08-28 13:15:34 -07:00
David Anderson
eb051d8c73 Better fix for bug 451666 - only track new rval for primitives (r=brendan). 2008-08-28 13:14:59 -07:00
Blake Kaplan
1006bbf99c Bug 452333 - Don't push tagged jsvals on the stack. r=brendan 2008-08-28 12:40:48 -07:00
David Anderson
d7c4af1e0c Merge. 2008-08-28 11:56:45 -07:00
David Anderson
d7b5791be9 Track new rval from JSOP_RETURN when constructing inline frames (same as JSOP_STOP). 2008-08-28 11:55:58 -07:00
Blake Kaplan
2bcc0a39b5 Bug 452573 - The interpreter's JSOP_VOID doesn't push anything, so we shouldn't expect it to. r=brendan 2008-08-28 11:55:27 -07:00
Igor Bukanov
228d70e09b backing out bug 446386 due to unit test failures 2008-09-02 09:27:10 +02:00
Simon Bünzli
0b40c8a49f Bug 450633 - "script stack space quota is exhausted" exception in JSON.jsm when calling SessionStore API for sessions with a large amount of data. r=sayrer, sr=brendan 2008-09-02 08:36:15 +02:00
Igor Bukanov
9022efe160 bug 449494 - uniform handling of bytecodes with variable stack uses. r=mrbkap,brendan 2008-09-02 08:25:15 +02:00
Igor Bukanov
4509b7601e bug 446386 - removal of the compiler pseud-frames. r=brendan,mrbkap 2008-09-02 08:10:26 +02:00
Leon Sha
621a72d75c Bug 429105 [Solaris] Failed to build mozilla-central on solaris in js module. brendan: review+ 2008-09-02 10:03:18 +08:00
Boris Zbarsky
33c006bc1b Fix orange caused by bug 407216 2008-09-01 13:40:16 -04:00
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