| 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 "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 TokenPosition token_pos, | 435 TokenPosition token_pos, |
| 436 const Class& type_class, | 436 const Class& type_class, |
| 437 Label* is_instance_lbl, | 437 Label* is_instance_lbl, |
| 438 Label* is_not_instance_lbl) { | 438 Label* is_not_instance_lbl) { |
| 439 __ Comment("Subtype1TestCacheLookup"); | 439 __ Comment("Subtype1TestCacheLookup"); |
| 440 const Register kInstanceReg = RAX; | 440 const Register kInstanceReg = RAX; |
| 441 __ LoadClass(R10, kInstanceReg); | 441 __ LoadClass(R10, kInstanceReg); |
| 442 // R10: instance class. | 442 // R10: instance class. |
| 443 // Check immediate superclass equality. | 443 // Check immediate superclass equality. |
| 444 __ movq(R13, FieldAddress(R10, Class::super_type_offset())); | 444 __ movq(R13, FieldAddress(R10, Class::super_type_offset())); |
| 445 __ movq(R13, FieldAddress(R13, Type::type_class_offset())); | 445 __ movq(R13, FieldAddress(R13, Type::type_class_id_offset())); |
| 446 __ CompareObject(R13, type_class); | 446 __ CompareImmediate(R13, Immediate(Smi::RawValue(type_class.id()))); |
| 447 __ j(EQUAL, is_instance_lbl); | 447 __ j(EQUAL, is_instance_lbl); |
| 448 | 448 |
| 449 const Register kTypeArgumentsReg = kNoRegister; | 449 const Register kTypeArgumentsReg = kNoRegister; |
| 450 const Register kTempReg = R10; | 450 const Register kTempReg = R10; |
| 451 return GenerateCallSubtypeTestStub(kTestTypeOneArg, | 451 return GenerateCallSubtypeTestStub(kTestTypeOneArg, |
| 452 kInstanceReg, | 452 kInstanceReg, |
| 453 kTypeArgumentsReg, | 453 kTypeArgumentsReg, |
| 454 kTempReg, | 454 kTempReg, |
| 455 is_instance_lbl, | 455 is_instance_lbl, |
| 456 is_not_instance_lbl); | 456 is_not_instance_lbl); |
| (...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1868 __ movups(reg, Address(RSP, 0)); | 1868 __ movups(reg, Address(RSP, 0)); |
| 1869 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); | 1869 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); |
| 1870 } | 1870 } |
| 1871 | 1871 |
| 1872 | 1872 |
| 1873 #undef __ | 1873 #undef __ |
| 1874 | 1874 |
| 1875 } // namespace dart | 1875 } // namespace dart |
| 1876 | 1876 |
| 1877 #endif // defined TARGET_ARCH_X64 | 1877 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |