Don't try to demote slots on secondary traces (we have to recompile the primary trace as well for that, which we currently don't do.)
authorAndreas Gal <gal@mozilla.com>
Fri, 25 Jul 2008 19:30:33 -0700
changeset 17837 f38fbde81ed186b3880bc39943cf9916c6958156
parent 17836 3bf4ab9ba121c4c876e851a91530728c55bc6305
child 17838 27dc0386e58d1035fc2b21026052f172a87ba3fc
child 17841 bf4d58f8cc7f728221884369a256f09aadbae20a
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.1a1pre
Don't try to demote slots on secondary traces (we have to recompile the primary trace as well for that, which we currently don't do.)
js/src/jstracer.cpp
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -1030,16 +1030,20 @@ TraceRecorder::checkType(jsval& v, uint8
     if (t == TYPEMAP_TYPE_ANY) /* ignore unused slots */
         return true;
     if (isNumber(v)) {
         /* Initially we start out all numbers as JSVAL_DOUBLE in the type map. If we still
            see a number in v, its a valid trace but we might want to ask to demote the
            slot if we know or suspect that its integer. */
         LIns* i = get(&v);
         if (TYPEMAP_GET_TYPE(t) == JSVAL_DOUBLE) {
+            /* BUG: We can't specialize once the primary trace has been compiled since
+               we would have to recompile it. */
+            if (fragment->root != fragment)
+                return true;
             /* Don't type specialize really long traces (we count the number of guards in them). */
             if (DEMOTE_THRESHOLD > 0 && guardCount > DEMOTE_THRESHOLD)
                 return true;
             if (isInt32(v) && !TYPEMAP_GET_FLAG(t, TYPEMAP_FLAG_DONT_DEMOTE)) {
                 /* If the value associated with v via the tracker comes from a i2f operation,
                    we can be sure it will always be an int. If we see INCVAR, we similarly
                    speculate that the result will be int, even though this is not
                    guaranteed and this might cause the entry map to mismatch and thus