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

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

Issue 1257223002: Revert of Remove ExternalArray, derived types, and element kinds (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months 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/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.cc » ('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 <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/arm/lithium-codegen-arm.h" 9 #include "src/arm/lithium-codegen-arm.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after
2233 return DefineAsRegister(new(zone()) LLoadRoot); 2233 return DefineAsRegister(new(zone()) LLoadRoot);
2234 } 2234 }
2235 2235
2236 2236
2237 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { 2237 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
2238 DCHECK(instr->key()->representation().IsSmiOrInteger32()); 2238 DCHECK(instr->key()->representation().IsSmiOrInteger32());
2239 ElementsKind elements_kind = instr->elements_kind(); 2239 ElementsKind elements_kind = instr->elements_kind();
2240 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); 2240 LOperand* key = UseRegisterOrConstantAtStart(instr->key());
2241 LInstruction* result = NULL; 2241 LInstruction* result = NULL;
2242 2242
2243 if (!instr->is_fixed_typed_array()) { 2243 if (!instr->is_typed_elements()) {
2244 LOperand* obj = NULL; 2244 LOperand* obj = NULL;
2245 if (instr->representation().IsDouble()) { 2245 if (instr->representation().IsDouble()) {
2246 obj = UseRegister(instr->elements()); 2246 obj = UseRegister(instr->elements());
2247 } else { 2247 } else {
2248 DCHECK(instr->representation().IsSmiOrTagged()); 2248 DCHECK(instr->representation().IsSmiOrTagged());
2249 obj = UseRegisterAtStart(instr->elements()); 2249 obj = UseRegisterAtStart(instr->elements());
2250 } 2250 }
2251 result = DefineAsRegister(new(zone()) LLoadKeyed(obj, key)); 2251 result = DefineAsRegister(new(zone()) LLoadKeyed(obj, key));
2252 } else { 2252 } else {
2253 DCHECK( 2253 DCHECK(
2254 (instr->representation().IsInteger32() && 2254 (instr->representation().IsInteger32() &&
2255 !IsDoubleOrFloatElementsKind(elements_kind)) || 2255 !IsDoubleOrFloatElementsKind(elements_kind)) ||
2256 (instr->representation().IsDouble() && 2256 (instr->representation().IsDouble() &&
2257 IsDoubleOrFloatElementsKind(elements_kind))); 2257 IsDoubleOrFloatElementsKind(elements_kind)));
2258 LOperand* backing_store = UseRegister(instr->elements()); 2258 LOperand* backing_store = UseRegister(instr->elements());
2259 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key)); 2259 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key));
2260 } 2260 }
2261 2261
2262 bool needs_environment; 2262 bool needs_environment;
2263 if (instr->is_fixed_typed_array()) { 2263 if (instr->is_external() || instr->is_fixed_typed_array()) {
2264 // see LCodeGen::DoLoadKeyedExternalArray 2264 // see LCodeGen::DoLoadKeyedExternalArray
2265 needs_environment = elements_kind == UINT32_ELEMENTS && 2265 needs_environment = (elements_kind == EXTERNAL_UINT32_ELEMENTS ||
2266 elements_kind == UINT32_ELEMENTS) &&
2266 !instr->CheckFlag(HInstruction::kUint32); 2267 !instr->CheckFlag(HInstruction::kUint32);
2267 } else { 2268 } else {
2268 // see LCodeGen::DoLoadKeyedFixedDoubleArray and 2269 // see LCodeGen::DoLoadKeyedFixedDoubleArray and
2269 // LCodeGen::DoLoadKeyedFixedArray 2270 // LCodeGen::DoLoadKeyedFixedArray
2270 needs_environment = 2271 needs_environment =
2271 instr->RequiresHoleCheck() || 2272 instr->RequiresHoleCheck() ||
2272 (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED && info()->IsStub()); 2273 (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED && info()->IsStub());
2273 } 2274 }
2274 2275
2275 if (needs_environment) { 2276 if (needs_environment) {
(...skipping 14 matching lines...) Expand all
2290 } 2291 }
2291 2292
2292 LInstruction* result = 2293 LInstruction* result =
2293 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), 2294 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector),
2294 r0); 2295 r0);
2295 return MarkAsCall(result, instr); 2296 return MarkAsCall(result, instr);
2296 } 2297 }
2297 2298
2298 2299
2299 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { 2300 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
2300 if (!instr->is_fixed_typed_array()) { 2301 if (!instr->is_typed_elements()) {
2301 DCHECK(instr->elements()->representation().IsTagged()); 2302 DCHECK(instr->elements()->representation().IsTagged());
2302 bool needs_write_barrier = instr->NeedsWriteBarrier(); 2303 bool needs_write_barrier = instr->NeedsWriteBarrier();
2303 LOperand* object = NULL; 2304 LOperand* object = NULL;
2304 LOperand* key = NULL; 2305 LOperand* key = NULL;
2305 LOperand* val = NULL; 2306 LOperand* val = NULL;
2306 2307
2307 if (instr->value()->representation().IsDouble()) { 2308 if (instr->value()->representation().IsDouble()) {
2308 object = UseRegisterAtStart(instr->elements()); 2309 object = UseRegisterAtStart(instr->elements());
2309 val = UseRegister(instr->value()); 2310 val = UseRegister(instr->value());
2310 key = UseRegisterOrConstantAtStart(instr->key()); 2311 key = UseRegisterOrConstantAtStart(instr->key());
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
2721 HAllocateBlockContext* instr) { 2722 HAllocateBlockContext* instr) {
2722 LOperand* context = UseFixed(instr->context(), cp); 2723 LOperand* context = UseFixed(instr->context(), cp);
2723 LOperand* function = UseRegisterAtStart(instr->function()); 2724 LOperand* function = UseRegisterAtStart(instr->function());
2724 LAllocateBlockContext* result = 2725 LAllocateBlockContext* result =
2725 new(zone()) LAllocateBlockContext(context, function); 2726 new(zone()) LAllocateBlockContext(context, function);
2726 return MarkAsCall(DefineFixed(result, cp), instr); 2727 return MarkAsCall(DefineFixed(result, cp), instr);
2727 } 2728 }
2728 2729
2729 } // namespace internal 2730 } // namespace internal
2730 } // namespace v8 2731 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698