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

Unified 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, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_ia32.cc
===================================================================
--- runtime/vm/intermediate_language_ia32.cc (revision 8210)
+++ runtime/vm/intermediate_language_ia32.cc (working copy)
@@ -165,22 +165,27 @@
LocationSummary* CurrentContextComp::MakeLocationSummary() const {
- return NULL;
+ return LocationSummary::Make(0, Location::RequiresRegister());
}
void CurrentContextComp::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
+ __ movl(locs()->out().reg(), CTX);
}
LocationSummary* StoreContextComp::MakeLocationSummary() const {
- return NULL;
+ const intptr_t kNumInputs = 1;
+ const intptr_t kNumTemps = 0;
+ LocationSummary* summary = new LocationSummary(kNumInputs, kNumTemps);
+ summary->set_in(0, Location::RegisterLocation(CTX));
+ return summary;
}
void StoreContextComp::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
+ // Nothing to do. Context register were loaded by register allocator.
+ ASSERT(locs()->in(0).reg() == CTX);
}
@@ -195,12 +200,25 @@
LocationSummary* ClosureCallComp::MakeLocationSummary() const {
- return NULL;
+ return MakeCallSummary();
}
void ClosureCallComp::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
+ ASSERT(VerifyCallComputation(this));
+ // The arguments to the stub include the closure. The arguments
+ // descriptor describes the closure's arguments (and so does not include
+ // the closure).
+ int argument_count = ArgumentCount();
+ const Array& arguments_descriptor =
+ CodeGenerator::ArgumentsDescriptor(argument_count - 1,
+ argument_names());
+ __ LoadObject(EDX, arguments_descriptor);
+ compiler->GenerateCall(token_index(),
+ try_index(),
+ &StubCode::CallClosureFunctionLabel(),
+ PcDescriptors::kOther);
+ __ Drop(argument_count);
}
@@ -455,12 +473,18 @@
LocationSummary* CreateClosureComp::MakeLocationSummary() const {
- return NULL;
+ return MakeCallSummary();
}
void CreateClosureComp::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
+ const Function& closure_function = function();
+ const Code& stub = Code::Handle(
+ StubCode::GetAllocationStubForClosure(closure_function));
+ const ExternalLabel label(closure_function.ToCString(), stub.EntryPoint());
+ compiler->GenerateCall(token_index(), try_index(), &label,
+ PcDescriptors::kOther);
+ __ Drop(2); // Discard type arguments and receiver.
}
« 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