[JAEGER] Fixed nits from branding fix.
authorDavid Anderson <danderson@mozilla.com>
Tue, 22 Jun 2010 15:09:07 -0700
changeset 52893 18cc44f9d4d28735c8e56c08918d28330a35c4c2
parent 52892 a52f3b127fff900670954dbb5dd834a944e18bda
child 52894 9f79a14153670da1b50c3e10f903e45dc1d7bd45
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.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
[JAEGER] Fixed nits from branding fix.
js/src/methodjit/PolyIC.cpp
--- a/js/src/methodjit/PolyIC.cpp
+++ b/js/src/methodjit/PolyIC.cpp
@@ -302,17 +302,17 @@ class SetPropCompiler : public PICStubCo
             masm.loadPtr(Address(pic.objReg, offsetof(JSObject, dslots)), pic.objReg);
             address = Address(pic.objReg, (sprop->slot - JS_INITIAL_NSLOTS) * sizeof(Value));
         }
 
         // If the scope is branded, or has a method barrier. It's now necessary
         // to guard that we're not overwriting a function-valued property.
         Jump rebrand;
         JSScope *scope = obj->scope();
-        if (scope->branded() || scope->hasMethodBarrier()) {
+        if (scope->brandedOrHasMethodBarrier()) {
             masm.loadTypeTag(address, pic.shapeReg);
             rebrand = masm.branch32(Assembler::Equal, pic.shapeReg, Imm32(JSVAL_MASK32_FUNOBJ));
         }
 
         if (pic.u.vr.isConstant) {
             masm.storeValue(Valueify(pic.u.vr.u.v), address);
         } else {
             if (pic.u.vr.u.s.isTypeKnown)
@@ -377,31 +377,30 @@ class SetPropCompiler : public PICStubCo
             return false;
         if (!prop)
             return disable("property not found");
 
         AutoPropertyDropper dropper(f.cx, holder, prop);
         if (holder != obj)
             return disable("property not on object");
 
+        JSScope *scope = obj->scope();
         JSScopeProperty *sprop = (JSScopeProperty *)prop;
         if (!sprop->writable())
             return disable("readonly");
-        if (obj->scope()->sealed() && !sprop->hasSlot())
+        if (scope->sealed() && !sprop->hasSlot())
             return disable("what does this even mean");
 
         if (!sprop->hasDefaultSetter())
             return disable("setter");
-        if (!SPROP_HAS_VALID_SLOT(sprop, obj->scope()))
+        if (!SPROP_HAS_VALID_SLOT(sprop, scope))
             return disable("invalid slot");
 
-        bool needsBarrier = obj->scope()->branded() || obj->scope()->hasMethodBarrier();
-
         JS_ASSERT(obj == holder);
-        if (!pic.inlinePathPatched && !needsBarrier)
+        if (!pic.inlinePathPatched && !scope->brandedOrHasMethodBarrier())
             return patchInline(sprop);
         else
             return generateStub(sprop);
 
         return true;
     }
 };