Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2019)

Side by Side Diff: src/crankshaft/arm/lithium-arm.cc

Issue 1493983004: [crankshaft] Loads and stores to typed arrays have to reference the backing store holder (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/crankshaft/arm/lithium-arm.h ('k') | src/crankshaft/arm64/lithium-arm64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/crankshaft/arm/lithium-arm.h" 5 #include "src/crankshaft/arm/lithium-arm.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/crankshaft/arm/lithium-codegen-arm.h" 9 #include "src/crankshaft/arm/lithium-codegen-arm.h"
10 #include "src/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 2174 matching lines...) Expand 10 before | Expand all | Expand 10 after
2185 LInstruction* result = NULL; 2185 LInstruction* result = NULL;
2186 2186
2187 if (!instr->is_fixed_typed_array()) { 2187 if (!instr->is_fixed_typed_array()) {
2188 LOperand* obj = NULL; 2188 LOperand* obj = NULL;
2189 if (instr->representation().IsDouble()) { 2189 if (instr->representation().IsDouble()) {
2190 obj = UseRegister(instr->elements()); 2190 obj = UseRegister(instr->elements());
2191 } else { 2191 } else {
2192 DCHECK(instr->representation().IsSmiOrTagged()); 2192 DCHECK(instr->representation().IsSmiOrTagged());
2193 obj = UseRegisterAtStart(instr->elements()); 2193 obj = UseRegisterAtStart(instr->elements());
2194 } 2194 }
2195 result = DefineAsRegister(new(zone()) LLoadKeyed(obj, key)); 2195 result = DefineAsRegister(new (zone()) LLoadKeyed(obj, key, nullptr));
2196 } else { 2196 } else {
2197 DCHECK( 2197 DCHECK(
2198 (instr->representation().IsInteger32() && 2198 (instr->representation().IsInteger32() &&
2199 !IsDoubleOrFloatElementsKind(elements_kind)) || 2199 !IsDoubleOrFloatElementsKind(elements_kind)) ||
2200 (instr->representation().IsDouble() && 2200 (instr->representation().IsDouble() &&
2201 IsDoubleOrFloatElementsKind(elements_kind))); 2201 IsDoubleOrFloatElementsKind(elements_kind)));
2202 LOperand* backing_store = UseRegister(instr->elements()); 2202 LOperand* backing_store = UseRegister(instr->elements());
2203 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key)); 2203 LOperand* backing_store_owner = UseAny(instr->backing_store_owner());
2204 result = DefineAsRegister(
2205 new (zone()) LLoadKeyed(backing_store, key, backing_store_owner));
2204 } 2206 }
2205 2207
2206 bool needs_environment; 2208 bool needs_environment;
2207 if (instr->is_fixed_typed_array()) { 2209 if (instr->is_fixed_typed_array()) {
2208 // see LCodeGen::DoLoadKeyedExternalArray 2210 // see LCodeGen::DoLoadKeyedExternalArray
2209 needs_environment = elements_kind == UINT32_ELEMENTS && 2211 needs_environment = elements_kind == UINT32_ELEMENTS &&
2210 !instr->CheckFlag(HInstruction::kUint32); 2212 !instr->CheckFlag(HInstruction::kUint32);
2211 } else { 2213 } else {
2212 // see LCodeGen::DoLoadKeyedFixedDoubleArray and 2214 // see LCodeGen::DoLoadKeyedFixedDoubleArray and
2213 // LCodeGen::DoLoadKeyedFixedArray 2215 // LCodeGen::DoLoadKeyedFixedArray
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
2258 object = UseTempRegister(instr->elements()); 2260 object = UseTempRegister(instr->elements());
2259 val = UseTempRegister(instr->value()); 2261 val = UseTempRegister(instr->value());
2260 key = UseTempRegister(instr->key()); 2262 key = UseTempRegister(instr->key());
2261 } else { 2263 } else {
2262 object = UseRegisterAtStart(instr->elements()); 2264 object = UseRegisterAtStart(instr->elements());
2263 val = UseRegisterAtStart(instr->value()); 2265 val = UseRegisterAtStart(instr->value());
2264 key = UseRegisterOrConstantAtStart(instr->key()); 2266 key = UseRegisterOrConstantAtStart(instr->key());
2265 } 2267 }
2266 } 2268 }
2267 2269
2268 return new(zone()) LStoreKeyed(object, key, val); 2270 return new (zone()) LStoreKeyed(object, key, val, nullptr);
2269 } 2271 }
2270 2272
2271 DCHECK( 2273 DCHECK(
2272 (instr->value()->representation().IsInteger32() && 2274 (instr->value()->representation().IsInteger32() &&
2273 !IsDoubleOrFloatElementsKind(instr->elements_kind())) || 2275 !IsDoubleOrFloatElementsKind(instr->elements_kind())) ||
2274 (instr->value()->representation().IsDouble() && 2276 (instr->value()->representation().IsDouble() &&
2275 IsDoubleOrFloatElementsKind(instr->elements_kind()))); 2277 IsDoubleOrFloatElementsKind(instr->elements_kind())));
2276 DCHECK(instr->elements()->representation().IsExternal()); 2278 DCHECK(instr->elements()->representation().IsExternal());
2277 LOperand* val = UseRegister(instr->value()); 2279 LOperand* val = UseRegister(instr->value());
2278 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); 2280 LOperand* key = UseRegisterOrConstantAtStart(instr->key());
2279 LOperand* backing_store = UseRegister(instr->elements()); 2281 LOperand* backing_store = UseRegister(instr->elements());
2280 return new(zone()) LStoreKeyed(backing_store, key, val); 2282 LOperand* backing_store_owner = UseAny(instr->backing_store_owner());
2283 return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner);
2281 } 2284 }
2282 2285
2283 2286
2284 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { 2287 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
2285 LOperand* context = UseFixed(instr->context(), cp); 2288 LOperand* context = UseFixed(instr->context(), cp);
2286 LOperand* obj = 2289 LOperand* obj =
2287 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); 2290 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
2288 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); 2291 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
2289 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); 2292 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
2290 2293
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
2632 HAllocateBlockContext* instr) { 2635 HAllocateBlockContext* instr) {
2633 LOperand* context = UseFixed(instr->context(), cp); 2636 LOperand* context = UseFixed(instr->context(), cp);
2634 LOperand* function = UseRegisterAtStart(instr->function()); 2637 LOperand* function = UseRegisterAtStart(instr->function());
2635 LAllocateBlockContext* result = 2638 LAllocateBlockContext* result =
2636 new(zone()) LAllocateBlockContext(context, function); 2639 new(zone()) LAllocateBlockContext(context, function);
2637 return MarkAsCall(DefineFixed(result, cp), instr); 2640 return MarkAsCall(DefineFixed(result, cp), instr);
2638 } 2641 }
2639 2642
2640 } // namespace internal 2643 } // namespace internal
2641 } // namespace v8 2644 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm/lithium-arm.h ('k') | src/crankshaft/arm64/lithium-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698