Bug 1304638 - Remove redundant call to offsetForStackOperand. r=nbp
authorEmilio Cobos Álvarez <ecoal95@gmail.com>
Mon, 10 Oct 2016 16:40:36 +0200
changeset 319838 a8bb58ecb17df251c552f8e01b2d599abc64d127
parent 319837 107238b89fccb625ed3eedcb6854e7e91b5609a1
child 319839 944cb0fd05526894fcd90fbe7d1e625ee53cd73d
child 319841 b734eaa69060ed01419c9a8dd4760c88aed16197
push id20748
push userphilringnalda@gmail.com
push dateFri, 28 Oct 2016 03:39:55 +0000
treeherderfx-team@715360440695 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs1304638
milestone52.0a1
Bug 1304638 - Remove redundant call to offsetForStackOperand. r=nbp No state changes between the first and second call. MozReview-Commit-ID: 38FooLQnn9b Signed-off-by: Emilio Cobos Álvarez <ecoal95@gmail.com>
js/src/jsopcode.cpp
--- a/js/src/jsopcode.cpp
+++ b/js/src/jsopcode.cpp
@@ -349,17 +349,17 @@ class BytecodeParser
         }
         MOZ_ASSERT(uint32_t(operand) < code.stackDepth);
         return code.offsetStack[operand];
     }
     jsbytecode* pcForStackOperand(jsbytecode* pc, int operand) {
         uint32_t offset = offsetForStackOperand(script_->pcToOffset(pc), operand);
         if (offset >= SpecialOffsets::FirstSpecialOffset)
             return nullptr;
-        return script_->offsetToPC(offsetForStackOperand(script_->pcToOffset(pc), operand));
+        return script_->offsetToPC(offset);
     }
 
   private:
     LifoAlloc& alloc() {
         return allocScope_.alloc();
     }
 
     void reportOOM() {