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

Side by Side Diff: src/crankshaft/x87/lithium-x87.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/x87/lithium-x87.h ('k') | test/mjsunit/regress/typed-array-lifetime.js » ('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/x87/lithium-x87.h" 5 #include "src/crankshaft/x87/lithium-x87.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_X87 9 #if V8_TARGET_ARCH_X87
10 10
(...skipping 2183 matching lines...) Expand 10 before | Expand all | Expand 10 after
2194 ElementsKind elements_kind = instr->elements_kind(); 2194 ElementsKind elements_kind = instr->elements_kind();
2195 bool clobbers_key = ExternalArrayOpRequiresTemp( 2195 bool clobbers_key = ExternalArrayOpRequiresTemp(
2196 instr->key()->representation(), elements_kind); 2196 instr->key()->representation(), elements_kind);
2197 LOperand* key = clobbers_key 2197 LOperand* key = clobbers_key
2198 ? UseTempRegister(instr->key()) 2198 ? UseTempRegister(instr->key())
2199 : UseRegisterOrConstantAtStart(instr->key()); 2199 : UseRegisterOrConstantAtStart(instr->key());
2200 LInstruction* result = NULL; 2200 LInstruction* result = NULL;
2201 2201
2202 if (!instr->is_fixed_typed_array()) { 2202 if (!instr->is_fixed_typed_array()) {
2203 LOperand* obj = UseRegisterAtStart(instr->elements()); 2203 LOperand* obj = UseRegisterAtStart(instr->elements());
2204 result = DefineAsRegister(new(zone()) LLoadKeyed(obj, key)); 2204 result = DefineAsRegister(new (zone()) LLoadKeyed(obj, key, nullptr));
2205 } else { 2205 } else {
2206 DCHECK( 2206 DCHECK(
2207 (instr->representation().IsInteger32() && 2207 (instr->representation().IsInteger32() &&
2208 !(IsDoubleOrFloatElementsKind(instr->elements_kind()))) || 2208 !(IsDoubleOrFloatElementsKind(instr->elements_kind()))) ||
2209 (instr->representation().IsDouble() && 2209 (instr->representation().IsDouble() &&
2210 (IsDoubleOrFloatElementsKind(instr->elements_kind())))); 2210 (IsDoubleOrFloatElementsKind(instr->elements_kind()))));
2211 LOperand* backing_store = UseRegister(instr->elements()); 2211 LOperand* backing_store = UseRegister(instr->elements());
2212 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key)); 2212 LOperand* backing_store_owner = UseAny(instr->backing_store_owner());
2213 result = DefineAsRegister(
2214 new (zone()) LLoadKeyed(backing_store, key, backing_store_owner));
2213 } 2215 }
2214 2216
2215 bool needs_environment; 2217 bool needs_environment;
2216 if (instr->is_fixed_typed_array()) { 2218 if (instr->is_fixed_typed_array()) {
2217 // see LCodeGen::DoLoadKeyedExternalArray 2219 // see LCodeGen::DoLoadKeyedExternalArray
2218 needs_environment = elements_kind == UINT32_ELEMENTS && 2220 needs_environment = elements_kind == UINT32_ELEMENTS &&
2219 !instr->CheckFlag(HInstruction::kUint32); 2221 !instr->CheckFlag(HInstruction::kUint32);
2220 } else { 2222 } else {
2221 // see LCodeGen::DoLoadKeyedFixedDoubleArray and 2223 // see LCodeGen::DoLoadKeyedFixedDoubleArray and
2222 // LCodeGen::DoLoadKeyedFixedArray 2224 // LCodeGen::DoLoadKeyedFixedArray
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
2273 DCHECK(instr->key()->representation().IsInteger32() || 2275 DCHECK(instr->key()->representation().IsInteger32() ||
2274 instr->key()->representation().IsSmi()); 2276 instr->key()->representation().IsSmi());
2275 2277
2276 if (instr->value()->representation().IsDouble()) { 2278 if (instr->value()->representation().IsDouble()) {
2277 LOperand* object = UseRegisterAtStart(instr->elements()); 2279 LOperand* object = UseRegisterAtStart(instr->elements());
2278 // For storing double hole, no fp register required. 2280 // For storing double hole, no fp register required.
2279 LOperand* val = instr->IsConstantHoleStore() 2281 LOperand* val = instr->IsConstantHoleStore()
2280 ? NULL 2282 ? NULL
2281 : UseRegisterAtStart(instr->value()); 2283 : UseRegisterAtStart(instr->value());
2282 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); 2284 LOperand* key = UseRegisterOrConstantAtStart(instr->key());
2283 return new(zone()) LStoreKeyed(object, key, val); 2285 return new (zone()) LStoreKeyed(object, key, val, nullptr);
2284 } else { 2286 } else {
2285 DCHECK(instr->value()->representation().IsSmiOrTagged()); 2287 DCHECK(instr->value()->representation().IsSmiOrTagged());
2286 bool needs_write_barrier = instr->NeedsWriteBarrier(); 2288 bool needs_write_barrier = instr->NeedsWriteBarrier();
2287 2289
2288 LOperand* obj = UseRegister(instr->elements()); 2290 LOperand* obj = UseRegister(instr->elements());
2289 LOperand* val; 2291 LOperand* val;
2290 LOperand* key; 2292 LOperand* key;
2291 if (needs_write_barrier) { 2293 if (needs_write_barrier) {
2292 val = UseTempRegister(instr->value()); 2294 val = UseTempRegister(instr->value());
2293 key = UseTempRegister(instr->key()); 2295 key = UseTempRegister(instr->key());
2294 } else { 2296 } else {
2295 val = UseRegisterOrConstantAtStart(instr->value()); 2297 val = UseRegisterOrConstantAtStart(instr->value());
2296 key = UseRegisterOrConstantAtStart(instr->key()); 2298 key = UseRegisterOrConstantAtStart(instr->key());
2297 } 2299 }
2298 return new(zone()) LStoreKeyed(obj, key, val); 2300 return new (zone()) LStoreKeyed(obj, key, val, nullptr);
2299 } 2301 }
2300 } 2302 }
2301 2303
2302 ElementsKind elements_kind = instr->elements_kind(); 2304 ElementsKind elements_kind = instr->elements_kind();
2303 DCHECK( 2305 DCHECK(
2304 (instr->value()->representation().IsInteger32() && 2306 (instr->value()->representation().IsInteger32() &&
2305 !IsDoubleOrFloatElementsKind(elements_kind)) || 2307 !IsDoubleOrFloatElementsKind(elements_kind)) ||
2306 (instr->value()->representation().IsDouble() && 2308 (instr->value()->representation().IsDouble() &&
2307 IsDoubleOrFloatElementsKind(elements_kind))); 2309 IsDoubleOrFloatElementsKind(elements_kind)));
2308 DCHECK(instr->elements()->representation().IsExternal()); 2310 DCHECK(instr->elements()->representation().IsExternal());
2309 2311
2310 LOperand* backing_store = UseRegister(instr->elements()); 2312 LOperand* backing_store = UseRegister(instr->elements());
2311 LOperand* val = GetStoreKeyedValueOperand(instr); 2313 LOperand* val = GetStoreKeyedValueOperand(instr);
2312 bool clobbers_key = ExternalArrayOpRequiresTemp( 2314 bool clobbers_key = ExternalArrayOpRequiresTemp(
2313 instr->key()->representation(), elements_kind); 2315 instr->key()->representation(), elements_kind);
2314 LOperand* key = clobbers_key 2316 LOperand* key = clobbers_key
2315 ? UseTempRegister(instr->key()) 2317 ? UseTempRegister(instr->key())
2316 : UseRegisterOrConstantAtStart(instr->key()); 2318 : UseRegisterOrConstantAtStart(instr->key());
2317 return new(zone()) LStoreKeyed(backing_store, key, val); 2319 LOperand* backing_store_owner = UseAny(instr->backing_store_owner());
2320 return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner);
2318 } 2321 }
2319 2322
2320 2323
2321 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { 2324 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
2322 LOperand* context = UseFixed(instr->context(), esi); 2325 LOperand* context = UseFixed(instr->context(), esi);
2323 LOperand* object = 2326 LOperand* object =
2324 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); 2327 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
2325 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister()); 2328 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
2326 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); 2329 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
2327 2330
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
2724 LAllocateBlockContext* result = 2727 LAllocateBlockContext* result =
2725 new(zone()) LAllocateBlockContext(context, function); 2728 new(zone()) LAllocateBlockContext(context, function);
2726 return MarkAsCall(DefineFixed(result, esi), instr); 2729 return MarkAsCall(DefineFixed(result, esi), instr);
2727 } 2730 }
2728 2731
2729 2732
2730 } // namespace internal 2733 } // namespace internal
2731 } // namespace v8 2734 } // namespace v8
2732 2735
2733 #endif // V8_TARGET_ARCH_X87 2736 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x87/lithium-x87.h ('k') | test/mjsunit/regress/typed-array-lifetime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698