| 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 // R4: Arguments descriptor. | 215 // R4: Arguments descriptor. |
| 216 // R0: Function. | 216 // R0: Function. |
| 217 ASSERT(locs()->in(0).reg() == R0); | 217 ASSERT(locs()->in(0).reg() == R0); |
| 218 __ LoadFieldFromOffset(R2, R0, Function::instructions_offset(), PP); | 218 __ LoadFieldFromOffset(R2, R0, Function::instructions_offset(), PP); |
| 219 | 219 |
| 220 // R2: instructions. | 220 // R2: instructions. |
| 221 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). | 221 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). |
| 222 __ LoadImmediate(R5, 0, PP); | 222 __ LoadImmediate(R5, 0, PP); |
| 223 __ AddImmediate(R2, R2, Instructions::HeaderSize() - kHeapObjectTag, PP); | 223 __ AddImmediate(R2, R2, Instructions::HeaderSize() - kHeapObjectTag, PP); |
| 224 __ blr(R2); | 224 __ blr(R2); |
| 225 compiler->AddCurrentDescriptor(RawPcDescriptors::kClosureCall, | 225 compiler->RecordCallInfo(token_pos(), |
| 226 deopt_id(), | 226 RawPcDescriptors::kClosureCall, |
| 227 token_pos()); | 227 deopt_id(), |
| 228 compiler->RecordSafepoint(locs()); | 228 locs(), |
| 229 // Marks either the continuation point in unoptimized code or the | 229 locs->input_count()); |
| 230 // deoptimization point in optimized code, after call. | |
| 231 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); | |
| 232 if (compiler->is_optimizing()) { | |
| 233 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos()); | |
| 234 } else { | |
| 235 // Add deoptimization continuation point after the call and before the | |
| 236 // arguments are removed. | |
| 237 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, | |
| 238 deopt_id_after, | |
| 239 token_pos()); | |
| 240 } | |
| 241 __ Drop(argument_count); | 230 __ Drop(argument_count); |
| 242 } | 231 } |
| 243 | 232 |
| 244 | 233 |
| 245 LocationSummary* LoadLocalInstr::MakeLocationSummary(Isolate* isolate, | 234 LocationSummary* LoadLocalInstr::MakeLocationSummary(Isolate* isolate, |
| 246 bool opt) const { | 235 bool opt) const { |
| 247 return LocationSummary::Make(isolate, | 236 return LocationSummary::Make(isolate, |
| 248 0, | 237 0, |
| 249 Location::RequiresRegister(), | 238 Location::RequiresRegister(), |
| 250 LocationSummary::kNoCall); | 239 LocationSummary::kNoCall); |
| (...skipping 5285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5536 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 5525 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
| 5537 #if defined(DEBUG) | 5526 #if defined(DEBUG) |
| 5538 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); | 5527 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); |
| 5539 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); | 5528 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); |
| 5540 #endif | 5529 #endif |
| 5541 } | 5530 } |
| 5542 | 5531 |
| 5543 } // namespace dart | 5532 } // namespace dart |
| 5544 | 5533 |
| 5545 #endif // defined TARGET_ARCH_ARM64 | 5534 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |