| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 // Load arguments descriptor in R4. | 201 // Load arguments descriptor in R4. |
| 202 int argument_count = ArgumentCount(); | 202 int argument_count = ArgumentCount(); |
| 203 const Array& arguments_descriptor = | 203 const Array& arguments_descriptor = |
| 204 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, | 204 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, |
| 205 argument_names())); | 205 argument_names())); |
| 206 __ LoadObject(R4, arguments_descriptor, PP); | 206 __ LoadObject(R4, arguments_descriptor, PP); |
| 207 | 207 |
| 208 // R4: Arguments descriptor. | 208 // R4: Arguments descriptor. |
| 209 // R0: Function. | 209 // R0: Function. |
| 210 ASSERT(locs()->in(0).reg() == R0); | 210 ASSERT(locs()->in(0).reg() == R0); |
| 211 __ LoadFieldFromOffset(R2, R0, Function::code_offset(), PP); | 211 __ LoadFieldFromOffset(R2, R0, Function::instructions_offset(), PP); |
| 212 | 212 |
| 213 // R2: code. | 213 // R2: instructions. |
| 214 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). | 214 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). |
| 215 __ LoadImmediate(R5, 0, PP); | 215 __ LoadImmediate(R5, 0, PP); |
| 216 __ LoadFieldFromOffset(R2, R2, Code::instructions_offset(), PP); | |
| 217 __ AddImmediate(R2, R2, Instructions::HeaderSize() - kHeapObjectTag, PP); | 216 __ AddImmediate(R2, R2, Instructions::HeaderSize() - kHeapObjectTag, PP); |
| 218 __ blr(R2); | 217 __ blr(R2); |
| 219 compiler->AddCurrentDescriptor(PcDescriptors::kClosureCall, | 218 compiler->AddCurrentDescriptor(PcDescriptors::kClosureCall, |
| 220 deopt_id(), | 219 deopt_id(), |
| 221 token_pos()); | 220 token_pos()); |
| 222 compiler->RecordSafepoint(locs()); | 221 compiler->RecordSafepoint(locs()); |
| 223 // Marks either the continuation point in unoptimized code or the | 222 // Marks either the continuation point in unoptimized code or the |
| 224 // deoptimization point in optimized code, after call. | 223 // deoptimization point in optimized code, after call. |
| 225 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); | 224 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); |
| 226 if (compiler->is_optimizing()) { | 225 if (compiler->is_optimizing()) { |
| (...skipping 5089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5316 compiler->GenerateCall(token_pos(), | 5315 compiler->GenerateCall(token_pos(), |
| 5317 &label, | 5316 &label, |
| 5318 PcDescriptors::kOther, | 5317 PcDescriptors::kOther, |
| 5319 locs()); | 5318 locs()); |
| 5320 __ Drop(ArgumentCount()); // Discard arguments. | 5319 __ Drop(ArgumentCount()); // Discard arguments. |
| 5321 } | 5320 } |
| 5322 | 5321 |
| 5323 } // namespace dart | 5322 } // namespace dart |
| 5324 | 5323 |
| 5325 #endif // defined TARGET_ARCH_ARM64 | 5324 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |