| 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/intrinsifier.h" | 8 #include "vm/intrinsifier.h" |
| 9 | 9 |
| 10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
| (...skipping 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1530 __ LoadObject(R0, Bool::True(), EQ); | 1530 __ LoadObject(R0, Bool::True(), EQ); |
| 1531 __ Ret(); | 1531 __ Ret(); |
| 1532 } | 1532 } |
| 1533 | 1533 |
| 1534 | 1534 |
| 1535 // Return type quickly for simple types (not parameterized and not signature). | 1535 // Return type quickly for simple types (not parameterized and not signature). |
| 1536 void Intrinsifier::ObjectRuntimeType(Assembler* assembler) { | 1536 void Intrinsifier::ObjectRuntimeType(Assembler* assembler) { |
| 1537 Label fall_through; | 1537 Label fall_through; |
| 1538 __ ldr(R0, Address(SP, 0 * kWordSize)); | 1538 __ ldr(R0, Address(SP, 0 * kWordSize)); |
| 1539 __ LoadClassIdMayBeSmi(R1, R0); | 1539 __ LoadClassIdMayBeSmi(R1, R0); |
| 1540 __ CompareImmediate(R1, kClosureCid); |
| 1541 __ b(&fall_through, EQ); // Instance is a closure. |
| 1540 __ LoadClassById(R2, R1); | 1542 __ LoadClassById(R2, R1); |
| 1541 | |
| 1542 // R2: class of instance (R0). | 1543 // R2: class of instance (R0). |
| 1543 __ ldr(R3, FieldAddress(R2, Class::signature_function_offset())); | |
| 1544 __ CompareObject(R3, Object::null_object()); | |
| 1545 __ b(&fall_through, NE); | |
| 1546 | 1544 |
| 1547 __ ldrh(R3, FieldAddress(R2, Class::num_type_arguments_offset())); | 1545 __ ldrh(R3, FieldAddress(R2, Class::num_type_arguments_offset())); |
| 1548 __ CompareImmediate(R3, 0); | 1546 __ CompareImmediate(R3, 0); |
| 1549 __ b(&fall_through, NE); | 1547 __ b(&fall_through, NE); |
| 1550 | 1548 |
| 1551 __ ldr(R0, FieldAddress(R2, Class::canonical_types_offset())); | 1549 __ ldr(R0, FieldAddress(R2, Class::canonical_types_offset())); |
| 1552 __ CompareObject(R0, Object::null_object()); | 1550 __ CompareObject(R0, Object::null_object()); |
| 1553 __ b(&fall_through, EQ); | 1551 __ b(&fall_through, EQ); |
| 1554 __ Ret(); | 1552 __ Ret(); |
| 1555 | 1553 |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2124 | 2122 |
| 2125 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { | 2123 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { |
| 2126 __ LoadIsolate(R0); | 2124 __ LoadIsolate(R0); |
| 2127 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); | 2125 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); |
| 2128 __ Ret(); | 2126 __ Ret(); |
| 2129 } | 2127 } |
| 2130 | 2128 |
| 2131 } // namespace dart | 2129 } // namespace dart |
| 2132 | 2130 |
| 2133 #endif // defined TARGET_ARCH_ARM | 2131 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |