Bug 943442 - IonMonkey: Step the instruction id by 1 instead of 2, to facilitate using it as a table index. r=dvander

This commit is contained in:
Dan Gohman 2013-12-09 13:12:25 -08:00
parent 87e00e0c35
commit e6eb490d48

View File

@ -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() {