| Index: runtime/vm/flow_graph_compiler_x64.cc
|
| ===================================================================
|
| --- runtime/vm/flow_graph_compiler_x64.cc (revision 36535)
|
| +++ runtime/vm/flow_graph_compiler_x64.cc (working copy)
|
| @@ -1575,14 +1575,20 @@
|
| }
|
|
|
|
|
| -Address FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid,
|
| +Address FlowGraphCompiler::ElementAddressForIntIndex(bool is_load,
|
| + bool is_external,
|
| + intptr_t cid,
|
| intptr_t index_scale,
|
| Register array,
|
| intptr_t index) {
|
| - const int64_t disp =
|
| - static_cast<int64_t>(index) * index_scale + DataOffsetFor(cid);
|
| - ASSERT(Utils::IsInt(32, disp));
|
| - return FieldAddress(array, static_cast<int32_t>(disp));
|
| + if (is_external) {
|
| + return Address(array, index * index_scale);
|
| + } else {
|
| + const int64_t disp =
|
| + static_cast<int64_t>(index) * index_scale + DataOffsetFor(cid);
|
| + ASSERT(Utils::IsInt(32, disp));
|
| + return FieldAddress(array, static_cast<int32_t>(disp));
|
| + }
|
| }
|
|
|
|
|
| @@ -1604,33 +1610,23 @@
|
| }
|
|
|
|
|
| -Address FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid,
|
| +Address FlowGraphCompiler::ElementAddressForRegIndex(bool is_load,
|
| + bool is_external,
|
| + intptr_t cid,
|
| intptr_t index_scale,
|
| Register array,
|
| Register index) {
|
| - return FieldAddress(array,
|
| - index,
|
| - ToScaleFactor(index_scale),
|
| - DataOffsetFor(cid));
|
| + if (is_external) {
|
| + return Address(array, index, ToScaleFactor(index_scale), 0);
|
| + } else {
|
| + return FieldAddress(array,
|
| + index,
|
| + ToScaleFactor(index_scale),
|
| + DataOffsetFor(cid));
|
| + }
|
| }
|
|
|
|
|
| -Address FlowGraphCompiler::ExternalElementAddressForIntIndex(
|
| - intptr_t index_scale,
|
| - Register array,
|
| - intptr_t index) {
|
| - return Address(array, index * index_scale);
|
| -}
|
| -
|
| -
|
| -Address FlowGraphCompiler::ExternalElementAddressForRegIndex(
|
| - intptr_t index_scale,
|
| - Register array,
|
| - Register index) {
|
| - return Address(array, index, ToScaleFactor(index_scale), 0);
|
| -}
|
| -
|
| -
|
| #undef __
|
| #define __ compiler_->assembler()->
|
|
|
|
|