Commit Graph

1930 Commits

Author SHA1 Message Date
Andreas Gal
5d9de143af More concise conversion from object to boolean. 2008-06-27 07:48:18 -07:00
Andreas Gal
afd5f3b1e3 Clarified argument names in guard code and explain better why we guard for overflow the way we do. 2008-06-27 07:28:10 -07:00
Andreas Gal
a13289ec80 Added missing > which has been bugging me for the past month every time I saw it. 2008-06-27 07:21:37 -07:00
Andreas Gal
e59076860a Instead of guarding on null -> boolean conversion just emit a null compare and use the boolean result. 2008-06-27 06:53:10 -07:00
Andreas Gal
3492763c96 Throw out a bunch of primitives (guards) that we are no longer interested in. 2008-06-27 06:18:12 -07:00
Andreas Gal
0c5757a21f Add a new option -j to enable the JIT. The default is off so we can easily benchmark the overhead without the tracer. 2008-06-27 00:22:53 -08:00
Andreas Gal
a21ca6a788 Prepare LIR_ov to be used as soon Ed adds it and add a few comments that explain how overflow is handled. 2008-06-26 23:34:50 -08:00
Andreas Gal
49fe7a95eb More cleanup and code move into TraceRecorder and prepare for LIR_ov. 2008-06-26 23:22:16 -08:00
Andreas Gal
8c67877472 Slight cleanup of the guard code emission in the trace inlines. 2008-06-26 22:05:44 -08:00
Andreas Gal
f357ff14f0 Move the recorder functionality into TraceRecorder to unclutter trace inlines. 2008-06-26 21:58:57 -08:00
Andreas Gal
0c98250a90 Move set/get into recorder and introduce init. 2008-06-26 21:41:10 -08:00
Andreas Gal
431b7b810a Moved loading context slots into the recorder (more to follow). 2008-06-26 21:33:33 -08:00
Andreas Gal
2dca610f28 Make sure nativeOffset uses 64-bit slots on the native stack. 2008-06-26 21:25:30 -08:00
Andreas Gal
693ee7f0cc Turn macros into inline functions and start prepatations for inlining function calls. 2008-06-26 21:19:11 -08:00
Andreas Gal
c7bab6721b Drop JS prefix from classes related to traceing. 2008-06-26 19:49:04 -08:00
Andreas Gal
ad5ceed9cd Merge. 2008-06-26 19:46:51 -08:00
Andreas Gal
a1b42735cd Backed out changeset fa82b7eda72a 2008-06-26 19:44:23 -08:00
Andreas Gal
2fddbfdceb Removed debug printfs from tracker. 2008-06-26 19:41:58 -08:00
Andreas Gal
5b4f0aaeaa Allocate recorder dynamically to avoid having a vtable in the struct holding the reference. Emit writebacks for every update to the tracker, not just stack writes. 2008-06-26 19:37:28 -08:00
Andreas Gal
407b9cdf75 Parameterize tracker. 2008-06-26 17:13:54 -08:00
Bob Clary
4bbe828e56 Sisyphus/JavaScript - update to support 1.9.1, bug 441875 2008-06-25 18:14:01 -04:00
bcrowder@mozilla.com
942878bc17 Fixing a comment spacing nit. 2008-06-25 14:18:12 -07:00
Andreas Gal
d3e1a067e5 Merge. 2008-06-24 15:58:21 -07:00
Andreas Gal
4678be95aa Fix a bug in tracing can_do_fast_inc_dec (wasn't tracking a copy and traced incorrect code). Merge with TT tip. 2008-06-24 15:57:33 -07:00
dvander@traceknight.local
76d930e192 Fixed malloc/delete mismatch (Valgrind was complaining) 2008-06-23 18:00:03 -07:00
Andreas Gal
d8e0d5edec Removed debug code. 2008-06-23 17:17:48 -07:00
Andreas Gal
5e55f5e1f4 Merge. 2008-06-23 16:52:37 -07:00
Andreas Gal
5b30ba137c Merge. 2008-06-23 16:51:28 -07:00
Andreas Gal
40c5417190 Added example code for tracing. 2008-06-23 16:50:44 -07:00
Andreas Gal
0c1996ce25 Don't setup debugging data structures when not debugging. 2008-06-22 23:59:41 -07:00
Brendan Eich
dff03bc859 Add license block-comment, expand tabs. 2008-06-22 23:54:19 -07:00
Brendan Eich
d5d3c6fb26 Random style nit-picking. 2008-06-22 23:42:54 -07:00
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
Taras Glek
d53bf0fc25 bug 442331: Added -fno-exceptions and -fno-rtti to Makefile.ref 2008-06-27 12:39:29 -07:00
Brendan Eich
97bce759b2 Fix for(;;) loops to use one branch per iter (after initial iter; 441477, r=jorendorff). 2008-06-26 17:49:01 -07:00
Blake Kaplan
bc7e519eec Turn off these noisy and now mostly useless printfs for me. No bug, NPOTB 2008-06-26 16:42:41 +02:00
Johnny Stenback
a743b87dec Fixing bug 441377. Don't GC when replacing safe contexts. r+sr=brendan@mozilla.org 2008-06-25 17:04:06 -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
bcrowder@mozilla.com
bf6c509b57 Bug 435226 - dense arrays yield bogus __count__ values, r=shaver 2008-06-09 15:25:33 -07:00
bcrowder@mozilla.com
595df96804 Bug 440473 - Crash [@ Decompile][@ js_GetSrcNoteOffset] with firebug/jQuery, r=igor 2008-06-25 13:50:26 -07:00
Bob Clary
2640d8ee0a JavaScript Tests - correct test typos, bug 433999 2008-06-25 10:47:21 -04:00
Bob Clary
06ee6582fe JavaScript Tests - update statistics handling in test, bug 311414 by jorendorff 2008-06-25 10:31:55 -04:00
Robert Longson
524529369e Bug 441303 - jsutil.cpp does not compile with Visual Studio 2003. r=crowder 2008-06-25 15:06:43 +01:00
Blake Kaplan
998d3d0b7a Make the shell's -z option work again. bug 441361, r=crowder 2008-06-25 14:09:30 +02:00
Blake Kaplan
0f0ecd539e Do not attempt to lock a non-native object. bug 436741, r=brendan 2008-06-25 12:23:35 +02:00
Igor Bukanov
d24b2f9846 [Bug 432881] SM: JSVAL_VOID as a pseudo-boolean. r=brendan 2008-06-25 11:43:02 +02:00
Brendan Eich
874574312e Fix 433672, r=igor, a=shaver. 2008-06-24 17:28:22 -07:00
Jason Orendorff
2e52a42217 Merge backout. 2008-06-24 15:56:45 -05:00
Jason Orendorff
0a6388d819 Backed out changeset 79c0748ff2ac.
Assertion failure: !JSDOUBLE_IS_INT(d, i) || !INT_FITS_IN_JSVAL(i), at /builds/moz2_slave/mozilla-central-macosx-debug/build/js/src/jsapi.cpp:1839
2008-06-24 15:55:15 -05:00
Igor Bukanov
eecb145915 [Bug 441619] Fixing ICC compilation issue: in goto *expr the type of expr should be void*. r=sayrer 2008-06-24 22:31:16 +02:00
Jason Orendorff
4f34d4b1bb Bug 435288 - Deprecate JS_NewDouble and JS_NewDoubleValue, add correctness assertions (r=brendan) 2008-06-24 14:42:42 -05:00
Jason Orendorff
3f24f04578 Bug 419091 - Assertion failure: JS_PROPERTY_CACHE(cx).disabled >= 0, at jsinterp.c:463 using js.c Scatter() test and gczeal(2) (r=brendan) 2008-06-24 14:42:33 -05:00
Igor Bukanov
5d6bef81d3 [Bug 378918] backing out to investigate the tinderbox leak problem 2008-06-24 18:55:06 +02:00
Ben Turner
60208932fb Bug 439765 - "Live-lock when running JS on multiple threads". r=brendan. 2008-06-24 09:48:03 -07:00
Blake Kaplan
cbd66ff8f9 Make CallTree compile with a C++ compiler. bug 441533, r=shaver 2008-06-24 17:10:32 +02:00
Blake Kaplan
4c82468d8d Make PrincipalHolder threadsafe since it can be destroyed from off-thread (thanks to XPCSafeJSContexts) and no additional work is required to make it threadsafe. bug 337611, r+sr=jst 2008-06-24 17:10:08 +02:00
Blake Kaplan
a72799e7fe Make XPCNativeWrapper deal with non-browser embeddings. bug 422113, r+sr=jst 2008-06-24 16:32:41 +02:00
Igor Bukanov
1af57e9dc6 fixing initialization issue with JSGCFreeListSet
--HG--
branch : scalable_gc_free_lists_378918
2008-06-24 14:17:03 +02:00
Igor Bukanov
4ab8342990 trunk sync
--HG--
branch : scalable_gc_free_lists_378918
2008-06-24 09:52:20 +02:00
Brendan Eich
00548a9ef5 Fix bustage caused by over-aggressive TRY_BRANCH_AFTER_COND in STRICT_EQUALITY_OP (used by JSOP_CASE*). 2008-06-20 14:25:38 -07:00
Brendan Eich
ff11123bed Fuse branch after relational or equality op (363534, r=igor). 2008-06-20 13:17:51 -07:00
Jason Evans
c2b08b09ba Bug 422960: Add jemalloc_stats() and jemalloc.h, r=benjamin 2008-06-20 10:34:42 -07:00
Igor Bukanov
c6b43c7494 [Bug 433382] More efficient interpreter switch when computed goto is not available. r=brendan 2008-06-20 11:55:49 +02:00
Igor Bukanov
fed7ad6a4a Backed out changeset 97977f224aff due to build breakage 2008-06-20 11:46:36 +02:00
Igor Bukanov
ac0a058f20 [Bug 433382] More efficient interpreter switch when computed goto
is not available. r=brendan
2008-06-20 10:06:45 +02:00
Igor Bukanov
26b618a50f Backed out changeset 21527193c49b: the patch has used CSRCS, not CPPSRCS. 2008-06-20 09:45:29 +02:00
Igor Bukanov
feb0f05335 [Bug 433382] More efficient interpreter switch when computed goto is not available. r=brendan 2008-06-20 09:36:56 +02:00
Jim Blandy
6339c8ed6a Bug 424399: Remove unused directory "js/src/fdlibm". r+a=shaver 2008-06-19 18:44:10 -07:00
Brendan Eich
02f5b1cb7b Fix old assignment expression rval mutation via getter design, optimize setprop;pop and similar cliches (312354, r=igor). 2008-06-19 12:51:57 -07:00
Brendan Eich
e93d1c1869 Fix bogus js_Emit return value tests (438986, r=igor). 2008-06-18 18:50:33 -07:00
bcrowder@mozilla.com
ad2cd52e5c Backed out changeset f201baf7bf04 (bug 439110), was causing unit-test failures 2008-06-18 15:49:51 -07:00
Igor Bukanov
0c39954dfd [Bug 439624] renaming decltype to declType as the former is a keyword in the next C++ standard. 2008-06-18 23:35:53 +02:00
bcrowder@mozilla.com
d794bbaabb Bug 439110: xpcshell's load() just silently fails for non-existent files, r=brendan, sr=jst 2008-06-18 13:33:54 -07:00
Igor Bukanov
855f22f5c4 Updating for mozilla-central
--HG--
branch : scalable_gc_free_lists_378918
2008-06-18 14:24:19 +02:00
"Doug Turner ext:(%22)
30df99659b Removing Minimo references. b=405705, r=ted 2008-06-16 13:57:42 -07:00
Robert O'Callahan
a35acb7f42 Backout changeset 1f599577eca2 (bug 432525) due to mochitest failures 2008-06-13 20:38:33 +12:00
shaver@mozilla.org
99a269aa7d Bug 432525: optimize string.replace for flat strings; r=brendan 2008-06-12 18:30:37 -07:00
Jason Orendorff
7179330b25 Bug 438052 - Live JSScripts can be destroyed by script-object finalizer (r=brendan) 2008-06-12 15:58:07 -05:00
David Anderson
809ef905cb Bug 436263 - cannot convert __va_list_tag** to __va_list_tag (*)[1] in jsapi.cpp building js shell (r=crowder+bclary) 2008-06-12 13:53:12 -05: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