| 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 SubtypeTestCache::ZoneHandle(zone(), | 513 SubtypeTestCache::ZoneHandle(zone(), |
| 514 GenerateCallSubtypeTestStub(kTestTypeThreeArgs, | 514 GenerateCallSubtypeTestStub(kTestTypeThreeArgs, |
| 515 kInstanceReg, | 515 kInstanceReg, |
| 516 kTypeArgumentsReg, | 516 kTypeArgumentsReg, |
| 517 kTempReg, | 517 kTempReg, |
| 518 is_instance_lbl, | 518 is_instance_lbl, |
| 519 is_not_instance_lbl)); | 519 is_not_instance_lbl)); |
| 520 __ Bind(&fall_through); | 520 __ Bind(&fall_through); |
| 521 return type_test_cache.raw(); | 521 return type_test_cache.raw(); |
| 522 } | 522 } |
| 523 if (type.IsType() || type.IsFunctionType()) { | 523 if (type.IsType()) { |
| 524 const Register kInstanceReg = EAX; | 524 const Register kInstanceReg = EAX; |
| 525 const Register kTypeArgumentsReg = EDX; | 525 const Register kTypeArgumentsReg = EDX; |
| 526 __ testl(kInstanceReg, Immediate(kSmiTagMask)); // Is instance Smi? | 526 __ testl(kInstanceReg, Immediate(kSmiTagMask)); // Is instance Smi? |
| 527 __ j(ZERO, is_not_instance_lbl); | 527 __ j(ZERO, is_not_instance_lbl); |
| 528 __ movl(kTypeArgumentsReg, Address(ESP, 0)); // Instantiator type args. | 528 __ movl(kTypeArgumentsReg, Address(ESP, 0)); // Instantiator type args. |
| 529 // Uninstantiated type class is known at compile time, but the type | 529 // Uninstantiated type class is known at compile time, but the type |
| 530 // arguments are determined at runtime by the instantiator. | 530 // arguments are determined at runtime by the instantiator. |
| 531 const Register kTempReg = EDI; | 531 const Register kTempReg = EDI; |
| 532 return GenerateCallSubtypeTestStub(kTestTypeThreeArgs, | 532 return GenerateCallSubtypeTestStub(kTestTypeThreeArgs, |
| 533 kInstanceReg, | 533 kInstanceReg, |
| (...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1850 __ movups(reg, Address(ESP, 0)); | 1850 __ movups(reg, Address(ESP, 0)); |
| 1851 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1851 __ addl(ESP, Immediate(kFpuRegisterSize)); |
| 1852 } | 1852 } |
| 1853 | 1853 |
| 1854 | 1854 |
| 1855 #undef __ | 1855 #undef __ |
| 1856 | 1856 |
| 1857 } // namespace dart | 1857 } // namespace dart |
| 1858 | 1858 |
| 1859 #endif // defined TARGET_ARCH_IA32 | 1859 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |