Index: runtime/vm/intermediate_language_ia32.cc |
=================================================================== |
--- runtime/vm/intermediate_language_ia32.cc (revision 32158) |
+++ runtime/vm/intermediate_language_ia32.cc (working copy) |
@@ -1835,11 +1835,12 @@ |
LocationSummary* CreateArrayInstr::MakeLocationSummary(bool opt) const { |
- const intptr_t kNumInputs = 1; |
+ const intptr_t kNumInputs = 2; |
const intptr_t kNumTemps = 0; |
LocationSummary* locs = |
new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); |
locs->set_in(0, Location::RegisterLocation(ECX)); |
+ locs->set_in(1, Location::RegisterLocation(EDX)); |
locs->set_out(Location::RegisterLocation(EAX)); |
return locs; |
} |
@@ -1848,7 +1849,7 @@ |
void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
// Allocate the array. EDX = length, ECX = element type. |
ASSERT(locs()->in(0).reg() == ECX); |
- __ movl(EDX, Immediate(Smi::RawValue(num_elements()))); |
+ ASSERT(locs()->in(1).reg() == EDX); |
compiler->GenerateCall(token_pos(), |
&StubCode::AllocateArrayLabel(), |
PcDescriptors::kOther, |