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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 SubtypeTestCache::ZoneHandle(zone(), | 508 SubtypeTestCache::ZoneHandle(zone(), |
509 GenerateCallSubtypeTestStub(kTestTypeThreeArgs, | 509 GenerateCallSubtypeTestStub(kTestTypeThreeArgs, |
510 kInstanceReg, | 510 kInstanceReg, |
511 kTypeArgumentsReg, | 511 kTypeArgumentsReg, |
512 kTempReg, | 512 kTempReg, |
513 is_instance_lbl, | 513 is_instance_lbl, |
514 is_not_instance_lbl)); | 514 is_not_instance_lbl)); |
515 __ Bind(&fall_through); | 515 __ Bind(&fall_through); |
516 return type_test_cache.raw(); | 516 return type_test_cache.raw(); |
517 } | 517 } |
518 if (type.IsType() || type.IsFunctionType()) { | 518 if (type.IsType()) { |
519 const Register kInstanceReg = RAX; | 519 const Register kInstanceReg = RAX; |
520 const Register kTypeArgumentsReg = RDX; | 520 const Register kTypeArgumentsReg = RDX; |
521 __ testq(kInstanceReg, Immediate(kSmiTagMask)); // Is instance Smi? | 521 __ testq(kInstanceReg, Immediate(kSmiTagMask)); // Is instance Smi? |
522 __ j(ZERO, is_not_instance_lbl); | 522 __ j(ZERO, is_not_instance_lbl); |
523 __ movq(kTypeArgumentsReg, Address(RSP, 0)); // Instantiator type args. | 523 __ movq(kTypeArgumentsReg, Address(RSP, 0)); // Instantiator type args. |
524 // Uninstantiated type class is known at compile time, but the type | 524 // Uninstantiated type class is known at compile time, but the type |
525 // arguments are determined at runtime by the instantiator. | 525 // arguments are determined at runtime by the instantiator. |
526 const Register kTempReg = R10; | 526 const Register kTempReg = R10; |
527 return GenerateCallSubtypeTestStub(kTestTypeThreeArgs, | 527 return GenerateCallSubtypeTestStub(kTestTypeThreeArgs, |
528 kInstanceReg, | 528 kInstanceReg, |
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1851 __ movups(reg, Address(RSP, 0)); | 1851 __ movups(reg, Address(RSP, 0)); |
1852 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); | 1852 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); |
1853 } | 1853 } |
1854 | 1854 |
1855 | 1855 |
1856 #undef __ | 1856 #undef __ |
1857 | 1857 |
1858 } // namespace dart | 1858 } // namespace dart |
1859 | 1859 |
1860 #endif // defined TARGET_ARCH_X64 | 1860 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |