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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 static void EmitAssertBoolean(Register reg, | 244 static void EmitAssertBoolean(Register reg, |
245 intptr_t token_pos, | 245 intptr_t token_pos, |
246 intptr_t deopt_id, | 246 intptr_t deopt_id, |
247 LocationSummary* locs, | 247 LocationSummary* locs, |
248 FlowGraphCompiler* compiler) { | 248 FlowGraphCompiler* compiler) { |
249 // Check that the type of the value is allowed in conditional context. | 249 // Check that the type of the value is allowed in conditional context. |
250 // Call the runtime if the object is not bool::true or bool::false. | 250 // Call the runtime if the object is not bool::true or bool::false. |
251 ASSERT(locs->always_calls()); | 251 ASSERT(locs->always_calls()); |
252 Label done; | 252 Label done; |
253 | 253 |
254 if (FLAG_enable_type_checks) { | 254 if (Isolate::Current()->TypeChecksEnabled()) { |
255 __ CompareObject(reg, Bool::True()); | 255 __ CompareObject(reg, Bool::True()); |
256 __ j(EQUAL, &done, Assembler::kNearJump); | 256 __ j(EQUAL, &done, Assembler::kNearJump); |
257 __ CompareObject(reg, Bool::False()); | 257 __ CompareObject(reg, Bool::False()); |
258 __ j(EQUAL, &done, Assembler::kNearJump); | 258 __ j(EQUAL, &done, Assembler::kNearJump); |
259 } else { | 259 } else { |
260 ASSERT(FLAG_enable_asserts); | 260 ASSERT(FLAG_enable_asserts); |
261 __ CompareObject(reg, Object::null_instance()); | 261 __ CompareObject(reg, Object::null_instance()); |
262 __ j(NOT_EQUAL, &done, Assembler::kNearJump); | 262 __ j(NOT_EQUAL, &done, Assembler::kNearJump); |
263 } | 263 } |
264 | 264 |
(...skipping 6583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6848 __ Drop(1); | 6848 __ Drop(1); |
6849 __ popl(result); | 6849 __ popl(result); |
6850 } | 6850 } |
6851 | 6851 |
6852 | 6852 |
6853 } // namespace dart | 6853 } // namespace dart |
6854 | 6854 |
6855 #undef __ | 6855 #undef __ |
6856 | 6856 |
6857 #endif // defined TARGET_ARCH_IA32 | 6857 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |