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/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1763 // R1: instantiator type arguments or NULL. | 1763 // R1: instantiator type arguments or NULL. |
1764 // R2: SubtypeTestCache. | 1764 // R2: SubtypeTestCache. |
1765 // R3: instance class id. | 1765 // R3: instance class id. |
1766 // R4: instance type arguments (null if none), used only if n > 1. | 1766 // R4: instance type arguments (null if none), used only if n > 1. |
1767 __ ldr(R2, FieldAddress(R2, SubtypeTestCache::cache_offset())); | 1767 __ ldr(R2, FieldAddress(R2, SubtypeTestCache::cache_offset())); |
1768 __ AddImmediate(R2, Array::data_offset() - kHeapObjectTag); | 1768 __ AddImmediate(R2, Array::data_offset() - kHeapObjectTag); |
1769 | 1769 |
1770 Label loop, found, not_found, next_iteration; | 1770 Label loop, found, not_found, next_iteration; |
1771 // R2: entry start. | 1771 // R2: entry start. |
1772 // R3: instance class id. | 1772 // R3: instance class id. |
1773 // R4: instance type arguments. | 1773 // R4: instance type arguments (still null if closure). |
1774 __ SmiTag(R3); | 1774 __ SmiTag(R3); |
1775 __ CompareImmediate(R3, Smi::RawValue(kClosureCid)); | 1775 __ CompareImmediate(R3, Smi::RawValue(kClosureCid)); |
| 1776 __ ldr(R4, FieldAddress(R0, Closure::instantiator_offset()), EQ); |
1776 __ ldr(R3, FieldAddress(R0, Closure::function_offset()), EQ); | 1777 __ ldr(R3, FieldAddress(R0, Closure::function_offset()), EQ); |
1777 // R3: instance class id as Smi or function. | 1778 // R3: instance class id as Smi or function. |
1778 __ Bind(&loop); | 1779 __ Bind(&loop); |
1779 __ ldr(R9, | 1780 __ ldr(R9, |
1780 Address(R2, kWordSize * SubtypeTestCache::kInstanceClassIdOrFunction)); | 1781 Address(R2, kWordSize * SubtypeTestCache::kInstanceClassIdOrFunction)); |
1781 __ CompareObject(R9, Object::null_object()); | 1782 __ CompareObject(R9, Object::null_object()); |
1782 __ b(¬_found, EQ); | 1783 __ b(¬_found, EQ); |
1783 __ cmp(R9, Operand(R3)); | 1784 __ cmp(R9, Operand(R3)); |
1784 if (n == 1) { | 1785 if (n == 1) { |
1785 __ b(&found, EQ); | 1786 __ b(&found, EQ); |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2285 } | 2286 } |
2286 | 2287 |
2287 | 2288 |
2288 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { | 2289 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { |
2289 __ bkpt(0); | 2290 __ bkpt(0); |
2290 } | 2291 } |
2291 | 2292 |
2292 } // namespace dart | 2293 } // namespace dart |
2293 | 2294 |
2294 #endif // defined TARGET_ARCH_ARM | 2295 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |