Bug 454044 - TM: JSOP_NOT needs isPromoteInt/::demote help.
authorBrendan Eich <brendan@mozilla.org>
Sun, 07 Sep 2008 01:40:24 -0700
changeset 19074 b776e26bb8eaefba4bdcf3d2c92a782dea172ab5
parent 19073 e55c3f70b3c33439201efecb1bc5266379b56ab9
child 19075 dcb86d40fc58267a72e650fcc05d04ef62983655
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)
bugs454044
milestone1.9.1b1pre
Bug 454044 - TM: JSOP_NOT needs isPromoteInt/::demote help.
js/src/jstracer.cpp
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -3933,17 +3933,20 @@ bool
 TraceRecorder::record_JSOP_NOT()
 {
     jsval& v = stackval(-1);
     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)));
+        LIns* a = get(&v);
+        if (JSVAL_IS_INT(v) && isPromoteInt(a))
+            a = ::demote(lir, a);
+        set(&v, lir->ins_eq0(a));
         return true;
     }
     return false;
 }
 
 bool
 TraceRecorder::record_JSOP_BITNOT()
 {