diff --git a/js/src/jit/MIRGraph.h b/js/src/jit/MIRGraph.h index d8c24a2cd09..9860caf57b7 100644 --- a/js/src/jit/MIRGraph.h +++ b/js/src/jit/MIRGraph.h @@ -550,7 +550,7 @@ class MIRGraph : alloc_(alloc), returnAccumulator_(nullptr), blockIdGen_(0), - idGen_(0), + idGen_(1), osrBlock_(nullptr), osrStart_(nullptr), numBlocks_(0), @@ -595,7 +595,9 @@ class MIRGraph numBlocks_ = 0; } void resetInstructionNumber() { - idGen_ = 0; + // This intentionally starts above 0. The id 0 is in places used to + // indicate a failure to perform an operation on an instruction. + idGen_ = 1; } MBasicBlockIterator begin() { return blocks_.begin(); @@ -635,12 +637,9 @@ class MIRGraph return blockIdGen_; } void allocDefinitionId(MDefinition *ins) { - // This intentionally starts above 0. The id 0 is in places used to - // indicate a failure to perform an operation on an instruction. - idGen_ += 2; - ins->setId(idGen_); + ins->setId(idGen_++); } - uint32_t getMaxInstructionId() { + uint32_t getNumInstructionIds() { return idGen_; } MResumePoint *entryResumePoint() {