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

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

Issue 1295823003: VM: Cache instructions entry point in RawFunction/RawCode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_ia32.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) 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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698