Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 954 void LoadIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 954 void LoadIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 955 Register array = locs()->in(0).reg(); | 955 Register array = locs()->in(0).reg(); |
| 956 Location index = locs()->in(1); | 956 Location index = locs()->in(1); |
| 957 | 957 |
| 958 const bool is_external = | 958 const bool is_external = |
| 959 (this->array()->definition()->representation() == kUntagged); | 959 (this->array()->definition()->representation() == kUntagged); |
| 960 Address element_address(kNoRegister, 0); | 960 Address element_address(kNoRegister, 0); |
| 961 | 961 |
| 962 if (is_external) { | 962 if (is_external) { |
| 963 element_address = index.IsRegister() | 963 element_address = index.IsRegister() |
| 964 ? FlowGraphCompiler::ExternalElementAddressForRegIndex( | 964 ? compiler->FlowGraphCompiler::ExternalElementAddressForRegIndex( |
| 965 index_scale(), array, index.reg()) | 965 index_scale(), array, index.reg()) |
| 966 : FlowGraphCompiler::ExternalElementAddressForIntIndex( | 966 : compiler->FlowGraphCompiler::ExternalElementAddressForIntIndex( |
| 967 index_scale(), array, Smi::Cast(index.constant()).Value()); | 967 index_scale(), array, Smi::Cast(index.constant()).Value()); |
| 968 } else { | 968 } else { |
| 969 ASSERT(this->array()->definition()->representation() == kTagged); | 969 ASSERT(this->array()->definition()->representation() == kTagged); |
| 970 element_address = index.IsRegister() | 970 element_address = index.IsRegister() |
| 971 ? FlowGraphCompiler::ElementAddressForRegIndex( | 971 ? compiler->FlowGraphCompiler::ElementAddressForRegIndex( |
| 972 class_id(), index_scale(), array, index.reg()) | 972 class_id(), index_scale(), array, index.reg()) |
| 973 : FlowGraphCompiler::ElementAddressForIntIndex( | 973 : compiler->FlowGraphCompiler::ElementAddressForIntIndex( |
| 974 class_id(), index_scale(), array, | 974 class_id(), index_scale(), array, |
| 975 Smi::Cast(index.constant()).Value()); | 975 Smi::Cast(index.constant()).Value()); |
| 976 } | 976 } |
| 977 | 977 |
| 978 if ((representation() == kUnboxedDouble) || | 978 if ((representation() == kUnboxedDouble) || |
| 979 (representation() == kUnboxedFloat32x4) || | 979 (representation() == kUnboxedFloat32x4) || |
| 980 (representation() == kUnboxedInt32x4) || | 980 (representation() == kUnboxedInt32x4) || |
| 981 (representation() == kUnboxedFloat64x2)) { | 981 (representation() == kUnboxedFloat64x2)) { |
| 982 if ((index_scale() == 1) && index.IsRegister()) { | 982 if ((index_scale() == 1) && index.IsRegister()) { |
| 983 __ SmiUntag(index.reg()); | 983 __ SmiUntag(index.reg()); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1136 | 1136 |
| 1137 void StoreIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1137 void StoreIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1138 Register array = locs()->in(0).reg(); | 1138 Register array = locs()->in(0).reg(); |
| 1139 Location index = locs()->in(1); | 1139 Location index = locs()->in(1); |
| 1140 | 1140 |
| 1141 const bool is_external = | 1141 const bool is_external = |
| 1142 (this->array()->definition()->representation() == kUntagged); | 1142 (this->array()->definition()->representation() == kUntagged); |
| 1143 Address element_address(kNoRegister, 0); | 1143 Address element_address(kNoRegister, 0); |
| 1144 if (is_external) { | 1144 if (is_external) { |
| 1145 element_address = index.IsRegister() | 1145 element_address = index.IsRegister() |
| 1146 ? FlowGraphCompiler::ExternalElementAddressForRegIndex( | 1146 ? compiler->FlowGraphCompiler::ExternalElementAddressForRegIndex( |
| 1147 index_scale(), array, index.reg()) | 1147 index_scale(), array, index.reg()) |
| 1148 : FlowGraphCompiler::ExternalElementAddressForIntIndex( | 1148 : compiler->FlowGraphCompiler::ExternalElementAddressForIntIndex( |
| 1149 index_scale(), array, Smi::Cast(index.constant()).Value()); | 1149 index_scale(), array, Smi::Cast(index.constant()).Value()); |
| 1150 } else { | 1150 } else { |
| 1151 ASSERT(this->array()->definition()->representation() == kTagged); | 1151 ASSERT(this->array()->definition()->representation() == kTagged); |
| 1152 element_address = index.IsRegister() | 1152 element_address = index.IsRegister() |
| 1153 ? FlowGraphCompiler::ElementAddressForRegIndex( | 1153 ? compiler->FlowGraphCompiler::ElementAddressForRegIndex( |
| 1154 class_id(), index_scale(), array, index.reg()) | 1154 class_id(), index_scale(), array, index.reg()) |
| 1155 : FlowGraphCompiler::ElementAddressForIntIndex( | 1155 : compiler->FlowGraphCompiler::ElementAddressForIntIndex( |
|
srdjan
2014/05/21 23:12:29
Remove FlowGraphCompiler::
regis
2014/05/21 23:18:14
Done.
| |
| 1156 class_id(), index_scale(), array, | 1156 class_id(), index_scale(), array, |
| 1157 Smi::Cast(index.constant()).Value()); | 1157 Smi::Cast(index.constant()).Value()); |
| 1158 } | 1158 } |
| 1159 | 1159 |
| 1160 if ((index_scale() == 1) && index.IsRegister()) { | 1160 if ((index_scale() == 1) && index.IsRegister()) { |
| 1161 __ SmiUntag(index.reg()); | 1161 __ SmiUntag(index.reg()); |
| 1162 } | 1162 } |
| 1163 switch (class_id()) { | 1163 switch (class_id()) { |
| 1164 case kArrayCid: | 1164 case kArrayCid: |
| 1165 if (ShouldEmitStoreBarrier()) { | 1165 if (ShouldEmitStoreBarrier()) { |
| (...skipping 4615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5781 PcDescriptors::kOther, | 5781 PcDescriptors::kOther, |
| 5782 locs()); | 5782 locs()); |
| 5783 __ Drop(ArgumentCount()); // Discard arguments. | 5783 __ Drop(ArgumentCount()); // Discard arguments. |
| 5784 } | 5784 } |
| 5785 | 5785 |
| 5786 } // namespace dart | 5786 } // namespace dart |
| 5787 | 5787 |
| 5788 #undef __ | 5788 #undef __ |
| 5789 | 5789 |
| 5790 #endif // defined TARGET_ARCH_X64 | 5790 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |