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

Side by Side Diff: runtime/vm/intermediate_language_arm.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/gc_marker.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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // Load arguments descriptor in R4. 215 // Load arguments descriptor in R4.
216 int argument_count = ArgumentCount(); 216 int argument_count = ArgumentCount();
217 const Array& arguments_descriptor = 217 const Array& arguments_descriptor =
218 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, 218 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count,
219 argument_names())); 219 argument_names()));
220 __ LoadObject(R4, arguments_descriptor); 220 __ LoadObject(R4, arguments_descriptor);
221 221
222 // R4: Arguments descriptor. 222 // R4: Arguments descriptor.
223 // R0: Function. 223 // R0: Function.
224 ASSERT(locs()->in(0).reg() == R0); 224 ASSERT(locs()->in(0).reg() == R0);
225 __ ldr(R2, FieldAddress(R0, Function::instructions_offset())); 225 __ ldr(R2, FieldAddress(R0, Function::entry_point_offset()));
226 226
227 // R2: instructions. 227 // R2: instructions entry point.
228 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). 228 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
229 __ LoadImmediate(R5, 0); 229 __ LoadImmediate(R5, 0);
230 __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag);
231 __ blx(R2); 230 __ blx(R2);
232 compiler->RecordSafepoint(locs()); 231 compiler->RecordSafepoint(locs());
233 // Marks either the continuation point in unoptimized code or the 232 // Marks either the continuation point in unoptimized code or the
234 // deoptimization point in optimized code, after call. 233 // deoptimization point in optimized code, after call.
235 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); 234 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id());
236 if (compiler->is_optimizing()) { 235 if (compiler->is_optimizing()) {
237 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos()); 236 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos());
238 } 237 }
239 // Add deoptimization continuation point after the call and before the 238 // Add deoptimization continuation point after the call and before the
240 // arguments are removed. 239 // arguments are removed.
(...skipping 6615 matching lines...) Expand 10 before | Expand all | Expand 10 after
6856 1, 6855 1,
6857 locs()); 6856 locs());
6858 __ Drop(1); 6857 __ Drop(1);
6859 __ Pop(result); 6858 __ Pop(result);
6860 } 6859 }
6861 6860
6862 6861
6863 } // namespace dart 6862 } // namespace dart
6864 6863
6865 #endif // defined TARGET_ARCH_ARM 6864 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/gc_marker.cc ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698