Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: runtime/vm/intermediate_language_arm.cc

Issue 575443002: Refactor generating lazy deoptimization descriptors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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" // Needed here to get TARGET_ARCH_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // R4: Arguments descriptor. 220 // R4: Arguments descriptor.
221 // R0: Function. 221 // R0: Function.
222 ASSERT(locs()->in(0).reg() == R0); 222 ASSERT(locs()->in(0).reg() == R0);
223 __ ldr(R2, FieldAddress(R0, Function::instructions_offset())); 223 __ ldr(R2, FieldAddress(R0, Function::instructions_offset()));
224 224
225 // R2: instructions. 225 // R2: instructions.
226 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). 226 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
227 __ LoadImmediate(R5, 0); 227 __ LoadImmediate(R5, 0);
228 __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag); 228 __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag);
229 __ blx(R2); 229 __ blx(R2);
230 compiler->AddCurrentDescriptor(RawPcDescriptors::kClosureCall, 230 compiler->RecordCallInfo(token_pos(),
231 deopt_id(), 231 RawPcDescriptors::kClosureCall,
232 token_pos()); 232 deopt_id(),
233 compiler->RecordSafepoint(locs()); 233 locs(),
234 // Marks either the continuation point in unoptimized code or the 234 locs()->input_count());
235 // deoptimization point in optimized code, after call.
236 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id());
237 if (compiler->is_optimizing()) {
238 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos());
239 } else {
240 // Add deoptimization continuation point after the call and before the
241 // arguments are removed.
242 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
243 deopt_id_after,
244 token_pos());
245 }
246 __ Drop(argument_count); 235 __ Drop(argument_count);
247 } 236 }
248 237
249 238
250 LocationSummary* LoadLocalInstr::MakeLocationSummary(Isolate* isolate, 239 LocationSummary* LoadLocalInstr::MakeLocationSummary(Isolate* isolate,
251 bool opt) const { 240 bool opt) const {
252 return LocationSummary::Make(isolate, 241 return LocationSummary::Make(isolate,
253 0, 242 0,
254 Location::RequiresRegister(), 243 Location::RequiresRegister(),
255 LocationSummary::kNoCall); 244 LocationSummary::kNoCall);
(...skipping 6857 matching lines...) Expand 10 before | Expand all | Expand 10 after
7113 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 7102 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
7114 #if defined(DEBUG) 7103 #if defined(DEBUG)
7115 __ LoadImmediate(R4, kInvalidObjectPointer); 7104 __ LoadImmediate(R4, kInvalidObjectPointer);
7116 __ LoadImmediate(R5, kInvalidObjectPointer); 7105 __ LoadImmediate(R5, kInvalidObjectPointer);
7117 #endif 7106 #endif
7118 } 7107 }
7119 7108
7120 } // namespace dart 7109 } // namespace dart
7121 7110
7122 #endif // defined TARGET_ARCH_ARM 7111 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698