Index: src/compiler/instruction.cc |
diff --git a/src/compiler/instruction.cc b/src/compiler/instruction.cc |
index d473f860b62a4effc070f59b9c154ccbb19d33bf..567278b44fcf17ab7358503c080debd3cfbfd2e1 100644 |
--- a/src/compiler/instruction.cc |
+++ b/src/compiler/instruction.cc |
@@ -836,22 +836,16 @@ void InstructionSequence::MarkAsRepresentation(MachineRepresentation rep, |
representations_[virtual_register] = rep; |
} |
- |
-InstructionSequence::StateId InstructionSequence::AddFrameStateDescriptor( |
- FrameStateDescriptor* descriptor) { |
+int InstructionSequence::AddDeoptimizationEntry( |
+ FrameStateDescriptor* descriptor, DeoptimizeReason reason) { |
int deoptimization_id = static_cast<int>(deoptimization_entries_.size()); |
- deoptimization_entries_.push_back(descriptor); |
- return StateId::FromInt(deoptimization_id); |
-} |
- |
-FrameStateDescriptor* InstructionSequence::GetFrameStateDescriptor( |
- InstructionSequence::StateId state_id) { |
- return deoptimization_entries_[state_id.ToInt()]; |
+ deoptimization_entries_.push_back(DeoptimizationEntry(descriptor, reason)); |
+ return deoptimization_id; |
} |
- |
-int InstructionSequence::GetFrameStateDescriptorCount() { |
- return static_cast<int>(deoptimization_entries_.size()); |
+DeoptimizationEntry const& InstructionSequence::GetDeoptimizationEntry( |
+ int state_id) { |
+ return deoptimization_entries_[state_id]; |
} |