| 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" // Needed here to get TARGET_ARCH_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 // Load arguments descriptor in R4. | 211 // Load arguments descriptor in R4. |
| 212 int argument_count = ArgumentCount(); | 212 int argument_count = ArgumentCount(); |
| 213 const Array& arguments_descriptor = | 213 const Array& arguments_descriptor = |
| 214 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, | 214 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, |
| 215 argument_names())); | 215 argument_names())); |
| 216 __ LoadObject(R4, arguments_descriptor); | 216 __ LoadObject(R4, arguments_descriptor); |
| 217 | 217 |
| 218 // R4: Arguments descriptor. | 218 // R4: Arguments descriptor. |
| 219 // R0: Function. | 219 // R0: Function. |
| 220 ASSERT(locs()->in(0).reg() == R0); | 220 ASSERT(locs()->in(0).reg() == R0); |
| 221 __ LoadFieldFromOffset(R2, R0, Function::instructions_offset()); | 221 __ LoadFieldFromOffset(R2, R0, Function::entry_point_offset()); |
| 222 | 222 |
| 223 // R2: instructions. | 223 // R2: instructions. |
| 224 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). | 224 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). |
| 225 __ LoadImmediate(R5, 0); | 225 __ LoadImmediate(R5, 0); |
| 226 __ AddImmediate(R2, R2, Instructions::HeaderSize() - kHeapObjectTag); | |
| 227 __ blr(R2); | 226 __ blr(R2); |
| 228 compiler->RecordSafepoint(locs()); | 227 compiler->RecordSafepoint(locs()); |
| 229 // Marks either the continuation point in unoptimized code or the | 228 // Marks either the continuation point in unoptimized code or the |
| 230 // deoptimization point in optimized code, after call. | 229 // deoptimization point in optimized code, after call. |
| 231 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); | 230 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); |
| 232 if (compiler->is_optimizing()) { | 231 if (compiler->is_optimizing()) { |
| 233 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos()); | 232 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos()); |
| 234 } | 233 } |
| 235 // Add deoptimization continuation point after the call and before the | 234 // Add deoptimization continuation point after the call and before the |
| 236 // arguments are removed. | 235 // arguments are removed. |
| (...skipping 5380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5617 1, | 5616 1, |
| 5618 locs()); | 5617 locs()); |
| 5619 __ Drop(1); | 5618 __ Drop(1); |
| 5620 __ Pop(result); | 5619 __ Pop(result); |
| 5621 } | 5620 } |
| 5622 | 5621 |
| 5623 | 5622 |
| 5624 } // namespace dart | 5623 } // namespace dart |
| 5625 | 5624 |
| 5626 #endif // defined TARGET_ARCH_ARM64 | 5625 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |