Bug 964915 part 5 - Add some comments to BaselineIC.cpp to warn about outerization. r=bz
authorJan de Mooij <jdemooij@mozilla.com>
Thu, 08 May 2014 16:52:41 +0200
changeset 182156 dea73fdb063c94f3d752675fbdc259249e887171
parent 182155 2232f06e4ef06dd1e2f8b070eca79b213811feec
child 182157 34965fba3ecb1b69b07a6202ac9df33911bace3e
push id43224
push userjandemooij@gmail.com
push dateThu, 08 May 2014 14:53:33 +0000
treeherdermozilla-inbound@dea73fdb063c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs964915
milestone32.0a1
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
Bug 964915 part 5 - Add some comments to BaselineIC.cpp to warn about outerization. r=bz
js/src/jit/BaselineIC.cpp
--- a/js/src/jit/BaselineIC.cpp
+++ b/js/src/jit/BaselineIC.cpp
@@ -5683,16 +5683,19 @@ TryAttachGlobalNameStub(JSContext *cx, H
         ICStub *newStub = compiler.getStub(compiler.getStubSpace(script));
         if (!newStub)
             return false;
 
         stub->addNewStub(newStub);
         return true;
     }
 
+    // Try to add a getter stub. We don't handle scripted getters yet; if this
+    // changes we need to make sure IonBuilder::getPropTryCommonGetter (which
+    // requires a Baseline stub) handles non-outerized this objects correctly.
     bool isScripted;
     if (IsCacheableGetPropCall(cx, global, global, shape, &isScripted) && !isScripted)
     {
         ICStub *monitorStub = stub->fallbackMonitorStub()->firstMonitorStub();
         IonSpew(IonSpew_BaselineIC, "  Generating GetName(GlobalName/NativeGetter) stub");
         RootedFunction getter(cx, &shape->getterObject()->as<JSFunction>());
         ICGetProp_CallNative::Compiler compiler(cx, monitorStub, global,
                                                 getter, script->pcToOffset(pc),
@@ -5736,16 +5739,20 @@ TryAttachScopeNameStub(JSContext *cx, Ha
         // from any prototype.
         shape = scopeChain->nativeLookup(cx, id);
         if (shape)
             break;
 
         scopeChain = scopeChain->enclosingScope();
     }
 
+    // We don't handle getters here. When this changes, we need to make sure
+    // IonBuilder::getPropTryCommonGetter (which requires a Baseline stub to
+    // work) handles non-outerized this objects correctly.
+
     if (!IsCacheableGetPropReadSlot(scopeChain, scopeChain, shape))
         return true;
 
     bool isFixedSlot;
     uint32_t offset;
     GetFixedOrDynamicSlotOffset(scopeChain, shape->slot(), &isFixedSlot, &offset);
 
     ICStub *monitorStub = stub->fallbackMonitorStub()->firstMonitorStub();