Chromium Code Reviews| Index: runtime/vm/flow_graph_compiler.cc |
| =================================================================== |
| --- runtime/vm/flow_graph_compiler.cc (revision 13622) |
| +++ runtime/vm/flow_graph_compiler.cc (working copy) |
| @@ -896,4 +896,27 @@ |
| } |
| +FieldAddress FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid, |
| + Register array, |
| + intptr_t offset) { |
| + switch (cid) { |
| + case kArrayCid: |
| + case kGrowableObjectArrayCid: |
| + case kImmutableArrayCid: { |
| + const intptr_t disp = offset * kWordSize + sizeof(RawArray); |
| + ASSERT(Utils::IsInt(31, disp)); |
| + return FieldAddress(array, disp); |
| + } |
| + case kFloat64ArrayCid: { |
| + const intptr_t disp = |
| + offset * (1 << TIMES_8) + Float64Array::data_offset(); |
|
Florian Schneider
2012/10/15 09:40:25
Alternatively use kDoubleSize instead of 1 << TIME
srdjan
2012/10/15 16:53:13
Done.
|
| + ASSERT(Utils::IsInt(31, disp)); |
| + return FieldAddress(array, disp); |
| + } |
| + default: |
| + UNIMPLEMENTED(); |
| + return FieldAddress(SPREG, 0); |
| + } |
| +} |
| + |
| } // namespace dart |