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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 11791051: Support immediate and memory operands for PushArgumentInstr in optimized code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: really handle constant operands Created 7 years, 11 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 | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | 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 16802)
+++ runtime/vm/intermediate_language_ia32.cc (working copy)
@@ -31,6 +31,33 @@
}
+LocationSummary* PushArgumentInstr::MakeLocationSummary() const {
+ const intptr_t kNumInputs = 1;
+ const intptr_t kNumTemps= 0;
+ LocationSummary* locs =
+ new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
+ locs->set_in(0, Location::AnyOrConstant(value()));
+ return locs;
+}
+
+
+void PushArgumentInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ // In SSA mode, we need an explicit push. Nothing to do in non-SSA mode
+ // where PushArgument is handled by BindInstr::EmitNativeCode.
+ if (compiler->is_optimizing()) {
+ Location value = locs()->in(0);
+ if (value.IsRegister()) {
+ __ pushl(value.reg());
+ } else if (value.IsConstant()) {
+ __ PushObject(value.constant());
+ } else {
+ ASSERT(value.IsStackSlot());
+ __ pushl(value.ToStackSlotAddress());
+ }
+ }
+}
+
+
LocationSummary* ReturnInstr::MakeLocationSummary() const {
const intptr_t kNumInputs = 1;
const intptr_t kNumTemps = 1;
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698