Easy fixes to avoid aborting on V8/raytrace.js: MAX_CALLDEPTH doubled to 10; JSOP_NOT handles int and undefined.
authorBrendan Eich <brendan@mozilla.org>
Fri, 05 Sep 2008 18:57:32 -0700
changeset 19070 15a142de1b3317f3c7c5a0f17562a19c84f18c11
parent 19069 8bd3a8c5fb5a223ba2ffb5fc661441175ab86273
child 19071 eba5fdb93ae783748e8cd5afae5bd92a2179e4c8
push id1930
push usermrbkap@mozilla.com
push dateWed, 10 Sep 2008 06:40:47 +0000
treeherderautoland@ee61af1469cd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.1b1pre
Easy fixes to avoid aborting on V8/raytrace.js: MAX_CALLDEPTH doubled to 10; JSOP_NOT handles int and undefined.
js/src/jstracer.cpp
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -72,17 +72,17 @@
 
 /* Number of iterations of a loop before we start tracing. */
 #define HOTLOOP 2
 
 /* Number of times we wait to exit on a side exit before we try to extend the tree. */
 #define HOTEXIT 1
 
 /* Max call depths for inlining. */
-#define MAX_CALLDEPTH 5
+#define MAX_CALLDEPTH 10
 
 /* Max number of type mismatchs before we trash the tree. */
 #define MAX_MISMATCH 5
 
 /* Max native stack size. */
 #define MAX_NATIVE_STACK_SLOTS 1024
 
 /* Max call stack size. */
@@ -3928,17 +3928,21 @@ TraceRecorder::record_JSOP_MOD()
     }
     return false;
 }
 
 bool
 TraceRecorder::record_JSOP_NOT()
 {
     jsval& v = stackval(-1);
-    if (JSVAL_IS_BOOLEAN(v) || JSVAL_IS_OBJECT(v)) {
+    if (JSVAL_TAG(v) == JSVAL_BOOLEAN) {
+        set(&v, lir->ins_eq0(lir->ins2i(LIR_eq, get(&v), 1)));
+        return true;
+    }
+    if (JSVAL_IS_INT(v) || JSVAL_IS_OBJECT(v)) {
         set(&v, lir->ins_eq0(get(&v)));
         return true;
     }
     return false;
 }
 
 bool
 TraceRecorder::record_JSOP_BITNOT()