Index: runtime/vm/intermediate_language.h |
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h |
index fdcca2fa4ea8fbe13c630dba90970158b4411fbf..e017cf72e4c9b99f338f0ad972aadb7b7b4a2fb6 100644 |
--- a/runtime/vm/intermediate_language.h |
+++ b/runtime/vm/intermediate_language.h |
@@ -1262,8 +1262,8 @@ class BlockEntryInstr : public Instruction { |
DEFINE_INSTRUCTION_TYPE_CHECK(BlockEntry) |
protected: |
- BlockEntryInstr(intptr_t block_id, intptr_t try_index, intptr_t deopt_id) |
- : Instruction(deopt_id), |
+ BlockEntryInstr(intptr_t block_id, intptr_t try_index) |
+ : Instruction(Thread::Current()->GetNextDeoptId()), |
block_id_(block_id), |
try_index_(try_index), |
preorder_number_(-1), |
@@ -1442,8 +1442,8 @@ class GraphEntryInstr : public BlockEntryInstr { |
class JoinEntryInstr : public BlockEntryInstr { |
public: |
- JoinEntryInstr(intptr_t block_id, intptr_t try_index, intptr_t deopt_id) |
- : BlockEntryInstr(block_id, try_index, deopt_id), |
+ JoinEntryInstr(intptr_t block_id, intptr_t try_index) |
+ : BlockEntryInstr(block_id, try_index), |
predecessors_(2), // Two is the assumed to be the common case. |
phis_(NULL) {} |
@@ -1512,8 +1512,8 @@ class PhiIterator : public ValueObject { |
class TargetEntryInstr : public BlockEntryInstr { |
public: |
- TargetEntryInstr(intptr_t block_id, intptr_t try_index, intptr_t deopt_id) |
- : BlockEntryInstr(block_id, try_index, deopt_id), |
+ TargetEntryInstr(intptr_t block_id, intptr_t try_index) |
+ : BlockEntryInstr(block_id, try_index), |
predecessor_(NULL), |
edge_weight_(0.0) {} |
@@ -1553,10 +1553,8 @@ class IndirectEntryInstr : public JoinEntryInstr { |
public: |
IndirectEntryInstr(intptr_t block_id, |
intptr_t indirect_id, |
- intptr_t try_index, |
- intptr_t deopt_id) |
- : JoinEntryInstr(block_id, try_index, deopt_id), |
- indirect_id_(indirect_id) {} |
+ intptr_t try_index) |
+ : JoinEntryInstr(block_id, try_index), indirect_id_(indirect_id) {} |
DECLARE_INSTRUCTION(IndirectEntry) |
@@ -1583,7 +1581,7 @@ class CatchBlockEntryInstr : public BlockEntryInstr { |
bool needs_stacktrace, |
intptr_t deopt_id, |
bool should_restore_closure_context = false) |
- : BlockEntryInstr(block_id, try_index, deopt_id), |
+ : BlockEntryInstr(block_id, try_index), |
graph_entry_(graph_entry), |
predecessor_(NULL), |
catch_handler_types_(Array::ZoneHandle(handler_types.raw())), |
@@ -1593,7 +1591,9 @@ class CatchBlockEntryInstr : public BlockEntryInstr { |
needs_stacktrace_(needs_stacktrace), |
should_restore_closure_context_(should_restore_closure_context), |
handler_token_pos_(handler_token_pos), |
- is_generated_(is_generated) {} |
+ is_generated_(is_generated) { |
+ deopt_id_ = deopt_id; |
+ } |
DECLARE_INSTRUCTION(CatchBlockEntry) |
@@ -2108,8 +2108,9 @@ inline Definition* Instruction::ArgumentAt(intptr_t index) const { |
class ReturnInstr : public TemplateInstruction<1, NoThrow> { |
public: |
- ReturnInstr(TokenPosition token_pos, Value* value, intptr_t deopt_id) |
- : TemplateInstruction(deopt_id), token_pos_(token_pos) { |
+ ReturnInstr(TokenPosition token_pos, Value* value) |
+ : TemplateInstruction(Thread::Current()->GetNextDeoptId()), |
+ token_pos_(token_pos) { |
SetInputAt(0, value); |
} |
@@ -2137,8 +2138,9 @@ class ReturnInstr : public TemplateInstruction<1, NoThrow> { |
class ThrowInstr : public TemplateInstruction<0, Throws> { |
public: |
- explicit ThrowInstr(TokenPosition token_pos, intptr_t deopt_id) |
- : TemplateInstruction(deopt_id), token_pos_(token_pos) {} |
+ explicit ThrowInstr(TokenPosition token_pos) |
+ : TemplateInstruction(Thread::Current()->GetNextDeoptId()), |
+ token_pos_(token_pos) {} |
DECLARE_INSTRUCTION(Throw) |
@@ -2161,10 +2163,8 @@ class ReThrowInstr : public TemplateInstruction<0, Throws> { |
public: |
// 'catch_try_index' can be CatchClauseNode::kInvalidTryIndex if the |
// rethrow has been artificially generated by the parser. |
- ReThrowInstr(TokenPosition token_pos, |
- intptr_t catch_try_index, |
- intptr_t deopt_id) |
- : TemplateInstruction(deopt_id), |
+ ReThrowInstr(TokenPosition token_pos, intptr_t catch_try_index) |
+ : TemplateInstruction(Thread::Current()->GetNextDeoptId()), |
token_pos_(token_pos), |
catch_try_index_(catch_try_index) {} |
@@ -2214,8 +2214,8 @@ class StopInstr : public TemplateInstruction<0, NoThrow> { |
class GotoInstr : public TemplateInstruction<0, NoThrow> { |
public: |
- explicit GotoInstr(JoinEntryInstr* entry, intptr_t deopt_id) |
- : TemplateInstruction(deopt_id), |
+ explicit GotoInstr(JoinEntryInstr* entry) |
+ : TemplateInstruction(Thread::Current()->GetNextDeoptId()), |
block_(NULL), |
successor_(entry), |
edge_weight_(0.0), |
@@ -2428,8 +2428,10 @@ class TemplateComparison |
class BranchInstr : public Instruction { |
public: |
- explicit BranchInstr(ComparisonInstr* comparison, intptr_t deopt_id) |
- : Instruction(deopt_id), comparison_(comparison), constant_target_(NULL) { |
+ explicit BranchInstr(ComparisonInstr* comparison) |
+ : Instruction(Thread::Current()->GetNextDeoptId()), |
+ comparison_(comparison), |
+ constant_target_(NULL) { |
ASSERT(comparison->env() == NULL); |
for (intptr_t i = comparison->InputCount() - 1; i >= 0; --i) { |
comparison->InputAt(i)->set_instruction(this); |
@@ -2708,8 +2710,9 @@ class AssertAssignableInstr : public TemplateDefinition<3, Throws, Pure> { |
class AssertBooleanInstr : public TemplateDefinition<1, Throws, Pure> { |
public: |
- AssertBooleanInstr(TokenPosition token_pos, Value* value, intptr_t deopt_id) |
- : TemplateDefinition(deopt_id), token_pos_(token_pos) { |
+ AssertBooleanInstr(TokenPosition token_pos, Value* value) |
+ : TemplateDefinition(Thread::Current()->GetNextDeoptId()), |
+ token_pos_(token_pos) { |
SetInputAt(0, value); |
} |
@@ -2738,8 +2741,8 @@ class AssertBooleanInstr : public TemplateDefinition<1, Throws, Pure> { |
// a computation, not a value, because it's mutable. |
class CurrentContextInstr : public TemplateDefinition<0, NoThrow> { |
public: |
- explicit CurrentContextInstr(intptr_t deopt_id) |
- : TemplateDefinition(deopt_id) {} |
+ CurrentContextInstr() |
+ : TemplateDefinition(Thread::Current()->GetNextDeoptId()) {} |
DECLARE_INSTRUCTION(CurrentContext) |
virtual CompileType ComputeType() const; |
@@ -2822,9 +2825,8 @@ class ClosureCallInstr : public TemplateDartCall<1> { |
public: |
ClosureCallInstr(Value* function, |
ClosureCallNode* node, |
- ZoneGrowableArray<PushArgumentInstr*>* arguments, |
- intptr_t deopt_id) |
- : TemplateDartCall(deopt_id, |
+ ZoneGrowableArray<PushArgumentInstr*>* arguments) |
+ : TemplateDartCall(Thread::Current()->GetNextDeoptId(), |
node->arguments()->type_args_len(), |
node->arguments()->names(), |
arguments, |
@@ -2837,9 +2839,8 @@ class ClosureCallInstr : public TemplateDartCall<1> { |
ZoneGrowableArray<PushArgumentInstr*>* arguments, |
intptr_t type_args_len, |
const Array& argument_names, |
- TokenPosition token_pos, |
- intptr_t deopt_id) |
- : TemplateDartCall(deopt_id, |
+ TokenPosition token_pos) |
+ : TemplateDartCall(Thread::Current()->GetNextDeoptId(), |
type_args_len, |
argument_names, |
arguments, |
@@ -2873,9 +2874,8 @@ class InstanceCallInstr : public TemplateDartCall<0> { |
intptr_t type_args_len, |
const Array& argument_names, |
intptr_t checked_argument_count, |
- const ZoneGrowableArray<const ICData*>& ic_data_array, |
- intptr_t deopt_id) |
- : TemplateDartCall(deopt_id, |
+ const ZoneGrowableArray<const ICData*>& ic_data_array) |
+ : TemplateDartCall(Thread::Current()->GetNextDeoptId(), |
type_args_len, |
argument_names, |
arguments, |
@@ -3033,8 +3033,7 @@ class StrictCompareInstr : public TemplateComparison<2, NoThrow, Pure> { |
Token::Kind kind, |
Value* left, |
Value* right, |
- bool needs_number_check, |
- intptr_t deopt_id); |
+ bool needs_number_check); |
DECLARE_INSTRUCTION(StrictCompare) |
@@ -3246,11 +3245,8 @@ class RelationalOpInstr : public TemplateComparison<2, NoThrow, Pure> { |
// materialization of true and false constants. |
class IfThenElseInstr : public Definition { |
public: |
- IfThenElseInstr(ComparisonInstr* comparison, |
- Value* if_true, |
- Value* if_false, |
- intptr_t deopt_id) |
- : Definition(deopt_id), |
+ IfThenElseInstr(ComparisonInstr* comparison, Value* if_true, Value* if_false) |
+ : Definition(Thread::Current()->GetNextDeoptId()), |
comparison_(comparison), |
if_true_(Smi::Cast(if_true->BoundConstant()).Value()), |
if_false_(Smi::Cast(if_false->BoundConstant()).Value()) { |
@@ -3332,9 +3328,8 @@ class StaticCallInstr : public TemplateDartCall<0> { |
intptr_t type_args_len, |
const Array& argument_names, |
ZoneGrowableArray<PushArgumentInstr*>* arguments, |
- const ZoneGrowableArray<const ICData*>& ic_data_array, |
- intptr_t deopt_id) |
- : TemplateDartCall(deopt_id, |
+ const ZoneGrowableArray<const ICData*>& ic_data_array) |
+ : TemplateDartCall(Thread::Current()->GetNextDeoptId(), |
type_args_len, |
argument_names, |
arguments, |
@@ -4054,10 +4049,8 @@ class StringToCharCodeInstr : public TemplateDefinition<1, NoThrow, Pure> { |
class StringInterpolateInstr : public TemplateDefinition<1, Throws> { |
public: |
- StringInterpolateInstr(Value* value, |
- TokenPosition token_pos, |
- intptr_t deopt_id) |
- : TemplateDefinition(deopt_id), |
+ StringInterpolateInstr(Value* value, TokenPosition token_pos) |
+ : TemplateDefinition(Thread::Current()->GetNextDeoptId()), |
token_pos_(token_pos), |
function_(Function::ZoneHandle()) { |
SetInputAt(0, value); |
@@ -4392,9 +4385,8 @@ class CreateArrayInstr : public TemplateDefinition<2, Throws> { |
public: |
CreateArrayInstr(TokenPosition token_pos, |
Value* element_type, |
- Value* num_elements, |
- intptr_t deopt_id) |
- : TemplateDefinition(deopt_id), |
+ Value* num_elements) |
+ : TemplateDefinition(Thread::Current()->GetNextDeoptId()), |
token_pos_(token_pos), |
identity_(AliasIdentity::Unknown()) { |
SetInputAt(kElementTypePos, element_type); |
@@ -4602,9 +4594,10 @@ class InstantiateTypeInstr : public TemplateDefinition<2, Throws> { |
InstantiateTypeInstr(TokenPosition token_pos, |
const AbstractType& type, |
Value* instantiator_type_arguments, |
- Value* function_type_arguments, |
- intptr_t deopt_id) |
- : TemplateDefinition(deopt_id), token_pos_(token_pos), type_(type) { |
+ Value* function_type_arguments) |
+ : TemplateDefinition(Thread::Current()->GetNextDeoptId()), |
+ token_pos_(token_pos), |
+ type_(type) { |
ASSERT(type.IsZoneHandle() || type.IsReadOnlyHandle()); |
SetInputAt(0, instantiator_type_arguments); |
SetInputAt(1, function_type_arguments); |
@@ -4637,9 +4630,8 @@ class InstantiateTypeArgumentsInstr : public TemplateDefinition<2, Throws> { |
const TypeArguments& type_arguments, |
const Class& instantiator_class, |
Value* instantiator_type_arguments, |
- Value* function_type_arguments, |
- intptr_t deopt_id) |
- : TemplateDefinition(deopt_id), |
+ Value* function_type_arguments) |
+ : TemplateDefinition(Thread::Current()->GetNextDeoptId()), |
token_pos_(token_pos), |
type_arguments_(type_arguments), |
instantiator_class_(instantiator_class) { |
@@ -4700,8 +4692,9 @@ class AllocateContextInstr : public TemplateDefinition<0, NoThrow> { |
class InitStaticFieldInstr : public TemplateInstruction<1, Throws> { |
public: |
- InitStaticFieldInstr(Value* input, const Field& field, intptr_t deopt_id) |
- : TemplateInstruction(deopt_id), field_(field) { |
+ InitStaticFieldInstr(Value* input, const Field& field) |
+ : TemplateInstruction(Thread::Current()->GetNextDeoptId()), |
+ field_(field) { |
SetInputAt(0, input); |
CheckField(field); |
} |
@@ -4724,10 +4717,9 @@ class InitStaticFieldInstr : public TemplateInstruction<1, Throws> { |
class CloneContextInstr : public TemplateDefinition<1, NoThrow> { |
public: |
- CloneContextInstr(TokenPosition token_pos, |
- Value* context_value, |
- intptr_t deopt_id) |
- : TemplateDefinition(deopt_id), token_pos_(token_pos) { |
+ CloneContextInstr(TokenPosition token_pos, Value* context_value) |
+ : TemplateDefinition(Thread::Current()->GetNextDeoptId()), |
+ token_pos_(token_pos) { |
SetInputAt(0, context_value); |
} |
@@ -7262,10 +7254,8 @@ class UnaryDoubleOpInstr : public TemplateDefinition<1, NoThrow, Pure> { |
class CheckStackOverflowInstr : public TemplateInstruction<0, NoThrow> { |
public: |
- CheckStackOverflowInstr(TokenPosition token_pos, |
- intptr_t loop_depth, |
- intptr_t deopt_id) |
- : TemplateInstruction(deopt_id), |
+ CheckStackOverflowInstr(TokenPosition token_pos, intptr_t loop_depth) |
+ : TemplateInstruction(Thread::Current()->GetNextDeoptId()), |
token_pos_(token_pos), |
loop_depth_(loop_depth) {} |