| Index: runtime/vm/intermediate_language_arm.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language_arm.cc (revision 42139)
|
| +++ runtime/vm/intermediate_language_arm.cc (working copy)
|
| @@ -25,6 +25,8 @@
|
| namespace dart {
|
|
|
| DECLARE_FLAG(bool, emit_edge_counters);
|
| +DECLARE_FLAG(bool, enable_asserts);
|
| +DECLARE_FLAG(bool, enable_type_checks);
|
| DECLARE_FLAG(int, optimization_counter_threshold);
|
| DECLARE_FLAG(bool, propagate_ic_data);
|
| DECLARE_FLAG(bool, use_osr);
|
| @@ -376,11 +378,18 @@
|
| // Call the runtime if the object is not bool::true or bool::false.
|
| ASSERT(locs->always_calls());
|
| Label done;
|
| - __ CompareObject(reg, Bool::True());
|
| - __ b(&done, EQ);
|
| - __ CompareObject(reg, Bool::False());
|
| - __ b(&done, EQ);
|
|
|
| + if (FLAG_enable_type_checks) {
|
| + __ CompareObject(reg, Bool::True());
|
| + __ b(&done, EQ);
|
| + __ CompareObject(reg, Bool::False());
|
| + __ b(&done, EQ);
|
| + } else {
|
| + ASSERT(FLAG_enable_asserts);
|
| + __ CompareObject(reg, Object::null_instance());
|
| + __ b(&done, NE);
|
| + }
|
| +
|
| __ Push(reg); // Push the source object.
|
| compiler->GenerateRuntimeCall(token_pos,
|
| deopt_id,
|
|
|