Easy fixes to avoid aborting on V8/raytrace.js: MAX_CALLDEPTH doubled to 10; JSOP_NOT handles int and undefined.
Easy fixes to avoid aborting on V8/raytrace.js: MAX_CALLDEPTH doubled to 10; JSOP_NOT handles int and undefined.
--- 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()