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

Side by Side Diff: runtime/vm/intermediate_language_ia32.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_arm64.cc ('k') | runtime/vm/intermediate_language_mips.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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 6198 matching lines...) Expand 10 before | Expand all | Expand 10 after
6209 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 6209 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
6210 // Load arguments descriptors. 6210 // Load arguments descriptors.
6211 intptr_t argument_count = ArgumentCount(); 6211 intptr_t argument_count = ArgumentCount();
6212 const Array& arguments_descriptor = 6212 const Array& arguments_descriptor =
6213 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, 6213 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count,
6214 argument_names())); 6214 argument_names()));
6215 __ LoadObject(EDX, arguments_descriptor); 6215 __ LoadObject(EDX, arguments_descriptor);
6216 6216
6217 // EBX: Code (compiled code or lazy compile stub). 6217 // EBX: Code (compiled code or lazy compile stub).
6218 ASSERT(locs()->in(0).reg() == EAX); 6218 ASSERT(locs()->in(0).reg() == EAX);
6219 __ movl(EBX, FieldAddress(EAX, Function::code_offset())); 6219 __ movl(EBX, FieldAddress(EAX, Function::instructions_offset()));
6220 6220
6221 // EAX: Function. 6221 // EAX: Function.
6222 // EDX: Arguments descriptor array. 6222 // EDX: Arguments descriptor array.
6223 // ECX: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). 6223 // ECX: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
6224 __ xorl(ECX, ECX); 6224 __ xorl(ECX, ECX);
6225 __ movl(EBX, FieldAddress(EBX, Code::instructions_offset()));
6226 __ addl(EBX, Immediate(Instructions::HeaderSize() - kHeapObjectTag)); 6225 __ addl(EBX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
6227 __ call(EBX); 6226 __ call(EBX);
6228 compiler->AddCurrentDescriptor(PcDescriptors::kClosureCall, 6227 compiler->AddCurrentDescriptor(PcDescriptors::kClosureCall,
6229 deopt_id(), 6228 deopt_id(),
6230 token_pos()); 6229 token_pos());
6231 compiler->RecordSafepoint(locs()); 6230 compiler->RecordSafepoint(locs());
6232 // Marks either the continuation point in unoptimized code or the 6231 // Marks either the continuation point in unoptimized code or the
6233 // deoptimization point in optimized code, after call. 6232 // deoptimization point in optimized code, after call.
6234 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); 6233 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id());
6235 if (compiler->is_optimizing()) { 6234 if (compiler->is_optimizing()) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
6281 PcDescriptors::kOther, 6280 PcDescriptors::kOther,
6282 locs()); 6281 locs());
6283 __ Drop(ArgumentCount()); // Discard arguments. 6282 __ Drop(ArgumentCount()); // Discard arguments.
6284 } 6283 }
6285 6284
6286 } // namespace dart 6285 } // namespace dart
6287 6286
6288 #undef __ 6287 #undef __
6289 6288
6290 #endif // defined TARGET_ARCH_IA32 6289 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698