| Index: runtime/vm/flow_graph_compiler_ia32.cc
|
| diff --git a/runtime/vm/flow_graph_compiler_ia32.cc b/runtime/vm/flow_graph_compiler_ia32.cc
|
| index 72e7d358e1c4525bb064170a9b953232a4a468f3..138ecf33288c78fbf5733f4bc92377f5d9bf7b52 100644
|
| --- a/runtime/vm/flow_graph_compiler_ia32.cc
|
| +++ b/runtime/vm/flow_graph_compiler_ia32.cc
|
| @@ -24,6 +24,7 @@ DEFINE_FLAG(bool, unbox_mints, true, "Optimize 64-bit integer arithmetic.");
|
| DECLARE_FLAG(int, optimization_counter_threshold);
|
| DECLARE_FLAG(bool, print_ast);
|
| DECLARE_FLAG(bool, print_scopes);
|
| +DECLARE_FLAG(bool, enable_type_checks);
|
| DECLARE_FLAG(bool, eliminate_type_checks);
|
|
|
|
|
| @@ -624,6 +625,12 @@ void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos,
|
|
|
| void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) {
|
| if (!is_optimizing()) {
|
| + if (FLAG_enable_type_checks && instr->IsAssertAssignable()) {
|
| + AssertAssignableInstr* assert = instr->AsAssertAssignable();
|
| + AddCurrentDescriptor(PcDescriptors::kDeoptBefore,
|
| + assert->deopt_id(),
|
| + assert->token_pos());
|
| + }
|
| AllocateRegistersLocally(instr);
|
| }
|
| }
|
|
|