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

Side by Side Diff: runtime/vm/intermediate_language_mips.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_ia32.cc ('k') | runtime/vm/intermediate_language_x64.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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 __ LoadObject(S4, arguments_descriptor); 240 __ LoadObject(S4, arguments_descriptor);
241 241
242 // Load closure function code in T2. 242 // Load closure function code in T2.
243 // S4: arguments descriptor array. 243 // S4: arguments descriptor array.
244 // S5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). 244 // S5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
245 ASSERT(locs()->in(0).reg() == T0); 245 ASSERT(locs()->in(0).reg() == T0);
246 __ LoadImmediate(S5, 0); 246 __ LoadImmediate(S5, 0);
247 __ lw(T2, FieldAddress(T0, Function::instructions_offset())); 247 __ lw(T2, FieldAddress(T0, Function::instructions_offset()));
248 __ AddImmediate(T2, Instructions::HeaderSize() - kHeapObjectTag); 248 __ AddImmediate(T2, Instructions::HeaderSize() - kHeapObjectTag);
249 __ jalr(T2); 249 __ jalr(T2);
250 compiler->AddCurrentDescriptor(RawPcDescriptors::kClosureCall, 250 compiler->RecordCallInfo(token_pos(),
251 deopt_id(), 251 RawPcDescriptors::kClosureCall,
252 token_pos()); 252 deopt_id(),
253 compiler->RecordSafepoint(locs()); 253 locs(),
254 // Marks either the continuation point in unoptimized code or the 254 locs()->input_count());
255 // deoptimization point in optimized code, after call.
256 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id());
257 if (compiler->is_optimizing()) {
258 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos());
259 } else {
260 // Add deoptimization continuation point after the call and before the
261 // arguments are removed.
262 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
263 deopt_id_after,
264 token_pos());
265 }
266 __ Drop(argument_count); 255 __ Drop(argument_count);
267 } 256 }
268 257
269 258
270 LocationSummary* LoadLocalInstr::MakeLocationSummary(Isolate* isolate, 259 LocationSummary* LoadLocalInstr::MakeLocationSummary(Isolate* isolate,
271 bool opt) const { 260 bool opt) const {
272 return LocationSummary::Make(isolate, 261 return LocationSummary::Make(isolate,
273 0, 262 0,
274 Location::RequiresRegister(), 263 Location::RequiresRegister(),
275 LocationSummary::kNoCall); 264 LocationSummary::kNoCall);
(...skipping 4701 matching lines...) Expand 10 before | Expand all | Expand 10 after
4977 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 4966 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
4978 #if defined(DEBUG) 4967 #if defined(DEBUG)
4979 __ LoadImmediate(S4, kInvalidObjectPointer); 4968 __ LoadImmediate(S4, kInvalidObjectPointer);
4980 __ LoadImmediate(S5, kInvalidObjectPointer); 4969 __ LoadImmediate(S5, kInvalidObjectPointer);
4981 #endif 4970 #endif
4982 } 4971 }
4983 4972
4984 } // namespace dart 4973 } // namespace dart
4985 4974
4986 #endif // defined TARGET_ARCH_MIPS 4975 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698