| Index: vm/intermediate_language.cc
|
| ===================================================================
|
| --- vm/intermediate_language.cc (revision 9930)
|
| +++ vm/intermediate_language.cc (working copy)
|
| @@ -126,11 +126,6 @@
|
| }
|
|
|
|
|
| -intptr_t ClosureCallComp::InputCount() const {
|
| - return ArgumentCount();
|
| -}
|
| -
|
| -
|
| intptr_t AllocateObjectComp::InputCount() const {
|
| return arguments().length();
|
| }
|
| @@ -268,6 +263,27 @@
|
| }
|
|
|
|
|
| +intptr_t PushArgumentInstr::InputCount() const {
|
| + return 1;
|
| +}
|
| +
|
| +
|
| +Value* PushArgumentInstr::InputAt(intptr_t i) const {
|
| + if (i == 0) return value();
|
| + UNREACHABLE();
|
| + return NULL;
|
| +}
|
| +
|
| +
|
| +void PushArgumentInstr::SetInputAt(intptr_t i, Value* value) {
|
| + if (i == 0) {
|
| + value_ = value;
|
| + return;
|
| + }
|
| + UNREACHABLE();
|
| +}
|
| +
|
| +
|
| intptr_t ReturnInstr::InputCount() const {
|
| return 1;
|
| }
|
| @@ -1115,7 +1131,6 @@
|
|
|
|
|
| void ClosureCallComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| - 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).
|
| @@ -1304,6 +1319,29 @@
|
| }
|
|
|
|
|
| +LocationSummary* PushArgumentInstr::MakeLocationSummary() const {
|
| + const intptr_t kNumInputs = 1;
|
| + const intptr_t kNumTemps= 0;
|
| + LocationSummary* locs = new LocationSummary(kNumInputs, kNumTemps);
|
| + // TODO(fschneider): Use Any() once it is supported by all code generators.
|
| + locs->set_in(0, Location::RequiresRegister());
|
| + 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 in FrameRegisterAllocator::AllocateRegisters.
|
| + // Instead of popping the value it is left alone on the simulated frame
|
| + // and materialized on the physical stack before the call.
|
| + // TODO(fschneider): Avoid special-casing for SSA mode here.
|
| + if (compiler->is_ssa()) {
|
| + ASSERT(locs()->in(0).IsRegister());
|
| + __ PushRegister(locs()->in(0).reg());
|
| + }
|
| +}
|
| +
|
| +
|
| #undef __
|
|
|
| } // namespace dart
|
|
|