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

Side by Side Diff: runtime/vm/intermediate_language_arm.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/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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // Load arguments descriptor in R4. 204 // Load arguments descriptor in R4.
205 int argument_count = ArgumentCount(); 205 int argument_count = ArgumentCount();
206 const Array& arguments_descriptor = 206 const Array& arguments_descriptor =
207 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, 207 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count,
208 argument_names())); 208 argument_names()));
209 __ LoadObject(R4, arguments_descriptor); 209 __ LoadObject(R4, arguments_descriptor);
210 210
211 // R4: Arguments descriptor. 211 // R4: Arguments descriptor.
212 // R0: Function. 212 // R0: Function.
213 ASSERT(locs()->in(0).reg() == R0); 213 ASSERT(locs()->in(0).reg() == R0);
214 __ ldr(R2, FieldAddress(R0, Function::code_offset())); 214 __ ldr(R2, FieldAddress(R0, Function::instructions_offset()));
215 215
216 // R2: code. 216 // R2: instructions.
217 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). 217 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
218 __ LoadImmediate(R5, 0); 218 __ LoadImmediate(R5, 0);
219 __ ldr(R2, FieldAddress(R2, Code::instructions_offset()));
220 __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag); 219 __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag);
221 __ blx(R2); 220 __ blx(R2);
222 compiler->AddCurrentDescriptor(PcDescriptors::kClosureCall, 221 compiler->AddCurrentDescriptor(PcDescriptors::kClosureCall,
223 deopt_id(), 222 deopt_id(),
224 token_pos()); 223 token_pos());
225 compiler->RecordSafepoint(locs()); 224 compiler->RecordSafepoint(locs());
226 // Marks either the continuation point in unoptimized code or the 225 // Marks either the continuation point in unoptimized code or the
227 // deoptimization point in optimized code, after call. 226 // deoptimization point in optimized code, after call.
228 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); 227 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id());
229 if (compiler->is_optimizing()) { 228 if (compiler->is_optimizing()) {
(...skipping 6094 matching lines...) Expand 10 before | Expand all | Expand 10 after
6324 compiler->GenerateCall(token_pos(), 6323 compiler->GenerateCall(token_pos(),
6325 &label, 6324 &label,
6326 PcDescriptors::kOther, 6325 PcDescriptors::kOther,
6327 locs()); 6326 locs());
6328 __ Drop(ArgumentCount()); // Discard arguments. 6327 __ Drop(ArgumentCount()); // Discard arguments.
6329 } 6328 }
6330 6329
6331 } // namespace dart 6330 } // namespace dart
6332 6331
6333 #endif // defined TARGET_ARCH_ARM 6332 #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