Robert Sayre
443f738d12
Backed out changeset f682453c06d0. Failing scriptaculous unit tests, doesn't build on windows or mac ppc.
2008-12-11 20:43:32 -08:00
Brendan Eich
ece10ee8df
Bug 465460 - TM: valueOf ignored on third iteration of loop (r=gal).
2008-12-11 17:50:56 -08:00
Jeff Walden
6afac16038
Bug 465255 - Rewrite TraceRecorder::cmp, take five. (Three, sir!) Three! r=gal
2008-12-08 21:11:56 -08:00
Jason Orendorff
b7fb9bc849
Bug 460865 - Read barrier for cx->fp. r=mrbkap, r=dmandelin.
...
--HG--
extra : rebase_source : 19963188b2f9f96336ce6ca28dbaefccf3a639b7
2008-12-09 10:38:32 -06:00
Jeff Walden
e48c310d01
Dangit, why do the tests run correctly locally in small batches? Backing out bug 465255...
2008-12-08 22:19:54 -08:00
Jeff Walden
f143157358
Bug 465255 - Rewrite TraceRecorder::cmp, take two. r=gal
2008-12-08 21:11:56 -08:00
Jeff Walden
77eeb36575
Back out bug 465255, seems I was wrong about the compile error and warning being the only bugs.
2008-12-05 19:51:35 -08:00
Jeff Walden
6cb6d5d43b
Bug 465255 - Rewrite TraceRecorder::cmp. r=gal
2008-12-05 16:17:59 -08:00
Andreas Gal
3653f3cb56
Merge.
2008-12-04 18:14:17 -08:00
Andreas Gal
e367780a2f
Trace apply and call (462482, r=brendan).
2008-12-04 18:07:18 -08:00
Graydon Hoare
5a94caadef
Bug 454569 - Improve accuracy of tracemonkey's oracle, r=gal.
2008-11-24 14:53:27 -08:00
David Anderson
56fbffe8c4
Allow recorders to trash multiple trees on the way out (bug 466128, r=gal).
2008-11-21 15:31:59 -08:00
Brendan Eich
37c40ca7c0
Merge.
2008-11-17 16:29:40 -08:00
David Anderson
321ce0dc05
Deep abort recorders outer recorders if we need to flush the JIT cache early (bug 463829, r=brendan,gal).
2008-11-15 18:54:24 -06:00
Brendan Eich
bab1f697ee
Bug 464978 - TM: hang with "[] + null" (r=danderson).
2008-11-15 10:33:50 -08:00
Brendan Eich
cb47c4cf08
Bug 456511 - (imacros) TM: Make conversion work on arbitrary JSObjects (r=gal).
2008-11-13 00:30:20 -08:00
Andreas Gal
074d900a57
Backed out changeset a40f2117bcc0
2008-11-12 17:39:48 -08:00
Brendan
0ca607d76b
Add imacros to support conversion of arbitrary JSObjects (456511, r=gal).
2008-11-12 16:55:45 -08:00
Andreas Gal
55c5823950
Backed out changeset 594ec832d9a8
2008-11-07 18:19:35 -08:00
Andreas Gal
54ba19de70
Trace Function.apply and Function.call (462482, r=brendan).
2008-11-07 15:58:52 -08:00
Andreas Gal
43daeaca87
Don't spill type definitions in avmplus.h into the global namespace (462288, r=danderson).
2008-11-07 15:52:51 -08:00
Andreas Gal
e609f0bb95
Cleanup GuardRecord, SideExit, and InterpStruct and extract VM-dependant fields (463313, r=danderson).
2008-11-07 15:23:43 -08:00
Jason Orendorff
5fdc83f169
Bug 462459 - TM: Better tracer support for |new Array(...)|. r=gal.
2008-11-05 07:29:38 -06:00
David Anderson
158e7f3bb0
Don't cache pointer to recorder since it might change in js_MonitorRecording (462980, r=gal).
2008-11-03 20:57:50 -08:00
Boris Zbarsky
d1afdda41f
Bug 462184. Make INCLUDE_VERBOSE_OUTPUT actually work, and rename it to JS_JIT_SPEW. r=brendan
2008-10-29 21:56:35 -07:00
Brendan Eich
6ddc16bbe2
Bug 462103 - TM: We don't trace some variants of string + other type (gal+brendan red-headed stepchild).
2008-10-29 00:14:30 -07:00
Andreas Gal
7da6b31283
Handle dslots == NULL case when reading past the actual length of an array (461974, r=danderson).
2008-10-28 22:40:10 -07:00
Andreas Gal
25404443ff
GC no longer flushes the JIT cache. Instead just make sure the shape of the global object will mismatch next time we try to record or execute code, which in turn will force a flush of the code cache (458288, r=brendan/danderson).
2008-10-28 16:22:08 -07:00
Brendan Eich
bad1b50498
Re-land patch for bug 458851 now that latent bug it uncovered (not filed; see hg log) is fixed.
2008-10-28 14:04:29 -07:00
Jason Orendorff
37724bb378
Backed out changeset d4fe79372140 (bug 458851) due to persistent orange on TraceMonkey tinderboxes.
2008-10-28 10:49:06 -07:00
Brendan Eich
51f987553a
Bug 458851 - TM: for-in loops skip every other value in certain cases (r=gal/mrbkap).
2008-10-27 22:30:52 -07:00
David Anderson
bf1a78f4fe
Implemented multiple type specialized trees per entry point (bug 450833, r=gal)
2008-10-27 20:42:49 -07:00
Andreas Gal
06b393e8a2
Trace reading from dense arrays out of bounds and trace undefined -> number conversion in binary ops (461611, r=brendan).
2008-10-24 21:51:04 -07:00
David Anderson
590d3d2443
Fixed crash from JIT cache flushes when js_Interpret was holding TraceRecorders (bug 458288, r=brendan).
2008-10-24 10:47:59 -07:00
Andreas Gal
5cc94e1d59
Re-use loop exit side exit if we already have one for that PC location and the same type map (461076, r=danderson).
2008-10-22 16:27:25 -07:00
Andreas Gal
e2a6acb46a
Use LIR_loop for loop edge to avoid going into a side exit handler at every loop edge (461231, r=danderson).
2008-10-22 16:00:08 -07:00
Andreas Gal
ec7efc925c
Remove code to unlink trees to reduce the size of GuardRecord. Allow GuardRecords to share one common SideExit structure. The VM places both explicitly into the LIR (460538, r=danderson).
2008-10-21 17:50:32 -07:00
Graydon Hoare
bf84bf6273
Merge tamarin-redux (nanojit2) into tracemonkey (457786, r=edwsmith,gal,danderson).
2008-10-13 13:29:18 -07:00
Jason Orendorff
6b88d0da8d
Bug 459426 - Reunite record_JSOP_{NEW,CALL}. r=gal.
2008-10-13 11:04:26 -05:00
Andreas Gal
9bfc3c5072
Properly recover from a nested side exit with more than a single level of nesting (459539, r=danderson).
2008-10-12 15:39:32 -07:00
Andreas Gal
9a086f63ae
Don't carry around oldpc in AbortRecording path (459321, r=danderson).
2008-10-09 16:17:13 -07:00
Andreas Gal
c974289da5
Support thin loops (iteration < 2) by closing the loop even if we are on the last iteration (456431, r=danderson).
2008-10-08 21:02:04 -07:00
Andreas Gal
fb350afe17
Non-fused ifs emit different comparison code than the interpreter uses (459151, r=danderson).
2008-10-08 16:23:54 -07:00
Jason Orendorff
a27d101dab
Bug 458735 - Improve internal API for traceable natives (r=brendan, nanojit r=edwsmith)
2008-10-08 17:08:33 -05:00
Andreas Gal
1b0fd40e30
Trace push and pop for dense and sparse arrays (453734, r=brendan).
2008-10-07 11:00:16 -07:00
Brendan Eich
f875d89fa2
Bug 456810 - TM: Crash on digg.com with adblock plus [@ ReconstructPCStack] (r=gal).
2008-09-25 15:04:48 -07:00
Andreas Gal
5b117e1c3f
Rewrite and cleanup GETELEM and SETELEM (455748, r=brendan).
2008-09-25 11:31:40 -07:00
Andreas Gal
f1cdf0fd1c
Make sure JSOP_DEFLOCALFUN pushes the right function object (456470, r=brendan).
2008-09-24 19:31:51 -07:00
Andreas Gal
619234db4c
Back out attempt to invoke natives that return a boxed value (namely push and pop, 453734).
2008-09-24 15:18:19 -07:00
David Anderson
ccd5e825b9
Fixed jstracer's operator delete leaking out into other shared libraries (bug 452721, r=gal).
2008-09-23 18:12:53 -07:00
David Anderson
b3141a864c
Fix where recording could crash if globalObj->dslots got reallocated (bug 451137, bug 455137, r=gal).
2008-09-23 13:29:41 -07:00
Andreas Gal
df641c58e5
Compilation fixes for DISABLE_JIT=1 (r=danderson).
2008-09-22 13:04:47 -07:00
Andreas Gal
9d7afa336a
Add support for fast native that return jsval and wire up push/pop (453734, r=mrbkap).
2008-09-18 16:53:09 -07:00
Andreas Gal
708f08ca9c
Properly handle side exits in scripted constructors (originally mrbkap, r=brendan, 453462).
2008-09-18 14:13:37 -07:00
Andreas Gal
f074cc7a9f
Cleanup and unify comparison code (455811, r=danderson).
2008-09-18 13:31:26 -07:00
Andreas Gal
a580bcd185
Implement comparison of numbers against null (455293, r=brendan,danderson).
2008-09-15 15:30:06 -07:00
Brendan Eich
a834957775
TraceRecorder::record_SetPropMiss mis-layered on top of record_SetPropHit (454689, r=mrbkap).
2008-09-11 15:53:00 -07:00
Benjamin Smedberg
b7c5804c10
Merge backout of the old patch for bug 453388 - we can statically allocate Oracle again, now that we're linking using the C++ linker magic, r=crowder
2008-09-10 15:38:28 -04:00
Benjamin Smedberg
bfeb170706
Merge backouts of bug 453388 - using g++ to link libjs.so means we can have static classes
2008-09-10 15:27:17 -04:00
Benjamin Smedberg
e780e5e3ea
Backed out changeset e2614011f194 - Bug 453388 - the better solution is to allow static objects and link libjs.so with g++ so that _init and _fini run static constructors/destructors correctly backout r=crowder
2008-09-10 15:20:01 -04:00
Brendan Eich
ce15bc7cd3
Bug 454039 - TM: don't abort TraceRecorder::record_JSOP_SETPROP on cache miss (r=mrbkap).
2008-09-09 22:22:52 -07:00
Brendan Eich
7d5c49516c
Back out patch for bug 454039.
2008-09-09 16:55:07 -07:00
Brendan Eich
c7b40d9f99
Bug 454039 - TM: don't abort TraceRecorder::record_JSOP_SETPROP on cache miss (r=mrbkap).
2008-09-09 16:05:04 -07:00
David Anderson
cd9032e6fe
Fixed Linux build, extra qualification on member function.
2008-09-09 13:20:44 -07:00
Andreas Gal
6a76d26107
Extract the snapshot code for a single slot into determineSlotType() und use that method in snapshot().
2008-09-09 15:06:23 +02:00
Brendan Eich
fc936fa1da
Checkpoint arguments tour-de-force (453730).
2008-09-05 18:29:08 -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
420e72ed85
b=449526, TM: fix up ARM code generation / softfloat
2008-09-02 22:29:23 -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
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
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
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
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
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
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
4fb4d1fdc5
Monitor downward branches only during recording (452709).
2008-08-28 22:33:22 -07:00
Andreas Gal
c0e0852952
Notify the monitor of all branches, not just backwards branches.
2008-08-28 17:00:52 -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
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
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
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
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
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
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
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
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
fdb661bd5e
Clear the oracle on every GC.
2008-08-20 16:01:56 -07:00
Andreas Gal
98f67af6d0
Add a way to clear the oracle.
2008-08-20 15:18:43 -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
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
4ee5ead209
Improved debug output.
2008-08-19 22:59:08 -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
Andreas Gal
454c89d72b
Support multiple fragments with different entry maps per PC location.
2008-08-19 20:30:16 -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
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
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