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

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

Issue 1511433005: Version 4.8.271.9 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.8
Patch Set: 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/x64/lithium-x64.h ('k') | src/crankshaft/x87/lithium-x87.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/x64/lithium-x64.h" 5 #include "src/crankshaft/x64/lithium-x64.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_X64 9 #if V8_TARGET_ARCH_X64
10 10
(...skipping 2185 matching lines...) Expand 10 before | Expand all | Expand 10 after
2196 ? UseTempRegister(instr->key()) 2196 ? UseTempRegister(instr->key())
2197 : UseRegisterOrConstantAtStart(instr->key()); 2197 : UseRegisterOrConstantAtStart(instr->key());
2198 } 2198 }
2199 2199
2200 if ((kPointerSize == kInt64Size) && instr->IsDehoisted()) { 2200 if ((kPointerSize == kInt64Size) && instr->IsDehoisted()) {
2201 FindDehoistedKeyDefinitions(instr->key()); 2201 FindDehoistedKeyDefinitions(instr->key());
2202 } 2202 }
2203 2203
2204 if (!instr->is_fixed_typed_array()) { 2204 if (!instr->is_fixed_typed_array()) {
2205 LOperand* obj = UseRegisterAtStart(instr->elements()); 2205 LOperand* obj = UseRegisterAtStart(instr->elements());
2206 result = DefineAsRegister(new(zone()) LLoadKeyed(obj, key)); 2206 result = DefineAsRegister(new (zone()) LLoadKeyed(obj, key, nullptr));
2207 } else { 2207 } else {
2208 DCHECK( 2208 DCHECK(
2209 (instr->representation().IsInteger32() && 2209 (instr->representation().IsInteger32() &&
2210 !(IsDoubleOrFloatElementsKind(elements_kind))) || 2210 !(IsDoubleOrFloatElementsKind(elements_kind))) ||
2211 (instr->representation().IsDouble() && 2211 (instr->representation().IsDouble() &&
2212 (IsDoubleOrFloatElementsKind(elements_kind)))); 2212 (IsDoubleOrFloatElementsKind(elements_kind))));
2213 LOperand* backing_store = UseRegister(instr->elements()); 2213 LOperand* backing_store = UseRegister(instr->elements());
2214 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key)); 2214 LOperand* backing_store_owner = UseAny(instr->backing_store_owner());
2215 result = DefineAsRegister(
2216 new (zone()) LLoadKeyed(backing_store, key, backing_store_owner));
2215 } 2217 }
2216 2218
2217 bool needs_environment; 2219 bool needs_environment;
2218 if (instr->is_fixed_typed_array()) { 2220 if (instr->is_fixed_typed_array()) {
2219 // see LCodeGen::DoLoadKeyedExternalArray 2221 // see LCodeGen::DoLoadKeyedExternalArray
2220 needs_environment = elements_kind == UINT32_ELEMENTS && 2222 needs_environment = elements_kind == UINT32_ELEMENTS &&
2221 !instr->CheckFlag(HInstruction::kUint32); 2223 !instr->CheckFlag(HInstruction::kUint32);
2222 } else { 2224 } else {
2223 // see LCodeGen::DoLoadKeyedFixedDoubleArray and 2225 // see LCodeGen::DoLoadKeyedFixedDoubleArray and
2224 // LCodeGen::DoLoadKeyedFixedArray 2226 // LCodeGen::DoLoadKeyedFixedArray
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
2276 object = UseTempRegister(instr->elements()); 2278 object = UseTempRegister(instr->elements());
2277 val = UseTempRegister(instr->value()); 2279 val = UseTempRegister(instr->value());
2278 key = UseTempRegister(instr->key()); 2280 key = UseTempRegister(instr->key());
2279 } else { 2281 } else {
2280 object = UseRegisterAtStart(instr->elements()); 2282 object = UseRegisterAtStart(instr->elements());
2281 val = UseRegisterOrConstantAtStart(instr->value()); 2283 val = UseRegisterOrConstantAtStart(instr->value());
2282 key = UseRegisterOrConstantAtStart(instr->key()); 2284 key = UseRegisterOrConstantAtStart(instr->key());
2283 } 2285 }
2284 } 2286 }
2285 2287
2286 return new(zone()) LStoreKeyed(object, key, val); 2288 return new (zone()) LStoreKeyed(object, key, val, nullptr);
2287 } 2289 }
2288 2290
2289 DCHECK( 2291 DCHECK(
2290 (instr->value()->representation().IsInteger32() && 2292 (instr->value()->representation().IsInteger32() &&
2291 !IsDoubleOrFloatElementsKind(elements_kind)) || 2293 !IsDoubleOrFloatElementsKind(elements_kind)) ||
2292 (instr->value()->representation().IsDouble() && 2294 (instr->value()->representation().IsDouble() &&
2293 IsDoubleOrFloatElementsKind(elements_kind))); 2295 IsDoubleOrFloatElementsKind(elements_kind)));
2294 DCHECK(instr->elements()->representation().IsExternal()); 2296 DCHECK(instr->elements()->representation().IsExternal());
2295 bool val_is_temp_register = elements_kind == UINT8_CLAMPED_ELEMENTS || 2297 bool val_is_temp_register = elements_kind == UINT8_CLAMPED_ELEMENTS ||
2296 elements_kind == FLOAT32_ELEMENTS; 2298 elements_kind == FLOAT32_ELEMENTS;
2297 LOperand* val = val_is_temp_register ? UseTempRegister(instr->value()) 2299 LOperand* val = val_is_temp_register ? UseTempRegister(instr->value())
2298 : UseRegister(instr->value()); 2300 : UseRegister(instr->value());
2299 LOperand* key = NULL; 2301 LOperand* key = NULL;
2300 if (kPointerSize == kInt64Size) { 2302 if (kPointerSize == kInt64Size) {
2301 key = UseRegisterOrConstantAtStart(instr->key()); 2303 key = UseRegisterOrConstantAtStart(instr->key());
2302 } else { 2304 } else {
2303 bool clobbers_key = ExternalArrayOpRequiresTemp( 2305 bool clobbers_key = ExternalArrayOpRequiresTemp(
2304 instr->key()->representation(), elements_kind); 2306 instr->key()->representation(), elements_kind);
2305 key = clobbers_key 2307 key = clobbers_key
2306 ? UseTempRegister(instr->key()) 2308 ? UseTempRegister(instr->key())
2307 : UseRegisterOrConstantAtStart(instr->key()); 2309 : UseRegisterOrConstantAtStart(instr->key());
2308 } 2310 }
2309 LOperand* backing_store = UseRegister(instr->elements()); 2311 LOperand* backing_store = UseRegister(instr->elements());
2310 return new(zone()) LStoreKeyed(backing_store, key, val); 2312 LOperand* backing_store_owner = UseAny(instr->backing_store_owner());
2313 return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner);
2311 } 2314 }
2312 2315
2313 2316
2314 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { 2317 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
2315 LOperand* context = UseFixed(instr->context(), rsi); 2318 LOperand* context = UseFixed(instr->context(), rsi);
2316 LOperand* object = 2319 LOperand* object =
2317 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); 2320 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
2318 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); 2321 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
2319 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); 2322 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
2320 2323
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
2706 LAllocateBlockContext* result = 2709 LAllocateBlockContext* result =
2707 new(zone()) LAllocateBlockContext(context, function); 2710 new(zone()) LAllocateBlockContext(context, function);
2708 return MarkAsCall(DefineFixed(result, rsi), instr); 2711 return MarkAsCall(DefineFixed(result, rsi), instr);
2709 } 2712 }
2710 2713
2711 2714
2712 } // namespace internal 2715 } // namespace internal
2713 } // namespace v8 2716 } // namespace v8
2714 2717
2715 #endif // V8_TARGET_ARCH_X64 2718 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-x64.h ('k') | src/crankshaft/x87/lithium-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698