Commit Graph

389 Commits

Author SHA1 Message Date
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
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
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
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
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
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
fa09943222 Flexible call stack allocation with proper guarding for call stack overflows. 2008-08-13 13:51:59 -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
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
Brendan Eich
827b341985 Consolidate common name (global slot) addressing code. 2008-08-12 09:42:29 -07:00
Brendan Eich
fd08308ba0 Fix goto over init whinage. 2008-08-12 09:18:19 -07: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
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
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
David Anderson
9c0315ccf7 Fragmento lifetime is now associated with the thread/runtime instead of the context. 2008-08-11 18:47:22 -07:00
David Anderson
c5a85f7524 Merge. 2008-08-11 16:14:29 -07:00
David Anderson
1b623f7d25 Added explicit deallocation (bug 443500, r=gal) 2008-08-11 16:01:21 -07:00
Andreas Gal
020e68ab1e Remove default parameter for guard, specify MISMATCH_EXIT explicitly. 2008-08-11 15:40:04 -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
Andreas Gal
120117749e Don't try to access the name of arguments beyond nargs (r=brendan). 2008-08-11 12:47:18 -07:00
Brendan Eich
64fc3b0367 - Fix shapeless callee guarding to guard on function object value.
- Add JSOP_NULLTHIS to help the tracer guard shapeless callees (see trace-tests.js)
- Culled bogus record_JSOP_CALLGVAR left-over forwarding to record_JSOP_GETGVAR.
- Better shapeless callee tests.
2008-08-10 22:36:48 -07:00
Brendan Eich
e5b0039eaa Match native map guard specializations in tracer to interpreter, particularly to skip up the proto chain from a dense array in JSOP_CALLPROP (json2.js showed an abort here, pointing to the tracer/interpreter discrepancy). 2008-08-10 11:54:27 -07:00
Brendan Eich
18248a701c Fix JSOP_FORLOCAL to push false when guarded conditions are false while recording (449961). 2008-08-10 10:42:21 -07:00
Brendan Eich
f028f26f52 Merge. 2008-08-08 16:40:45 -07:00
Brendan Eich
072c7b59a5 Guard against shapeless callees, with tests (more to do here, can't break the unknown callee case yet, but it should be breakable). 2008-08-08 16:37:01 -07:00
Andreas Gal
c7be42f2f3 Add very preliminary nesting for trees. This is disabled by default. To enable set TRACEMONKEY=nesting in the environment. 2008-08-08 15:26:31 -07:00
Brendan Eich
de40e589da Merge. 2008-08-08 14:45:27 -07:00
Brendan Eich
153e03bb32 Get operator new on interpreted functions working, along with JSOP_SETPROP on an unmutated object, or one of the right shape but where the setprop is adding the next property, and it's not in the object yet. 2008-08-08 14:38:44 -07:00
Andreas Gal
f2972efa5c Remove tracking of outer trees and merging of globals since globals will be maintained centrally soon, not attached to trees. 2008-08-07 19:40:41 -07:00
Andreas Gal
2d0c9c41ab Hand the script in when updating the oracle regarding global variable slots even if we don't use it right now. This will be useful for caching information across runtimes. 2008-08-07 17:43:13 -07:00
Andreas Gal
3ac96b066b Use a typedef SlotList instead of Queue<uint16>. 2008-08-07 17:22:21 -07:00
Andreas Gal
a21818bc72 Teach typemaps how to capture the types of all slots in a slot list. 2008-08-07 17:20:49 -07:00
Andreas Gal
d988d3523a Recognize loop edges that hit a nested tree. 2008-08-07 16:41:20 -07:00
Andreas Gal
600b9c3e14 Remove type-map hash code. A direct memcmp seems to be faster (probably some SSE magic behind it in gcc/glibc). 2008-08-07 16:26:56 -07:00
Andreas Gal
27e8ef817a Factor out the code to capture the current stack type map and move around the type map method implementations to make sure they can see the FORALL macros. 2008-08-07 16:23:50 -07:00
Andreas Gal
95f5262e4f Use an oracle to predict when slots are demotable. This allows trashing the TreeInfo* object in the root fragment more aggressively. Rebuild the stack type map at every compile to avert type map mismatches. Purge all global slot info when we re-record a tree. 2008-08-07 15:28:43 -07:00
Andreas Gal
e09041e2a5 If we run into an error during compilation, blacklist that fragment. If we run out of memory, flush the cache. 2008-08-06 22:26:20 -07:00
Andreas Gal
9385e7842c Add a helper to flush the JIT code cache (and the fragment lookup quick cache). On a global shape mismatch trash the entire cache (might be a bit overly aggressive). Similary, during GC flush the code cache. 2008-08-06 21:56:25 -07:00
Andreas Gal
d1a1a76121 Tracker outer trees for every tree and merge globals of inner trees into all outer trees as we register inner trees with outer trees. 2008-08-06 19:25:24 -07:00
Andreas Gal
6bb6800be5 Add a contains method to Queue. 2008-08-06 19:06:37 -07:00
Andreas Gal
1bf2697257 Add a helper to emit a tree-call into the currently recording trace. 2008-08-06 16:24:29 -07:00
Andreas Gal
fcaab6d007 Pull recompile flag out of the state and pass in as argument. Trash the tree if a secondary trace can't be connected to the loop header. This is very aggressive and might need more tinkering. Trashing the tree on every mismatch doesn't seem to work well, so thats currently disabled. 2008-08-06 13:37:29 -07:00
Brendan Eich
2cfdd9a55a 1. Don't store thisp literally in state.rp, get it from argv[-1]. 2. Fix DEBUG localNames code. 2008-08-01 10:40:38 -07:00
Brendan Eich
422ce674b5 Remove synthesizeFrames private declaration -- js_SynthesizeFrames is a static helper now. 2008-08-01 08:39:44 -07:00
Brendan Eich
8f837e0784 - Implement interpreter frame reconstruction (js_SynthesizeFrame).
- Fix MONITOR_BRANCH to restore frame-dependent interpreter locals (we want fewer of these if they can be removed with no perf loss).
- Fix FORALL_SLOTS_IN_PENDING_FRAMES not to scan argv in callee when it has scanned operand stack in caller.
- Fix import to take the localFrame from whose fun its localNames parameter was computed -- it was using cx->fp which is wrong when FORALL_SLOTS_IN_PENDING_FRAMES iterates other than the top of stack frame.
- A few interval tests that were double-ended are single-ended now.
- Add call.js mini-test (more cases needed).
2008-08-01 08:26:32 -07:00
Andreas Gal
4eba8e4012 Remove entryStackDepth. Calculate sp_adj relative to entryNativeStackSlots. 2008-08-01 02:33:54 -07:00
Andreas Gal
dd3ebd2cfe Make synthesizeFrame private. 2008-07-31 16:30:00 -07:00
shaver@mozilla.org
d200eb863e merge backout of d24e6005ee4c to fix the world 2008-07-31 06:36:53 -07:00
shaver@mozilla.org
f2c0c93637 Backed out changeset d24e6005ee4c (causing major array-fail). 2008-07-31 06:35:11 -07:00
Andreas Gal
e5a87ade9f Merge. 2008-07-31 01:35:56 -07:00
Andreas Gal
6f4cfc2628 Remove ANY_TYPE and move debug printf around to print entry point even if we can't enter due to type mismatch. 2008-07-31 01:35:18 -07:00
shaver@mozilla.org
a3bc7296d9 Make guard return expected, so we can trace alternate cases easily.
Better diagnostic for non-global scope chain head.
2008-07-30 22:59:13 -07:00
Brendan Eich
fe3a6127c5 - Export JSSLOT_ITER_* from jsiter.cpp to jsiter.h, for jstracer.cpp to use.
- Fix OBJ_GET_SLOT to be STOBJ_GET_SLOT in jsiter.cpp, no thread safety here (bug on file).
- Move JSNativeEnumerator from jsobj.cpp to jsobj.h for jstracer.cpp as well.
- Rename JOF_2BYTE JOF_UINT8 for consistency, and actually decompile it.
- Trace JSOP_FORVAR (can't do anything in JSOP_ITER, it comes before the loop).
- Shortened some guardMyLongSummerVacationWithinBounds names ;-).
- Removed/refactored to avoid dslots_ins obligation on all callers.
2008-07-30 16:32:33 -07:00
Andreas Gal
40696cff65 Note to self: hacking after 4am is detrimental to my spelling. 2008-07-30 04:20:48 -07:00
Andreas Gal
f1a5494d05 Major shakeup of the interning code for globals. Globals are now detected on demand as they are used and the slots are noted in treeInfo->globalSlots. At the same time the type is recorded in treeInfo->globalTypeMap. The stack type-map is maintained separately in treeInfo->stackTypeMap. All these structures are lists and are maintained as List<T> objects. Imports for globals can appear at the top (if we have already seen some imports for the loop header and are recompiling), or on the fly for lazily found values. We no longer intern all global properties that happen to match a name in the current function, and we also support inlining of functions that touch globals that are not used in the method where the trace started in. 2008-07-30 04:17:22 -07:00
Andreas Gal
7290f281a0 Use List<T> to maintain global slot list in TreeInfo. 2008-07-30 01:38:21 -07:00
Andreas Gal
f60c785137 Add a generic list data structure and fix side exit handling to always pick the right typemap to work with (exit map, not entry map). 2008-07-29 23:48:39 -07:00
Andreas Gal
79fa051958 Removed unused field from TreeInfo. 2008-07-29 17:14:36 -07:00
Andreas Gal
4d5b44839c Rename gslots to globalSlots. 2008-07-29 15:28:23 -07:00
Andreas Gal
5a7ac301e6 Limit tree growth to side exits that expicitly declare that they want to be grown. 2008-07-29 11:13:41 -07:00
Brendan Eich
3e4d484622 Fix synthesizeFrame parameterization, and have it reconstruct stack depth; warning and space fixes. 2008-07-28 23:47:20 -07:00
shaver@mozilla.org
9c4c8495f9 not-yet-working beginnings of frame reconstruction 2008-07-28 09:05:55 -04:00
Andreas Gal
6126f5fa5c 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
a3eb60b77e Add limited outerlining. Much of this will be subsumed by nested trees. 2008-07-27 14:28:56 -07:00
Andreas Gal
ca563057ee Remove guardCount. No longer needed. 2008-07-27 12:05:01 -07:00
Andreas Gal
8a7bb9c550 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
Andreas Gal
812989bb8a 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
1b7930d39d 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
Andreas Gal
dee805421b Factor out AttemptToGrowTree. 2008-07-25 02:00:02 -07:00
Andreas Gal
f3573b9940 Move trace activation code into js_ExecuteTree(). 2008-07-25 01:20:40 -07:00
Andreas Gal
e838b138b8 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
6df91a21a0 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
41e0593392 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
5dd9876515 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
Andreas Gal
c9cac5757f Handle leaving of frames in one central place. 2008-07-22 20:16:12 -07:00
Andreas Gal
06365155c2 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
48b195e651 Avoid nativeFrameOffset calls in import(). 2008-07-22 17:24:29 -07:00
Andreas Gal
410c0b9a98 Eliminate entryFrame pointer (not safe to carry that around.) 2008-07-21 16:20:53 -07:00
Andreas Gal
f1ef7f0175 Eliminate exit filter, write the type map directly in snapshot. 2008-07-21 15:09:19 -07:00
Andreas Gal
bce8e13528 Remove excess parameters of verifyTypeStability. 2008-07-21 13:21:00 -07:00
Andreas Gal
a0cd046167 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
124244af4b beginning of entryFrame removal 2008-07-21 15:57:02 -04:00
Andreas Gal
5067fc2638 Merge. 2008-07-21 12:44:03 -07:00
Andreas Gal
e9b2918575 Rename VMFragmentInfo to TreeInfo. 2008-07-21 12:41:43 -07:00
shaver@mozilla.org
7546f723f5 force Math to be interned, and defend against non-interned globals until upvar saves us all 2008-07-20 17:23:39 -04:00
shaver@mozilla.org
ed1d0a8953 improve tracing/recording diagnostics 2008-07-20 15:42:19 -04:00
shaver@mozilla.org
ef2e8305dc Avoid tracking object properties, make incElem work. 2008-07-19 10:24:10 -07:00
Brendan Eich
a26be1bd4b Fix incProp to box and store (incElem still todo). 2008-07-19 10:24:28 -07:00
Brendan Eich
d1b171e5e2 First stab at incops, plus unbox_jsval tag-masking guard fixes, plus misc. cleanup. 2008-07-19 00:15:22 -07:00
Andreas Gal
47ae25da20 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
89b50ed124 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
4770d4b3e0 Got side exits seemingly working, added if.js to trace-test.js 2008-07-18 10:33:17 -07:00
shaver@mozilla.org
7078a99d21 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
dded69f2a3 Merge. 2008-07-17 17:13:41 -07:00
Andreas Gal
19ed222624 Disable trees for the time being. 2008-07-17 17:12:28 -07:00
shaver@mozilla.org
3db81baa04 Label globals and locals with their source-names in trace.
Show line number on abort.
2008-07-17 15:09:48 -07:00
Andreas Gal
954c5830e1 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
shaver
87eacb1139 Add setprop and tests for setprop and cleanup labling code for debug mode (m=gal). 2008-07-17 02:00:23 -07:00
Andreas Gal
9d6fa41738 Cleanup trace abort handling. 2008-07-17 01:29:41 -07:00
Andreas Gal
b243a8350a Better naming of the after_JSOP_CALL event (EnterFrame). 2008-07-16 23:00:59 -07:00
Andreas Gal
2442099090 Notify the recorder when a new frame was created by JSOP_CALL. 2008-07-16 22:58:06 -07:00
Andreas Gal
df5005a322 Hand in typemap the recorder is supposed to use (preparation for side exit compilation and trees). 2008-07-16 21:49:42 -07:00
Andreas Gal
def4afc614 Move the allocation of the LIR buffer and the FragmentInfo data structure creation (which includes typemap and interned global calculation) into loopedge. 2008-07-16 21:41:03 -07:00
Andreas Gal
db7e41ed40 Add generic recorder hooks that are called before and after all opcodes as we trace. We might want to instead just move to pre_OP and post_OP. 2008-07-16 17:29:08 -07:00
Andreas Gal
43b7ba1be4 Don't use a builtin for this. For functions its interned in the native frame. For global this we read from fp->thisp. Restore jsinterp.cpp and jsinterp.h (no longer need COMPUTE_THIS exposed). 2008-07-16 14:36:50 -07:00