Bug 1338646 - Do not attempt to move the MGetPropertyCache into the fallback path, if the resume point got discarded. r=jandem a=jcristau
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Wed, 28 Jun 2017 00:18:00 +0000
changeset 414138 c65f9db0a6204c252fd872778dc7d03562ee7e32
parent 414137 12d97a961c0e8ea32ae79ea063c9a9be8970e2a4
child 414139 abd7d1893a232c2cf7719098e990c8c337770323
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem, jcristau
bugs1338646
milestone55.0
Bug 1338646 - Do not attempt to move the MGetPropertyCache into the fallback path, if the resume point got discarded. r=jandem a=jcristau
js/src/jit/IonBuilder.cpp
js/src/jit/MIR.h
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -4565,19 +4565,19 @@ IonBuilder::inlineCalls(CallInfo& callIn
     }
 
     // Patch the InlinePropertyTable to not dispatch to vetoed paths.
     bool useFallback;
     if (maybeCache) {
         InlinePropertyTable* propTable = maybeCache->propTable();
         propTable->trimTo(targets, choiceSet);
 
-        if (propTable->numEntries() == 0) {
-            // If all paths were vetoed, output only a generic fallback path.
-            MOZ_ASSERT(dispatch->numCases() == 0);
+        if (propTable->numEntries() == 0 || !propTable->hasPriorResumePoint()) {
+            // Output a generic fallback path.
+            MOZ_ASSERT_IF(propTable->numEntries() == 0, dispatch->numCases() == 0);
             maybeCache = nullptr;
             useFallback = true;
         } else {
             // We need a fallback path if the ObjectGroup dispatch does not
             // handle all incoming objects.
             useFallback = false;
             TemporaryTypeSet* objectTypes = maybeCache->value()->resultTypeSet();
             for (uint32_t i = 0; i < objectTypes->getObjectCount(); i++) {
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -10773,16 +10773,17 @@ class InlinePropertyTable : public TempO
     InlinePropertyTable(TempAllocator& alloc, jsbytecode* pc)
       : pc_(pc), priorResumePoint_(nullptr), entries_(alloc)
     { }
 
     void setPriorResumePoint(MResumePoint* resumePoint) {
         MOZ_ASSERT(priorResumePoint_ == nullptr);
         priorResumePoint_ = resumePoint;
     }
+    bool hasPriorResumePoint() { return bool(priorResumePoint_); }
     MResumePoint* takePriorResumePoint() {
         MResumePoint* rp = priorResumePoint_;
         priorResumePoint_ = nullptr;
         return rp;
     }
 
     jsbytecode* pc() const {
         return pc_;