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

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

Issue 10466004: Submit reviewed Florian's Cl: https://chromiumcodereview.appspot.com/10447143/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « no previous file | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 return NULL; 158 return NULL;
159 } 159 }
160 160
161 161
162 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 162 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
163 UNIMPLEMENTED(); 163 UNIMPLEMENTED();
164 } 164 }
165 165
166 166
167 LocationSummary* CurrentContextComp::MakeLocationSummary() const { 167 LocationSummary* CurrentContextComp::MakeLocationSummary() const {
168 return NULL; 168 return LocationSummary::Make(0, Location::RequiresRegister());
169 } 169 }
170 170
171 171
172 void CurrentContextComp::EmitNativeCode(FlowGraphCompiler* compiler) { 172 void CurrentContextComp::EmitNativeCode(FlowGraphCompiler* compiler) {
173 UNIMPLEMENTED(); 173 __ movl(locs()->out().reg(), CTX);
174 } 174 }
175 175
176 176
177 LocationSummary* StoreContextComp::MakeLocationSummary() const { 177 LocationSummary* StoreContextComp::MakeLocationSummary() const {
178 return NULL; 178 const intptr_t kNumInputs = 1;
179 const intptr_t kNumTemps = 0;
180 LocationSummary* summary = new LocationSummary(kNumInputs, kNumTemps);
181 summary->set_in(0, Location::RegisterLocation(CTX));
182 return summary;
179 } 183 }
180 184
181 185
182 void StoreContextComp::EmitNativeCode(FlowGraphCompiler* compiler) { 186 void StoreContextComp::EmitNativeCode(FlowGraphCompiler* compiler) {
183 UNIMPLEMENTED(); 187 // Nothing to do. Context register were loaded by register allocator.
188 ASSERT(locs()->in(0).reg() == CTX);
184 } 189 }
185 190
186 191
187 LocationSummary* StrictCompareComp::MakeLocationSummary() const { 192 LocationSummary* StrictCompareComp::MakeLocationSummary() const {
188 return NULL; 193 return NULL;
189 } 194 }
190 195
191 196
192 void StrictCompareComp::EmitNativeCode(FlowGraphCompiler* compiler) { 197 void StrictCompareComp::EmitNativeCode(FlowGraphCompiler* compiler) {
193 UNIMPLEMENTED(); 198 UNIMPLEMENTED();
194 } 199 }
195 200
196 201
197 LocationSummary* ClosureCallComp::MakeLocationSummary() const { 202 LocationSummary* ClosureCallComp::MakeLocationSummary() const {
198 return NULL; 203 return MakeCallSummary();
199 } 204 }
200 205
201 206
202 void ClosureCallComp::EmitNativeCode(FlowGraphCompiler* compiler) { 207 void ClosureCallComp::EmitNativeCode(FlowGraphCompiler* compiler) {
203 UNIMPLEMENTED(); 208 ASSERT(VerifyCallComputation(this));
209 // The arguments to the stub include the closure. The arguments
210 // descriptor describes the closure's arguments (and so does not include
211 // the closure).
212 int argument_count = ArgumentCount();
213 const Array& arguments_descriptor =
214 CodeGenerator::ArgumentsDescriptor(argument_count - 1,
215 argument_names());
216 __ LoadObject(EDX, arguments_descriptor);
217 compiler->GenerateCall(token_index(),
218 try_index(),
219 &StubCode::CallClosureFunctionLabel(),
220 PcDescriptors::kOther);
221 __ Drop(argument_count);
204 } 222 }
205 223
206 224
207 LocationSummary* InstanceCallComp::MakeLocationSummary() const { 225 LocationSummary* InstanceCallComp::MakeLocationSummary() const {
208 return MakeCallSummary(); 226 return MakeCallSummary();
209 } 227 }
210 228
211 229
212 void InstanceCallComp::EmitNativeCode(FlowGraphCompiler* compiler) { 230 void InstanceCallComp::EmitNativeCode(FlowGraphCompiler* compiler) {
213 ASSERT(VerifyCallComputation(this)); 231 ASSERT(VerifyCallComputation(this));
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 return NULL; 466 return NULL;
449 } 467 }
450 468
451 469
452 void CreateArrayComp::EmitNativeCode(FlowGraphCompiler* compiler) { 470 void CreateArrayComp::EmitNativeCode(FlowGraphCompiler* compiler) {
453 UNIMPLEMENTED(); 471 UNIMPLEMENTED();
454 } 472 }
455 473
456 474
457 LocationSummary* CreateClosureComp::MakeLocationSummary() const { 475 LocationSummary* CreateClosureComp::MakeLocationSummary() const {
458 return NULL; 476 return MakeCallSummary();
459 } 477 }
460 478
461 479
462 void CreateClosureComp::EmitNativeCode(FlowGraphCompiler* compiler) { 480 void CreateClosureComp::EmitNativeCode(FlowGraphCompiler* compiler) {
463 UNIMPLEMENTED(); 481 const Function& closure_function = function();
482 const Code& stub = Code::Handle(
483 StubCode::GetAllocationStubForClosure(closure_function));
484 const ExternalLabel label(closure_function.ToCString(), stub.EntryPoint());
485 compiler->GenerateCall(token_index(), try_index(), &label,
486 PcDescriptors::kOther);
487 __ Drop(2); // Discard type arguments and receiver.
464 } 488 }
465 489
466 490
467 LocationSummary* AllocateObjectComp::MakeLocationSummary() const { 491 LocationSummary* AllocateObjectComp::MakeLocationSummary() const {
468 return NULL; 492 return NULL;
469 } 493 }
470 494
471 495
472 void AllocateObjectComp::EmitNativeCode(FlowGraphCompiler* compiler) { 496 void AllocateObjectComp::EmitNativeCode(FlowGraphCompiler* compiler) {
473 UNIMPLEMENTED(); 497 UNIMPLEMENTED();
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 void NumberNegateComp::EmitNativeCode(FlowGraphCompiler* compile) { 649 void NumberNegateComp::EmitNativeCode(FlowGraphCompiler* compile) {
626 UNIMPLEMENTED(); 650 UNIMPLEMENTED();
627 } 651 }
628 652
629 653
630 } // namespace dart 654 } // namespace dart
631 655
632 #undef __ 656 #undef __
633 657
634 #endif // defined TARGET_ARCH_X64 658 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698