OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 SubtypeTestCache::ZoneHandle(zone(), | 492 SubtypeTestCache::ZoneHandle(zone(), |
493 GenerateCallSubtypeTestStub(kTestTypeThreeArgs, | 493 GenerateCallSubtypeTestStub(kTestTypeThreeArgs, |
494 kInstanceReg, | 494 kInstanceReg, |
495 kTypeArgumentsReg, | 495 kTypeArgumentsReg, |
496 kTempReg, | 496 kTempReg, |
497 is_instance_lbl, | 497 is_instance_lbl, |
498 is_not_instance_lbl)); | 498 is_not_instance_lbl)); |
499 __ Bind(&fall_through); | 499 __ Bind(&fall_through); |
500 return type_test_cache.raw(); | 500 return type_test_cache.raw(); |
501 } | 501 } |
502 if (type.IsType()) { | 502 if (type.IsType() || type.IsFunctionType()) { |
503 const Register kInstanceReg = R0; | 503 const Register kInstanceReg = R0; |
504 const Register kTypeArgumentsReg = R1; | 504 const Register kTypeArgumentsReg = R1; |
505 __ tsti(kInstanceReg, Immediate(kSmiTagMask)); // Is instance Smi? | 505 __ tsti(kInstanceReg, Immediate(kSmiTagMask)); // Is instance Smi? |
506 __ b(is_not_instance_lbl, EQ); | 506 __ b(is_not_instance_lbl, EQ); |
507 __ ldr(kTypeArgumentsReg, Address(SP)); // Instantiator type args. | 507 __ ldr(kTypeArgumentsReg, Address(SP)); // Instantiator type args. |
508 // Uninstantiated type class is known at compile time, but the type | 508 // Uninstantiated type class is known at compile time, but the type |
509 // arguments are determined at runtime by the instantiator. | 509 // arguments are determined at runtime by the instantiator. |
510 const Register kTempReg = kNoRegister; | 510 const Register kTempReg = kNoRegister; |
511 return GenerateCallSubtypeTestStub(kTestTypeThreeArgs, | 511 return GenerateCallSubtypeTestStub(kTestTypeThreeArgs, |
512 kInstanceReg, | 512 kInstanceReg, |
(...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1872 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 1872 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
1873 __ PopDouble(reg); | 1873 __ PopDouble(reg); |
1874 } | 1874 } |
1875 | 1875 |
1876 | 1876 |
1877 #undef __ | 1877 #undef __ |
1878 | 1878 |
1879 } // namespace dart | 1879 } // namespace dart |
1880 | 1880 |
1881 #endif // defined TARGET_ARCH_ARM64 | 1881 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |