Bug 469927 - TM: much slower than interpreter with short loop with |let| (r=mrbkap).
authorBrendan Eich <brendan@mozilla.org>
Wed, 17 Dec 2008 12:34:06 -0800
changeset 23082 a27bde3b87197aea98270105d388a77c1b97b613
parent 23081 4aaecbf945af1b65fb7e568b9bde49dbf90a5284
child 23083 974160364e01f375982e2e3a12e076067a75f8ec
push id4346
push userrsayre@mozilla.com
push dateFri, 26 Dec 2008 01:26:36 +0000
treeherdermozilla-central@8eb5a5b83a93 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs469927
milestone1.9.2a1pre
Bug 469927 - TM: much slower than interpreter with short loop with |let| (r=mrbkap).
js/src/jstracer.cpp
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -8261,23 +8261,31 @@ JS_REQUIRES_STACK bool
 TraceRecorder::record_JSOP_TYPEOFEXPR()
 {
     return record_JSOP_TYPEOF();
 }
 
 JS_REQUIRES_STACK bool
 TraceRecorder::record_JSOP_ENTERBLOCK()
 {
-    return false;
+    JSScript* script = cx->fp->script;
+    JSFrameRegs& regs = *cx->fp->regs;
+    JSObject* obj;
+    JS_GET_SCRIPT_OBJECT(script, GET_FULL_INDEX(0), obj);
+
+    LIns* void_ins = INS_CONST(JSVAL_TO_BOOLEAN(JSVAL_VOID));
+    for (int i = 0, n = OBJ_BLOCK_COUNT(cx, obj); i < n; i++)
+        stack(i, void_ins);
+    return true;
 }
 
 JS_REQUIRES_STACK bool
 TraceRecorder::record_JSOP_LEAVEBLOCK()
 {
-    return false;
+    return true;
 }
 
 JS_REQUIRES_STACK bool
 TraceRecorder::record_JSOP_GENERATOR()
 {
     return false;
 #if 0
     JSStackFrame* fp = cx->fp;
@@ -8320,17 +8328,20 @@ JS_REQUIRES_STACK bool
 TraceRecorder::record_JSOP_ENUMCONSTELEM()
 {
     return false;
 }
 
 JS_REQUIRES_STACK bool
 TraceRecorder::record_JSOP_LEAVEBLOCKEXPR()
 {
-    return false;
+    LIns* v_ins = stack(-1);
+    int n = -1 - GET_UINT16(cx->fp->regs->pc);
+    stack(n, v_ins);
+    return true;
 }
 
 JS_REQUIRES_STACK bool
 TraceRecorder::record_JSOP_GETTHISPROP()
 {
     LIns* this_ins;
 
     /* its safe to just use cx->fp->thisp here because getThis() returns false if thisp