| 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/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 // Fallthrough. | 347 // Fallthrough. |
| 348 return true; | 348 return true; |
| 349 } | 349 } |
| 350 const Class& type_class = Class::Handle(zone(), type.type_class()); | 350 const Class& type_class = Class::Handle(zone(), type.type_class()); |
| 351 ASSERT(type_class.NumTypeArguments() == 0); | 351 ASSERT(type_class.NumTypeArguments() == 0); |
| 352 | 352 |
| 353 const Register kInstanceReg = EAX; | 353 const Register kInstanceReg = EAX; |
| 354 __ testl(kInstanceReg, Immediate(kSmiTagMask)); | 354 __ testl(kInstanceReg, Immediate(kSmiTagMask)); |
| 355 // If instance is Smi, check directly. | 355 // If instance is Smi, check directly. |
| 356 const Class& smi_class = Class::Handle(zone(), Smi::Class()); | 356 const Class& smi_class = Class::Handle(zone(), Smi::Class()); |
| 357 if (smi_class.IsSubtypeOf(TypeArguments::Handle(zone()), type_class, | 357 if (smi_class.IsSubtypeOf(Object::null_type_arguments(), type_class, |
| 358 TypeArguments::Handle(zone()), NULL, NULL, | 358 Object::null_type_arguments(), NULL, NULL, |
| 359 Heap::kOld)) { | 359 Heap::kOld)) { |
| 360 __ j(ZERO, is_instance_lbl); | 360 __ j(ZERO, is_instance_lbl); |
| 361 } else { | 361 } else { |
| 362 __ j(ZERO, is_not_instance_lbl); | 362 __ j(ZERO, is_not_instance_lbl); |
| 363 } | 363 } |
| 364 const Register kClassIdReg = ECX; | 364 const Register kClassIdReg = ECX; |
| 365 __ LoadClassId(kClassIdReg, kInstanceReg); | 365 __ LoadClassId(kClassIdReg, kInstanceReg); |
| 366 // See ClassFinalizer::ResolveSuperTypeAndInterfaces for list of restricted | 366 // See ClassFinalizer::ResolveSuperTypeAndInterfaces for list of restricted |
| 367 // interfaces. | 367 // interfaces. |
| 368 // Bool interface can be implemented only by core class Bool. | 368 // Bool interface can be implemented only by core class Bool. |
| (...skipping 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1768 __ movups(reg, Address(ESP, 0)); | 1768 __ movups(reg, Address(ESP, 0)); |
| 1769 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1769 __ addl(ESP, Immediate(kFpuRegisterSize)); |
| 1770 } | 1770 } |
| 1771 | 1771 |
| 1772 | 1772 |
| 1773 #undef __ | 1773 #undef __ |
| 1774 | 1774 |
| 1775 } // namespace dart | 1775 } // namespace dart |
| 1776 | 1776 |
| 1777 #endif // defined TARGET_ARCH_IA32 | 1777 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |