Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: src/compiler/instruction.cc

Issue 2161543002: [turbofan] Add support for eager/soft deoptimization reasons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Do the ports properly Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/instruction-selector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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];
}
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/instruction-selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698