Chromium Code Reviews| Index: vm/intermediate_language_ia32.cc |
| =================================================================== |
| --- vm/intermediate_language_ia32.cc (revision 10287) |
| +++ vm/intermediate_language_ia32.cc (working copy) |
| @@ -1023,14 +1023,19 @@ |
| LocationSummary* CreateArrayComp::MakeLocationSummary() const { |
| - return MakeCallSummary(); |
| + const intptr_t kNumInputs = 1; |
|
Kevin Millikin (Google)
2012/08/07 10:06:03
I have a feeling that this is always InputCount()
Florian Schneider
2012/08/07 10:23:55
Yes, that will be the case once all call-instructi
|
| + const intptr_t kNumTemps = 0; |
| + LocationSummary* locs = |
| + new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); |
| + locs->set_in(0, Location::RegisterLocation(ECX)); |
|
Kevin Millikin (Google)
2012/08/07 10:06:03
I don't really like the number '0' here. It has t
Florian Schneider
2012/08/07 10:23:55
Agreed. Let's consider removing those 0s and 1s in
|
| + locs->set_out(Location::RegisterLocation(EAX)); |
| + return locs; |
| } |
| void CreateArrayComp::EmitNativeCode(FlowGraphCompiler* compiler) { |
| - // TODO(fschneider): Support call-instructions that take inputs in registers. |
| // Allocate the array. EDX = length, ECX = element type. |
| - __ popl(ECX); |
| + ASSERT(locs()->in(0).reg() == ECX); |
|
Kevin Millikin (Google)
2012/08/07 10:06:03
There's the 0 again.
|
| __ movl(EDX, Immediate(Smi::RawValue(ElementCount()))); |
| compiler->GenerateCall(token_pos(), |
| try_index(), |