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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 2900963008: Reapply "Shuffle around deopt id allocation... (Closed)
Patch Set: . Created 3 years, 7 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
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index fe521dae39d2cb57caaeb8e7987579f282647823..358f299bfb3c6bf820474cd6e7404bdea85089d2 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -604,7 +604,9 @@ const Object& Value::BoundConstant() const {
GraphEntryInstr::GraphEntryInstr(const ParsedFunction& parsed_function,
TargetEntryInstr* normal_entry,
intptr_t osr_id)
- : BlockEntryInstr(0, CatchClauseNode::kInvalidTryIndex),
+ : BlockEntryInstr(0,
+ CatchClauseNode::kInvalidTryIndex,
+ Thread::Current()->GetNextDeoptId()),
parsed_function_(parsed_function),
normal_entry_(normal_entry),
catch_entries_(),
@@ -1109,7 +1111,8 @@ bool BlockEntryInstr::PruneUnreachable(GraphEntryInstr* graph_entry,
// we can simply jump to the beginning of the block.
ASSERT(instr->previous() == this);
- GotoInstr* goto_join = new GotoInstr(AsJoinEntry());
+ GotoInstr* goto_join =
+ new GotoInstr(AsJoinEntry(), Thread::Current()->GetNextDeoptId());
goto_join->CopyDeoptIdFrom(*parent);
graph_entry->normal_entry()->LinkTo(goto_join);
return true;
@@ -1336,7 +1339,7 @@ BlockEntryInstr* GotoInstr::SuccessorAt(intptr_t index) const {
void Instruction::Goto(JoinEntryInstr* entry) {
- LinkTo(new GotoInstr(entry));
+ LinkTo(new GotoInstr(entry, Thread::Current()->GetNextDeoptId()));
}
@@ -3222,8 +3225,9 @@ StrictCompareInstr::StrictCompareInstr(TokenPosition token_pos,
Token::Kind kind,
Value* left,
Value* right,
- bool needs_number_check)
- : TemplateComparison(token_pos, kind, Thread::Current()->GetNextDeoptId()),
+ bool needs_number_check,
+ intptr_t deopt_id)
+ : TemplateComparison(token_pos, kind, deopt_id),
needs_number_check_(needs_number_check) {
ASSERT((kind == Token::kEQ_STRICT) || (kind == Token::kNE_STRICT));
SetInputAt(0, left);
@@ -3834,7 +3838,7 @@ ComparisonInstr* RelationalOpInstr::CopyWithNewOperands(Value* new_left,
ComparisonInstr* StrictCompareInstr::CopyWithNewOperands(Value* new_left,
Value* new_right) {
return new StrictCompareInstr(token_pos(), kind(), new_left, new_right,
- needs_number_check());
+ needs_number_check(), Thread::kNoDeoptId);
}

Powered by Google App Engine
This is Rietveld 408576698