| 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" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 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 1817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1828 __ LoadFieldFromOffset(R3, R3, SubtypeTestCache::cache_offset()); | 1828 __ LoadFieldFromOffset(R3, R3, SubtypeTestCache::cache_offset()); |
| 1829 __ AddImmediate(R3, R3, Array::data_offset() - kHeapObjectTag); | 1829 __ AddImmediate(R3, R3, Array::data_offset() - kHeapObjectTag); |
| 1830 | 1830 |
| 1831 Label loop, found, not_found, next_iteration; | 1831 Label loop, found, not_found, next_iteration; |
| 1832 // R3: entry start. | 1832 // R3: entry start. |
| 1833 // R6: instance class id. | 1833 // R6: instance class id. |
| 1834 // R4: instance type arguments (still null if closure). | 1834 // R4: instance type arguments (still null if closure). |
| 1835 __ SmiTag(R6); | 1835 __ SmiTag(R6); |
| 1836 __ CompareImmediate(R6, Smi::RawValue(kClosureCid)); | 1836 __ CompareImmediate(R6, Smi::RawValue(kClosureCid)); |
| 1837 __ b(&loop, NE); | 1837 __ b(&loop, NE); |
| 1838 __ LoadFieldFromOffset(R4, R0, Closure::instantiator_offset()); | 1838 __ LoadFieldFromOffset(R4, R0, Closure::function_type_arguments_offset()); |
| 1839 __ CompareObject(R4, Object::null_object()); |
| 1840 __ b(¬_found, NE); // Cache cannot be used for generic closures. |
| 1841 __ LoadFieldFromOffset(R4, R0, Closure::instantiator_type_arguments_offset()); |
| 1839 __ LoadFieldFromOffset(R6, R0, Closure::function_offset()); | 1842 __ LoadFieldFromOffset(R6, R0, Closure::function_offset()); |
| 1840 // R6: instance class id as Smi or function. | 1843 // R6: instance class id as Smi or function. |
| 1841 __ Bind(&loop); | 1844 __ Bind(&loop); |
| 1842 __ LoadFromOffset(R5, R3, | 1845 __ LoadFromOffset(R5, R3, |
| 1843 kWordSize * SubtypeTestCache::kInstanceClassIdOrFunction); | 1846 kWordSize * SubtypeTestCache::kInstanceClassIdOrFunction); |
| 1844 __ CompareObject(R5, Object::null_object()); | 1847 __ CompareObject(R5, Object::null_object()); |
| 1845 __ b(¬_found, EQ); | 1848 __ b(¬_found, EQ); |
| 1846 __ CompareRegisters(R5, R6); | 1849 __ CompareRegisters(R5, R6); |
| 1847 if (n == 1) { | 1850 if (n == 1) { |
| 1848 __ b(&found, EQ); | 1851 __ b(&found, EQ); |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2358 } | 2361 } |
| 2359 | 2362 |
| 2360 | 2363 |
| 2361 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { | 2364 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { |
| 2362 __ brk(0); | 2365 __ brk(0); |
| 2363 } | 2366 } |
| 2364 | 2367 |
| 2365 } // namespace dart | 2368 } // namespace dart |
| 2366 | 2369 |
| 2367 #endif // defined TARGET_ARCH_ARM64 | 2370 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |