| 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" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1588 // R1: instantiator type arguments or NULL. | 1588 // R1: instantiator type arguments or NULL. |
| 1589 // R2: cache array. | 1589 // R2: cache array. |
| 1590 // Result in R1: null -> not found, otherwise result (true or false). | 1590 // Result in R1: null -> not found, otherwise result (true or false). |
| 1591 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) { | 1591 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) { |
| 1592 ASSERT((1 <= n) && (n <= 3)); | 1592 ASSERT((1 <= n) && (n <= 3)); |
| 1593 if (n > 1) { | 1593 if (n > 1) { |
| 1594 // Get instance type arguments. | 1594 // Get instance type arguments. |
| 1595 __ LoadClass(R3, R0, R4); | 1595 __ LoadClass(R3, R0, R4); |
| 1596 // Compute instance type arguments into R4. | 1596 // Compute instance type arguments into R4. |
| 1597 Label has_no_type_arguments; | 1597 Label has_no_type_arguments; |
| 1598 __ LoadImmediate(R4, reinterpret_cast<intptr_t>(Object::null())); | |
| 1599 __ ldr(R5, FieldAddress(R3, | 1598 __ ldr(R5, FieldAddress(R3, |
| 1600 Class::type_arguments_field_offset_in_words_offset())); | 1599 Class::type_arguments_field_offset_in_words_offset())); |
| 1601 __ CompareImmediate(R5, Class::kNoTypeArguments); | 1600 __ CompareImmediate(R5, Class::kNoTypeArguments); |
| 1602 __ b(&has_no_type_arguments, EQ); | 1601 __ b(&has_no_type_arguments, EQ); |
| 1603 __ add(R5, R0, ShifterOperand(R5, LSL, 2)); | 1602 __ add(R5, R0, ShifterOperand(R5, LSL, 2)); |
| 1604 __ ldr(R4, FieldAddress(R5, 0)); | 1603 __ ldr(R4, FieldAddress(R5, 0)); |
| 1605 __ Bind(&has_no_type_arguments); | 1604 __ Bind(&has_no_type_arguments); |
| 1606 } | 1605 } |
| 1607 __ LoadClassId(R3, R0); | 1606 __ LoadClassId(R3, R0); |
| 1608 // R0: instance. | 1607 // R0: instance. |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1903 __ Bind(&reference_compare); | 1902 __ Bind(&reference_compare); |
| 1904 __ cmp(left, ShifterOperand(right)); | 1903 __ cmp(left, ShifterOperand(right)); |
| 1905 __ Bind(&done); | 1904 __ Bind(&done); |
| 1906 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); | 1905 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); |
| 1907 __ Ret(); | 1906 __ Ret(); |
| 1908 } | 1907 } |
| 1909 | 1908 |
| 1910 } // namespace dart | 1909 } // namespace dart |
| 1911 | 1910 |
| 1912 #endif // defined TARGET_ARCH_ARM | 1911 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |