| 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/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 NULL)) { | 221 NULL)) { |
| 222 __ j(ZERO, is_instance_lbl); | 222 __ j(ZERO, is_instance_lbl); |
| 223 } else { | 223 } else { |
| 224 __ j(ZERO, is_not_instance_lbl); | 224 __ j(ZERO, is_not_instance_lbl); |
| 225 } | 225 } |
| 226 // Compare if the classes are equal. | 226 // Compare if the classes are equal. |
| 227 const Register kClassIdReg = R10; | 227 const Register kClassIdReg = R10; |
| 228 __ LoadClassId(kClassIdReg, kInstanceReg); | 228 __ LoadClassId(kClassIdReg, kInstanceReg); |
| 229 __ cmpl(kClassIdReg, Immediate(type_class.id())); | 229 __ cmpl(kClassIdReg, Immediate(type_class.id())); |
| 230 __ j(EQUAL, is_instance_lbl); | 230 __ j(EQUAL, is_instance_lbl); |
| 231 // See ClassFinalizer::ResolveSuperTypeAndInterfaces for list of restricted |
| 232 // interfaces. |
| 231 // Bool interface can be implemented only by core class Bool. | 233 // Bool interface can be implemented only by core class Bool. |
| 232 // (see ClassFinalizer::ResolveInterfaces for list of restricted interfaces). | |
| 233 if (type.IsBoolType()) { | 234 if (type.IsBoolType()) { |
| 234 __ cmpl(kClassIdReg, Immediate(kBoolCid)); | 235 __ cmpl(kClassIdReg, Immediate(kBoolCid)); |
| 235 __ j(EQUAL, is_instance_lbl); | 236 __ j(EQUAL, is_instance_lbl); |
| 236 __ jmp(is_not_instance_lbl); | 237 __ jmp(is_not_instance_lbl); |
| 237 return false; | 238 return false; |
| 238 } | 239 } |
| 239 if (type.IsFunctionType()) { | 240 if (type.IsFunctionType()) { |
| 240 // Check if instance is a closure. | 241 // Check if instance is a closure. |
| 241 const Immediate& raw_null = | 242 const Immediate& raw_null = |
| 242 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 243 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
| (...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1691 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { | 1692 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { |
| 1692 __ Exchange(mem1, mem2); | 1693 __ Exchange(mem1, mem2); |
| 1693 } | 1694 } |
| 1694 | 1695 |
| 1695 | 1696 |
| 1696 #undef __ | 1697 #undef __ |
| 1697 | 1698 |
| 1698 } // namespace dart | 1699 } // namespace dart |
| 1699 | 1700 |
| 1700 #endif // defined TARGET_ARCH_X64 | 1701 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |