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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 static void EmitAssertBoolean(Register reg, | 325 static void EmitAssertBoolean(Register reg, |
326 intptr_t token_pos, | 326 intptr_t token_pos, |
327 intptr_t deopt_id, | 327 intptr_t deopt_id, |
328 LocationSummary* locs, | 328 LocationSummary* locs, |
329 FlowGraphCompiler* compiler) { | 329 FlowGraphCompiler* compiler) { |
330 // Check that the type of the value is allowed in conditional context. | 330 // Check that the type of the value is allowed in conditional context. |
331 // Call the runtime if the object is not bool::true or bool::false. | 331 // Call the runtime if the object is not bool::true or bool::false. |
332 ASSERT(locs->always_calls()); | 332 ASSERT(locs->always_calls()); |
333 Label done; | 333 Label done; |
334 | 334 |
335 if (FLAG_enable_type_checks) { | 335 if (Isolate::Current()->TypeChecksEnabled()) { |
336 __ CompareObject(reg, Bool::True(), PP); | 336 __ CompareObject(reg, Bool::True(), PP); |
337 __ j(EQUAL, &done, Assembler::kNearJump); | 337 __ j(EQUAL, &done, Assembler::kNearJump); |
338 __ CompareObject(reg, Bool::False(), PP); | 338 __ CompareObject(reg, Bool::False(), PP); |
339 __ j(EQUAL, &done, Assembler::kNearJump); | 339 __ j(EQUAL, &done, Assembler::kNearJump); |
340 } else { | 340 } else { |
341 ASSERT(FLAG_enable_asserts); | 341 ASSERT(FLAG_enable_asserts); |
342 __ CompareObject(reg, Object::null_instance(), PP); | 342 __ CompareObject(reg, Object::null_instance(), PP); |
343 __ j(NOT_EQUAL, &done, Assembler::kNearJump); | 343 __ j(NOT_EQUAL, &done, Assembler::kNearJump); |
344 } | 344 } |
345 | 345 |
(...skipping 6096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6442 __ Drop(1); | 6442 __ Drop(1); |
6443 __ popq(result); | 6443 __ popq(result); |
6444 } | 6444 } |
6445 | 6445 |
6446 | 6446 |
6447 } // namespace dart | 6447 } // namespace dart |
6448 | 6448 |
6449 #undef __ | 6449 #undef __ |
6450 | 6450 |
6451 #endif // defined TARGET_ARCH_X64 | 6451 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |