Bug 1304638 - Remove redundant call to offsetForStackOperand. r?nbp draft
authorEmilio Cobos Álvarez <ecoal95@gmail.com>
Mon, 10 Oct 2016 16:40:36 +0200
changeset 423262 a6e940b9ca9c902d3b9ac1ae50df276eb9b61caa
parent 423261 0e193dcafffdf51970c69e91d80eda570b519ddb
child 423643 a4ea922a94e8f1fe5f157a1733d476de0f11a3f0
push id31851
push userbmo:ecoal95@gmail.com
push dateMon, 10 Oct 2016 18:07:50 +0000
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
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() {