Merge.
authorAndreas Gal <gal@mozilla.com>
Tue, 12 Aug 2008 17:40:56 -0700
changeset 18114 3d7ea778485f7d3fa75e6e2fee8a37d5b44c82df
parent 18113 73b7992a08762866dcf44dc6ccea7cd02ae8eb47 (current diff)
parent 18112 03b4f173444079cc54e9c4c3166647d32177c152 (diff)
child 18115 e36360dacbd3498d39e4f6cf9f7ad106bb7b73a9
child 18116 966c38b7fc2a3b05315f2f427dfb89dafec5c1d9
push id1452
push usershaver@mozilla.com
push dateFri, 22 Aug 2008 00:08:22 +0000
treeherdermozilla-central@d13bb0868596 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.1a2pre
Merge.
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -2252,70 +2252,72 @@ TraceRecorder::test_property_cache(JSObj
         return true;
     }
 
     // FIXME: suppressed exceptions from js_FindPropertyHelper and js_LookupPropertyWithFlags
     JSProperty* prop;
     JSScopeProperty* sprop;
     jsid id = ATOM_TO_JSID(atom);
     if (JOF_OPMODE(*cx->fp->regs->pc) == JOF_NAME) {
+        JS_ASSERT(aobj == obj);
         if (js_FindPropertyHelper(cx, id, &obj, &obj2, &prop, &entry) < 0)
             ABORT_TRACE("failed to find name");
     } else {
-        int protoIndex = js_LookupPropertyWithFlags(cx, obj, id, 0, &obj2, &prop);
+        int protoIndex = js_LookupPropertyWithFlags(cx, aobj, id, 0, &obj2, &prop);
         if (protoIndex < 0)
             ABORT_TRACE("failed to lookup property");
 
         if (prop) {
             sprop = (JSScopeProperty*) prop;
-            js_FillPropertyCache(cx, obj, OBJ_SCOPE(obj)->shape, 0, protoIndex, obj2, sprop,
+            js_FillPropertyCache(cx, aobj, OBJ_SCOPE(aobj)->shape, 0, protoIndex, obj2, sprop,
                                  &entry);
         }
     }
 
     if (!prop) {
         // Propagate obj from js_FindPropertyHelper to record_JSOP_BINDNAME
         // via our obj2 out-parameter.
+        JS_ASSERT(aobj == obj);
         obj2 = obj;
         pcval = PCVAL_NULL;
         return true;
     }
 
     if (!entry) {
         OBJ_DROP_PROPERTY(cx, obj2, prop);
         ABORT_TRACE("failed to fill property cache");
     }
 
-    if (obj != globalObj) {
-        if (PCVCAP_TAG(entry->vcap) <= 1) {
+    if (PCVCAP_TAG(entry->vcap) <= 1) {
+        if (aobj != globalObj) {
             LIns* shape_ins = addName(lir->insLoadi(map_ins, offsetof(JSScope, shape)), "shape");
             guard(true, addName(lir->ins2i(LIR_eq, shape_ins, entry->kshape), "guard(shape)"),
                   MISMATCH_EXIT);
-        } else {
-            JS_ASSERT(entry->kpc == (jsbytecode*) atom);
-            JS_ASSERT(entry->kshape == jsuword(obj));
         }
-
-        if (PCVCAP_TAG(entry->vcap) >= 1) {
-            JS_ASSERT(OBJ_SCOPE(obj2)->shape == PCVCAP_SHAPE(entry->vcap));
-
-            LIns* obj2_ins = stobj_get_fslot(obj_ins, JSSLOT_PROTO);
-            map_ins = lir->insLoadi(obj2_ins, offsetof(JSObject, map));
-            LIns* ops_ins;
-            if (!map_is_native(obj2->map, map_ins, ops_ins)) {
-                OBJ_DROP_PROPERTY(cx, obj2, prop);
-                return false;
-            }
-
-            LIns* shape_ins = addName(lir->insLoadi(map_ins, offsetof(JSScope, shape)), "shape");
-            guard(true,
-                  addName(lir->ins2i(LIR_eq, shape_ins, PCVCAP_SHAPE(entry->vcap)),
-                          "guard(vcap_shape)"),
-                  MISMATCH_EXIT);
+    } else {
+        JS_ASSERT(entry->kpc == (jsbytecode*) atom);
+        JS_ASSERT(entry->kshape == jsuword(aobj));
+    }
+
+    if (PCVCAP_TAG(entry->vcap) >= 1) {
+        JS_ASSERT(OBJ_SCOPE(obj2)->shape == PCVCAP_SHAPE(entry->vcap));
+
+        LIns* obj2_ins = stobj_get_fslot(obj_ins, JSSLOT_PROTO);
+        map_ins = lir->insLoadi(obj2_ins, offsetof(JSObject, map));
+        LIns* ops_ins;
+        if (!map_is_native(obj2->map, map_ins, ops_ins)) {
+            OBJ_DROP_PROPERTY(cx, obj2, prop);
+            return false;
         }
+
+        LIns* shape_ins = addName(lir->insLoadi(map_ins, offsetof(JSScope, shape)), "shape");
+        guard(true,
+              addName(lir->ins2i(LIR_eq, shape_ins, PCVCAP_SHAPE(entry->vcap)),
+                      "guard(vcap_shape)"),
+              MISMATCH_EXIT);
     }
 
     sprop = (JSScopeProperty*) prop;
     JSScope* scope = OBJ_SCOPE(obj2);
 
     jsval v;
 
     if (format & JOF_CALLOP) {