| Index: runtime/vm/intermediate_language_x64.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language_x64.cc (revision 10606)
|
| +++ runtime/vm/intermediate_language_x64.cc (working copy)
|
| @@ -213,23 +213,25 @@
|
| Register obj = locs()->in(0).reg();
|
| Register result = locs()->out().reg();
|
|
|
| - // Check that the type of the value is allowed in conditional context.
|
| - // Call the runtime if the object is not bool::true or bool::false.
|
| - Label done;
|
| - __ CompareObject(obj, compiler->bool_true());
|
| - __ j(EQUAL, &done, Assembler::kNearJump);
|
| - __ CompareObject(obj, compiler->bool_false());
|
| - __ j(EQUAL, &done, Assembler::kNearJump);
|
| + if (!IsEliminated()) {
|
| + // Check that the type of the value is allowed in conditional context.
|
| + // Call the runtime if the object is not bool::true or bool::false.
|
| + Label done;
|
| + __ CompareObject(obj, compiler->bool_true());
|
| + __ j(EQUAL, &done, Assembler::kNearJump);
|
| + __ CompareObject(obj, compiler->bool_false());
|
| + __ j(EQUAL, &done, Assembler::kNearJump);
|
|
|
| - __ pushq(obj); // Push the source object.
|
| - compiler->GenerateCallRuntime(deopt_id(),
|
| - token_pos(),
|
| - try_index(),
|
| - kConditionTypeErrorRuntimeEntry);
|
| - // We should never return here.
|
| - __ int3();
|
| + __ pushq(obj); // Push the source object.
|
| + compiler->GenerateCallRuntime(deopt_id(),
|
| + token_pos(),
|
| + try_index(),
|
| + kConditionTypeErrorRuntimeEntry);
|
| + // We should never return here.
|
| + __ int3();
|
|
|
| - __ Bind(&done);
|
| + __ Bind(&done);
|
| + }
|
| ASSERT(obj == result);
|
| }
|
|
|
|
|