OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
7 | 7 |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 static void EmitAssertBoolean(Register reg, | 426 static void EmitAssertBoolean(Register reg, |
427 intptr_t token_pos, | 427 intptr_t token_pos, |
428 intptr_t deopt_id, | 428 intptr_t deopt_id, |
429 LocationSummary* locs, | 429 LocationSummary* locs, |
430 FlowGraphCompiler* compiler) { | 430 FlowGraphCompiler* compiler) { |
431 // Check that the type of the value is allowed in conditional context. | 431 // Check that the type of the value is allowed in conditional context. |
432 // Call the runtime if the object is not bool::true or bool::false. | 432 // Call the runtime if the object is not bool::true or bool::false. |
433 ASSERT(locs->always_calls()); | 433 ASSERT(locs->always_calls()); |
434 Label done; | 434 Label done; |
435 | 435 |
436 if (FLAG_enable_type_checks) { | 436 if (Isolate::Current()->TypeChecksEnabled()) { |
437 __ BranchEqual(reg, Bool::True(), &done); | 437 __ BranchEqual(reg, Bool::True(), &done); |
438 __ BranchEqual(reg, Bool::False(), &done); | 438 __ BranchEqual(reg, Bool::False(), &done); |
439 } else { | 439 } else { |
440 ASSERT(FLAG_enable_asserts); | 440 ASSERT(FLAG_enable_asserts); |
441 __ BranchNotEqual(reg, Object::null_instance(), &done); | 441 __ BranchNotEqual(reg, Object::null_instance(), &done); |
442 } | 442 } |
443 | 443 |
444 __ Push(reg); // Push the source object. | 444 __ Push(reg); // Push the source object. |
445 compiler->GenerateRuntimeCall(token_pos, | 445 compiler->GenerateRuntimeCall(token_pos, |
446 deopt_id, | 446 deopt_id, |
(...skipping 5173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5620 1, | 5620 1, |
5621 locs()); | 5621 locs()); |
5622 __ lw(result, Address(SP, 1 * kWordSize)); | 5622 __ lw(result, Address(SP, 1 * kWordSize)); |
5623 __ addiu(SP, SP, Immediate(2 * kWordSize)); | 5623 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
5624 } | 5624 } |
5625 | 5625 |
5626 | 5626 |
5627 } // namespace dart | 5627 } // namespace dart |
5628 | 5628 |
5629 #endif // defined TARGET_ARCH_MIPS | 5629 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |