Chromium Code Reviews| 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)); |
|
Kevin Millikin (Google)
2012/07/26 13:03:18
We can still do this, can't we? Or do you think i
Florian Schneider
2012/07/26 13:45:24
With the new way of handling arguments, the argume
|
| // 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,26 @@ |
| } |
| +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 EmitInstructionPrologue. |
|
Kevin Millikin (Google)
2012/07/26 13:03:18
Comment is a bit off. It's not handled in EmitIns
Florian Schneider
2012/07/26 13:45:24
Done.
|
| + if (compiler->is_ssa()) { |
| + ASSERT(locs()->in(0).IsRegister()); |
| + __ PushRegister(locs()->in(0).reg()); |
| + } |
| +} |
| + |
| + |
| #undef __ |
| } // namespace dart |