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

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

Issue 311963002: In class Function replace current code field with current instruction field, that way we save one l… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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_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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // Load arguments descriptor in R4. 201 // Load arguments descriptor in R4.
202 int argument_count = ArgumentCount(); 202 int argument_count = ArgumentCount();
203 const Array& arguments_descriptor = 203 const Array& arguments_descriptor =
204 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, 204 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count,
205 argument_names())); 205 argument_names()));
206 __ LoadObject(R4, arguments_descriptor, PP); 206 __ LoadObject(R4, arguments_descriptor, PP);
207 207
208 // R4: Arguments descriptor. 208 // R4: Arguments descriptor.
209 // R0: Function. 209 // R0: Function.
210 ASSERT(locs()->in(0).reg() == R0); 210 ASSERT(locs()->in(0).reg() == R0);
211 __ LoadFieldFromOffset(R2, R0, Function::code_offset(), PP); 211 __ LoadFieldFromOffset(R2, R0, Function::instructions_offset(), PP);
212 212
213 // R2: code. 213 // R2: instructions.
214 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). 214 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
215 __ LoadImmediate(R5, 0, PP); 215 __ LoadImmediate(R5, 0, PP);
216 __ LoadFieldFromOffset(R2, R2, Code::instructions_offset(), PP);
217 __ AddImmediate(R2, R2, Instructions::HeaderSize() - kHeapObjectTag, PP); 216 __ AddImmediate(R2, R2, Instructions::HeaderSize() - kHeapObjectTag, PP);
218 __ blr(R2); 217 __ blr(R2);
219 compiler->AddCurrentDescriptor(PcDescriptors::kClosureCall, 218 compiler->AddCurrentDescriptor(PcDescriptors::kClosureCall,
220 deopt_id(), 219 deopt_id(),
221 token_pos()); 220 token_pos());
222 compiler->RecordSafepoint(locs()); 221 compiler->RecordSafepoint(locs());
223 // Marks either the continuation point in unoptimized code or the 222 // Marks either the continuation point in unoptimized code or the
224 // deoptimization point in optimized code, after call. 223 // deoptimization point in optimized code, after call.
225 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); 224 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id());
226 if (compiler->is_optimizing()) { 225 if (compiler->is_optimizing()) {
(...skipping 5089 matching lines...) Expand 10 before | Expand all | Expand 10 after
5316 compiler->GenerateCall(token_pos(), 5315 compiler->GenerateCall(token_pos(),
5317 &label, 5316 &label,
5318 PcDescriptors::kOther, 5317 PcDescriptors::kOther,
5319 locs()); 5318 locs());
5320 __ Drop(ArgumentCount()); // Discard arguments. 5319 __ Drop(ArgumentCount()); // Discard arguments.
5321 } 5320 }
5322 5321
5323 } // namespace dart 5322 } // namespace dart
5324 5323
5325 #endif // defined TARGET_ARCH_ARM64 5324 #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