| 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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 TokenPosition token_pos, | 439 TokenPosition token_pos, |
| 440 const Class& type_class, | 440 const Class& type_class, |
| 441 Label* is_instance_lbl, | 441 Label* is_instance_lbl, |
| 442 Label* is_not_instance_lbl) { | 442 Label* is_not_instance_lbl) { |
| 443 __ Comment("Subtype1TestCacheLookup"); | 443 __ Comment("Subtype1TestCacheLookup"); |
| 444 const Register kInstanceReg = EAX; | 444 const Register kInstanceReg = EAX; |
| 445 __ LoadClass(ECX, kInstanceReg, EDI); | 445 __ LoadClass(ECX, kInstanceReg, EDI); |
| 446 // ECX: instance class. | 446 // ECX: instance class. |
| 447 // Check immediate superclass equality. | 447 // Check immediate superclass equality. |
| 448 __ movl(EDI, FieldAddress(ECX, Class::super_type_offset())); | 448 __ movl(EDI, FieldAddress(ECX, Class::super_type_offset())); |
| 449 __ movl(EDI, FieldAddress(EDI, Type::type_class_offset())); | 449 __ movl(EDI, FieldAddress(EDI, Type::type_class_id_offset())); |
| 450 __ CompareObject(EDI, type_class); | 450 __ cmpl(EDI, Immediate(Smi::RawValue(type_class.id()))); |
| 451 __ j(EQUAL, is_instance_lbl); | 451 __ j(EQUAL, is_instance_lbl); |
| 452 | 452 |
| 453 const Register kTypeArgumentsReg = kNoRegister; | 453 const Register kTypeArgumentsReg = kNoRegister; |
| 454 const Register kTempReg = EDI; | 454 const Register kTempReg = EDI; |
| 455 return GenerateCallSubtypeTestStub(kTestTypeOneArg, | 455 return GenerateCallSubtypeTestStub(kTestTypeOneArg, |
| 456 kInstanceReg, | 456 kInstanceReg, |
| 457 kTypeArgumentsReg, | 457 kTypeArgumentsReg, |
| 458 kTempReg, | 458 kTempReg, |
| 459 is_instance_lbl, | 459 is_instance_lbl, |
| 460 is_not_instance_lbl); | 460 is_not_instance_lbl); |
| (...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1871 __ movups(reg, Address(ESP, 0)); | 1871 __ movups(reg, Address(ESP, 0)); |
| 1872 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1872 __ addl(ESP, Immediate(kFpuRegisterSize)); |
| 1873 } | 1873 } |
| 1874 | 1874 |
| 1875 | 1875 |
| 1876 #undef __ | 1876 #undef __ |
| 1877 | 1877 |
| 1878 } // namespace dart | 1878 } // namespace dart |
| 1879 | 1879 |
| 1880 #endif // defined TARGET_ARCH_IA32 | 1880 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |