| Index: runtime/vm/intermediate_language_ia32.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language_ia32.cc (revision 17754)
|
| +++ runtime/vm/intermediate_language_ia32.cc (working copy)
|
| @@ -185,6 +185,7 @@
|
|
|
| static void EmitAssertBoolean(Register reg,
|
| intptr_t token_pos,
|
| + intptr_t deopt_id,
|
| LocationSummary* locs,
|
| FlowGraphCompiler* compiler) {
|
| // Check that the type of the value is allowed in conditional context.
|
| @@ -198,6 +199,7 @@
|
|
|
| __ pushl(reg); // Push the source object.
|
| compiler->GenerateCallRuntime(token_pos,
|
| + deopt_id,
|
| kConditionTypeErrorRuntimeEntry,
|
| locs);
|
| // We should never return here.
|
| @@ -211,7 +213,7 @@
|
| Register result = locs()->out().reg();
|
|
|
| if (!is_eliminated()) {
|
| - EmitAssertBoolean(obj, token_pos(), locs(), compiler);
|
| + EmitAssertBoolean(obj, token_pos(), deopt_id(), locs(), compiler);
|
| }
|
| ASSERT(obj == result);
|
| }
|
| @@ -238,6 +240,7 @@
|
| __ PushObject(formal_parameter_name());
|
| __ pushl(saved_args_desc);
|
| compiler->GenerateCallRuntime(token_pos(),
|
| + deopt_id(),
|
| kArgumentDefinitionTestRuntimeEntry,
|
| locs());
|
| __ Drop(3);
|
| @@ -498,7 +501,7 @@
|
| }
|
| } else {
|
| if (branch->is_checked()) {
|
| - EmitAssertBoolean(EAX, token_pos, locs, compiler);
|
| + EmitAssertBoolean(EAX, token_pos, deopt_id, locs, compiler);
|
| }
|
| __ CompareObject(EAX, Bool::True());
|
| branch->EmitBranchOnCondition(compiler, cond);
|
| @@ -869,7 +872,7 @@
|
| locs(),
|
| *ic_data());
|
| if (branch->is_checked()) {
|
| - EmitAssertBoolean(EAX, token_pos(), locs(), compiler);
|
| + EmitAssertBoolean(EAX, token_pos(), deopt_id(), locs(), compiler);
|
| }
|
| Condition branch_condition = (kind() == Token::kNE) ? NOT_EQUAL : EQUAL;
|
| __ CompareObject(EAX, Bool::True());
|
| @@ -1523,6 +1526,7 @@
|
| ASSERT(locs()->in(2).reg() == EDX); // Instantiator type arguments.
|
|
|
| compiler->GenerateInstanceOf(token_pos(),
|
| + deopt_id(),
|
| type(),
|
| negate_result(),
|
| locs());
|
| @@ -1585,6 +1589,7 @@
|
| __ pushl(type_arguments);
|
| __ pushl(instantiator_type_arguments);
|
| compiler->GenerateCallRuntime(token_pos(),
|
| + deopt_id(),
|
| kAllocateObjectWithBoundsCheckRuntimeEntry,
|
| locs());
|
| // Pop instantiator type arguments, type arguments, and class.
|
| @@ -1660,6 +1665,7 @@
|
| __ PushObject(type_arguments());
|
| __ pushl(instantiator_reg); // Push instantiator type arguments.
|
| compiler->GenerateCallRuntime(token_pos(),
|
| + deopt_id(),
|
| kInstantiateTypeArgumentsRuntimeEntry,
|
| locs());
|
| __ Drop(2); // Drop instantiator and uninstantiated type arguments.
|
| @@ -1838,6 +1844,7 @@
|
| __ PushObject(Object::ZoneHandle()); // Make room for the result.
|
| __ pushl(context_value);
|
| compiler->GenerateCallRuntime(token_pos(),
|
| + deopt_id(),
|
| kCloneContextRuntimeEntry,
|
| locs());
|
| __ popl(result); // Remove argument.
|
| @@ -1892,9 +1899,15 @@
|
| __ Comment("CheckStackOverflowSlowPath");
|
| __ Bind(entry_label());
|
| compiler->SaveLiveRegisters(instruction_->locs());
|
| + // pending_deoptimization_env_ is needed to generate a runtime call that
|
| + // may throw an exception.
|
| + ASSERT(compiler->pending_deoptimization_env_ == NULL);
|
| + compiler->pending_deoptimization_env_ = instruction_->env();
|
| compiler->GenerateCallRuntime(instruction_->token_pos(),
|
| + instruction_->deopt_id(),
|
| kStackOverflowRuntimeEntry,
|
| instruction_->locs());
|
| + compiler->pending_deoptimization_env_ = NULL;
|
| compiler->RestoreLiveRegisters(instruction_->locs());
|
| __ jmp(exit_label());
|
| }
|
| @@ -3030,6 +3043,7 @@
|
|
|
| void ThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| compiler->GenerateCallRuntime(token_pos(),
|
| + deopt_id(),
|
| kThrowRuntimeEntry,
|
| locs());
|
| __ int3();
|
| @@ -3043,6 +3057,7 @@
|
|
|
| void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| compiler->GenerateCallRuntime(token_pos(),
|
| + deopt_id(),
|
| kReThrowRuntimeEntry,
|
| locs());
|
| __ int3();
|
|
|