Commit Graph

1777 Commits

Author SHA1 Message Date
Andreas Gal
f302e681aa Removed old comments that are no longer correct. 2008-06-22 23:39:44 -07:00
Andreas Gal
ab02df3893 Check at runtime that fast inc/dec is possible. 2008-06-22 22:49:12 -07:00
Andreas Gal
17d189ecb9 Eliminate boxing in trace code. To execute such traces all values on the stack must have the same type at execution time as at trace time. Code to detect and enforce these types will be added next. 2008-06-22 21:32:24 -07:00
Andreas Gal
4312eb9b9b Write back stack/local variable state in the trace code and improved redundand boxing/unboxing elimination. 2008-06-22 19:58:24 -07:00
Andreas Gal
6d192a7054 Added end-of-trace detection and make sure trace loops back to the loop header. 2008-06-22 09:30:04 -07:00
Andreas Gal
2270a14eb0 Fix guard code assembly. This code generates trace code for the first time. 2008-06-21 23:45:16 -07:00
Andreas Gal
3197b76462 Mork work on attaching nanojit to our primitives. Traces have now their own box type (Box), which is an opaque 64-bit value. Its never supposed to appear in the trace since we will optimize away all boxing operations. 2008-06-21 22:28:41 -07:00
Andreas Gal
78da0668af Start attaching our tracer to nanojit. This is incomplete and meant for review by David only. 2008-06-21 14:55:32 -07:00
dvander@traceknight.local
4fd375f52b Fixed the test case not setting the lastIns value in Fragment 2008-06-20 15:45:37 -07:00
dvander@traceknight.local
490d9eb8b5 Fixed _thisfrag not being set in beginAssembly 2008-06-20 14:40:40 -07:00
dvander@traceknight.local
1d79a74ace Fixed beginAssembly() not setting _thisfrag which verbosity requires 2008-06-20 14:38:39 -07:00
Andreas Gal
f53b17ea14 Backed out explicit zeroing in the constructor of Assembler and Fragmento. 2008-06-20 14:30:29 -07:00
Andreas Gal
dbab3f5a43 Backed out changeset b142c62e7602 2008-06-20 14:29:10 -07:00
Andreas Gal
29c6494f2c Back out explicit zeroing in the constructor and ensure heap allocated objects are implicitly zero-ed out. 2008-06-20 14:26:43 -07:00
dvander@traceknight.local
ee94b07a44 Fixed cases of the tests not prepping the tracer properly for verbosity 2008-06-20 13:55:56 -07:00
dvander@traceknight.local
f086d675e7 fixed constructor relying on zero'd allocation 2008-06-20 11:48:02 -07:00
dvander@traceknight.local
10ed967625 fixed memory corruption in verbosity initialization code 2008-06-20 11:43:49 -07:00
dvander@traceknight.local
f1a775ac86 use valloc() on Darwin for GCHeap 2008-06-20 11:38:46 -07:00
dvander@traceknight.local
7feb713f8b fixed code generation for the LIR_in -> LIR_param change 2008-06-20 11:38:21 -07:00
Andreas Gal
9c6e4287f1 Properly align pages allocated by GCHeap. 2008-06-19 20:12:48 -07:00
Andreas Gal
ddb6af4683 Switch to malloc (avoid new where possible) and properly initialize capacity. 2008-06-19 19:19:39 -07:00
Andreas Gal
33ecda6e85 Added danderson's test cases for nanojit. Execute with nanojit() from JS shell. 2008-06-19 18:28:15 -07:00
Andreas Gal
4ddef8f5e3 Added hook to trigger nanojit test code from the JS shell. 2008-06-19 17:14:17 -07:00
Andreas Gal
48b30922c7 Drop helper code that is no longer needed. 2008-06-19 15:49:32 -07:00
Andreas Gal
9a6946405f Added necessary glue code to make nanojit compile in DEBUG mode. 2008-06-19 15:32:40 -07:00
Andreas Gal
5a17de3bca Landed nanojit in TraceMonkey. This is untested and DEBUG must be off for now since we don't support AVM's String class. 2008-06-19 10:47:58 -07:00
Andreas Gal
f5d51ff347 Added Assembler.h and vm_fops.h (blank for now) from TT. 2008-06-18 21:32:23 -07:00
Andreas Gal
debb2cc333 Added RegAlloc.h and Fragmento.h from TT. 2008-06-18 21:23:53 -07:00
Andreas Gal
0c21fdbd7e Added LIR.h from TT. 2008-06-18 21:11:15 -07:00
Andreas Gal
0e152648fe Added Native*.h from TT. 2008-06-18 20:57:17 -07:00
Andreas Gal
eed27a563d Added nanojit.h from TT. 2008-06-18 20:49:37 -07:00
Andreas Gal
f65ca9580f Renamned avm.h to avmplus.h
--HG--
rename : js/src/nanojit/avm.h => js/src/nanojit/avmplus.h
2008-06-18 20:45:37 -07:00
Andreas Gal
8228c504ce Added BitSet data structure for nanojit. 2008-06-18 20:29:01 -07:00
Andreas Gal
71546267c3 Rewrite AVM's data structures to work within spidermonkey to create an environment that allows us to land nanojit in SM. 2008-06-18 19:55:26 -07:00
Andreas Gal
e04746d2c0 Make fast inc/dec traceable. 2008-06-18 17:40:32 -07:00
Andreas Gal
1a0333027b Added new primitive guard_can_do_fast_inc_dec and report reason for trace aborts. 2008-06-18 16:23:24 -07:00
Andreas Gal
ee79053ae8 More work on the recorder. 2008-06-17 20:24:07 -07:00
Andreas Gal
737e387076 Fixes to the trace recorder. 2008-06-17 13:30:59 -07:00
Andreas Gal
40be837c3c Merge. 2008-06-15 17:49:28 -07:00
Andreas Gal
6fedd2b687 Call into the recorder for each primitive. Don't use vp in primitives, use &v instead. 2008-06-15 16:31:28 -07:00
Brendan Eich
77dcedf8cc Fix slew of gcc warnings, clear pending exception before triggering recorder error. 2008-06-12 12:07:04 -07:00
Andreas Gal
179be35727 Notify the recorder of all primitives as they are recorded. If the recorder doesn't support a primitive we abort the trace. In debugging mode this also stops the VM. 2008-06-11 20:22:00 -07:00
Andreas Gal
448d1ba7e3 Merge with be's last push. 2008-06-11 18:13:43 -07:00
Andreas Gal
ab59446c58 Initialize ok to true if we didn't side-enter via state. 2008-06-11 18:05:58 -07:00
Andreas Gal
bb1b206714 Use an error property in the recorder instead of a return value to indicate errors and make sure DO_OP aborts the trace once we go into the error state in the tracer. 2008-06-11 17:59:28 -07:00
Andreas Gal
2a34b19f23 js_CallRecorder has no return value any more. 2008-06-11 17:36:35 -07:00
Brendan Eich
a64ed1a5ee native_pointer_to_jsval should not lose low-order bits (plus random style nits). 2008-06-11 17:21:15 -07:00
Andreas Gal
54dd5103e9 Track data flow through variables in the recorder. Set an error flag if the recorder signals an error. 2008-06-11 17:15:49 -07:00
Brendan Eich
c58ac03421 Fix used before set ok bugs, fiddled ifdef style a bit. 2008-06-11 13:55:34 -07:00
Brendan Eich
6be978e069 Expand tabs. 2008-06-11 13:09:25 -07:00
Brendan Eich
74c80d5597 Kill trailing spaces. 2008-06-11 13:07:24 -07:00
Andreas Gal
b484f790e4 Start hooking the recorder into the tracer. 2008-06-11 12:12:29 -07:00
Andreas Gal
73698e5e72 Pass JSContext* to all primitives (needed by the recorder.) 2008-06-11 11:46:47 -07:00
Andreas Gal
fef28e9f56 Allow recorder to abort recording. 2008-06-11 11:29:35 -07:00
Andreas Gal
3e75d9e04e Save and restore ok when switching interpreters. 2008-06-11 09:01:29 -07:00
Brendan Eich
e90aa46c27 Init ok before goto exit, plus indentation style policing. 2008-06-11 03:41:50 -07:00
Andreas Gal
76f6917ece Cleanup and fixed beneign bug. 2008-06-11 01:32:02 -07:00
Andreas Gal
50bf94c527 Notify recorder when tracing starts/stops. Restore code accidently lost during last merge. 2008-06-11 01:22:39 -07:00
Andreas Gal
9bb9f4893d Connect tracer with the interpreter. Errors and exits are handled in the main interpreter. 2008-06-11 00:21:51 -07:00
Andreas Gal
8dee65f176 Merged with Brendan's changes. 2008-06-10 22:30:46 -07:00
Andreas Gal
c79c0bfeef Added code to switch to the tracer and back. Incomplete and for review only. 2008-06-10 22:20:05 -07:00
Brendan Eich
f8e68441c2 No need for eval call. 2008-06-10 21:46:03 -07:00
Brendan Eich
45358518de Minimize JSInterpreterState, fix warning. 2008-06-10 21:40:47 -07:00
Brendan Eich
57eff0cc24 Style nits, plus no need for rt in JSInterpreterState. 2008-06-10 19:40:09 -07:00
Andreas Gal
b5238a9929 Create a side-entry path into the interpreter that bypasses the initialization code and allows switching back and forth between two interpreters (i.e. tracing and non-tracing). 2008-06-10 17:45:38 -07:00
Andreas Gal
17d0d41459 Added branch monitoring using a single unified branch frequency counter. 2008-06-10 16:49:05 -07:00
Andreas Gal
a1bf0819b2 Removed JSOP_HEADER code. Its too costly. This patch restore essentially the same performance as unmodified SM. 2008-06-10 14:44:51 -07:00
Andreas Gal
aa4de72f2b Disable JSOP_HEADER counting. 2008-06-10 14:17:05 -07:00
Andreas Gal
5f7b163827 Use higher optimization settings for jsinterp.cpp to ensure inlining. 2008-06-10 13:59:43 -07:00
Andreas Gal
b54446d182 Fixed typo that caused sunspider to fail. 2008-06-09 18:30:08 -07:00
Andreas Gal
82d514b492 Merge. 2008-06-09 14:48:23 -07:00
Andreas Gal
0077c6a422 Backed out value_to_iter inline method extraction. 2008-06-09 14:47:14 -07:00
Andreas Gal
76e4f25384 Merge. 2008-06-09 14:46:26 -07:00
Andreas Gal
70e23d6dc1 Backed out do_dorinloop inline method extraction. 2008-06-09 14:45:32 -07:00
Brendan Eich
a6b3eeb630 Merge. 2008-06-08 17:05:46 -07:00
Brendan Eich
ff8942e9cf Fix firefox, etc., (top-level mozilla) builds. 2008-06-06 15:12:48 -07:00
Andreas Gal
fd852a83dd Transform do_dorinloop goto/fall through hack into a proper inline method. 2008-06-06 15:11:08 -07:00
Andreas Gal
8d20524c9b Convert value_to_iter goto/fall through hack into a proper inlined method. 2008-06-06 13:32:04 -07:00
Brendan Eich
04b1ac5592 Merge. 2008-06-04 00:09:57 -07:00
Brendan Eich
894dd03e2a First stage of loop table work; bitmap free space management and GC hook-up still to come. 2008-06-03 23:52:28 -07:00
Brendan Eich
2e6db5a253 Fix decompiler (hack, really) to cope with misplaced JSOP_HEADER in update part of for(;;) loop. 2008-06-03 23:50:22 -07:00
Andreas Gal
9684e2070f Introduced a JavaScript recording script that is loaded dynamically. 2008-06-03 21:01:23 -07:00
Andreas Gal
be39054e45 Store the recorder script in JSTraceMonitor and make sure its traced by the GC. Also clean up the tracing of JSTraceMonitor. 2008-06-03 17:35:30 -07:00
Andreas Gal
02b2fde780 Backed out previous attempt to find a place to stash the recorder script. 2008-06-03 17:27:31 -07:00
Andreas Gal
bfecd01b75 Backed out changeset 3029f4d57bd2 2008-06-03 17:24:02 -07:00
Andreas Gal
3094b79c6b Switch to a uniform style for jstracer.cpp. 2008-06-03 17:15:58 -07:00
Andreas Gal
c93d0c8e08 Add location in the context where we can hold the recorder script and make sure the GC traces it. 2008-06-03 17:14:54 -07:00
Andreas Gal
8b6c4d02c6 Remove InitTacer. Pointless for JSRuntime. 2008-06-03 17:04:42 -07:00
Brendan Eich
a0363085ef Merge, simplify names, and police style. 2008-06-03 16:21:31 -07:00
Brendan Eich
9c2b039d6f JSOP_HEADER takes a byte index of loop header counting from script->loopBase, and related changes. 2008-06-03 14:48:47 -07:00
Brendan Eich
44ed0935e5 Fix ReconstructPCStack oplen code, extend js_OpLength to avoid cs recalculation where possible. 2008-06-03 13:51:30 -07:00
Andreas Gal
d78d723aeb Compiler fixes for CAS patch. 2008-06-03 13:29:10 -07:00
Andreas Gal
3bc4b753d4 Merge. 2008-06-03 13:22:04 -07:00
Brendan Eich
b2ee0f4849 Fix so it compiles, also avoid else after return. 2008-06-03 12:37:20 -07:00
Andreas Gal
70cdf27b42 Make js_CompareAndSwap visible outside jslock.cpp. 2008-06-03 10:06:28 -07:00
Andreas Gal
53060c32ce Move all inlines that do not represent primitives out of jsinterpinlines.h since we don't have to overwrite them in jstracerinlines.h. They live in jsinterp.cpp now. Added missing error handling for prim_ddiv and prim_dmod. Make sure prim_ddiv and prim_dmod do not call other primitives. Fixed bug in dmod (-1 should be n, but since all invocations had n=-1 this was a non-issue). 2008-06-02 23:26:17 -07:00
Brendan Eich
946fa41d8c Fiddle loop table slot interface and impl in hope of freeing slots over time. 2008-06-02 18:06:33 -07:00
Brendan Eich
21c493d829 Use correct idempotent include guard macro name. 2008-06-02 18:05:18 -07:00
Brendan Eich
3db9424289 Merge and undo js_AllocateLoopTableSlot reparam. 2008-06-02 17:28:39 -07:00
Brendan Eich
01514c4b16 No JS_TRACER ifdefs, keep line len < 80, reparameterize jstracer.cpp functions, js_OpLength helper. 2008-06-02 17:19:41 -07:00