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

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

Issue 1262583002: Reland of "Remove ExternalArray, derived types, and element kinds" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates 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/ppc/lithium-ppc.h ('k') | src/runtime/runtime.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/hydrogen-osr.h" 9 #include "src/hydrogen-osr.h"
10 #include "src/lithium-inl.h" 10 #include "src/lithium-inl.h"
(...skipping 2180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2191 return DefineAsRegister(new (zone()) LLoadRoot); 2191 return DefineAsRegister(new (zone()) LLoadRoot);
2192 } 2192 }
2193 2193
2194 2194
2195 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { 2195 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
2196 DCHECK(instr->key()->representation().IsSmiOrInteger32()); 2196 DCHECK(instr->key()->representation().IsSmiOrInteger32());
2197 ElementsKind elements_kind = instr->elements_kind(); 2197 ElementsKind elements_kind = instr->elements_kind();
2198 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); 2198 LOperand* key = UseRegisterOrConstantAtStart(instr->key());
2199 LInstruction* result = NULL; 2199 LInstruction* result = NULL;
2200 2200
2201 if (!instr->is_typed_elements()) { 2201 if (!instr->is_fixed_typed_array()) {
2202 LOperand* obj = NULL; 2202 LOperand* obj = NULL;
2203 if (instr->representation().IsDouble()) { 2203 if (instr->representation().IsDouble()) {
2204 obj = UseRegister(instr->elements()); 2204 obj = UseRegister(instr->elements());
2205 } else { 2205 } else {
2206 obj = UseRegisterAtStart(instr->elements()); 2206 obj = UseRegisterAtStart(instr->elements());
2207 } 2207 }
2208 result = DefineAsRegister(new (zone()) LLoadKeyed(obj, key)); 2208 result = DefineAsRegister(new (zone()) LLoadKeyed(obj, key));
2209 } else { 2209 } else {
2210 DCHECK((instr->representation().IsInteger32() && 2210 DCHECK((instr->representation().IsInteger32() &&
2211 !IsDoubleOrFloatElementsKind(elements_kind)) || 2211 !IsDoubleOrFloatElementsKind(elements_kind)) ||
2212 (instr->representation().IsDouble() && 2212 (instr->representation().IsDouble() &&
2213 IsDoubleOrFloatElementsKind(elements_kind))); 2213 IsDoubleOrFloatElementsKind(elements_kind)));
2214 LOperand* backing_store = UseRegister(instr->elements()); 2214 LOperand* backing_store = UseRegister(instr->elements());
2215 result = DefineAsRegister(new (zone()) LLoadKeyed(backing_store, key)); 2215 result = DefineAsRegister(new (zone()) LLoadKeyed(backing_store, key));
2216 } 2216 }
2217 2217
2218 bool needs_environment; 2218 bool needs_environment;
2219 if (instr->is_external() || instr->is_fixed_typed_array()) { 2219 if (instr->is_fixed_typed_array()) {
2220 // see LCodeGen::DoLoadKeyedExternalArray 2220 // see LCodeGen::DoLoadKeyedExternalArray
2221 needs_environment = (elements_kind == EXTERNAL_UINT32_ELEMENTS || 2221 needs_environment = elements_kind == UINT32_ELEMENTS &&
2222 elements_kind == UINT32_ELEMENTS) &&
2223 !instr->CheckFlag(HInstruction::kUint32); 2222 !instr->CheckFlag(HInstruction::kUint32);
2224 } else { 2223 } else {
2225 // see LCodeGen::DoLoadKeyedFixedDoubleArray and 2224 // see LCodeGen::DoLoadKeyedFixedDoubleArray and
2226 // LCodeGen::DoLoadKeyedFixedArray 2225 // LCodeGen::DoLoadKeyedFixedArray
2227 needs_environment = 2226 needs_environment =
2228 instr->RequiresHoleCheck() || 2227 instr->RequiresHoleCheck() ||
2229 (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED && info()->IsStub()); 2228 (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED && info()->IsStub());
2230 } 2229 }
2231 2230
2232 if (needs_environment) { 2231 if (needs_environment) {
(...skipping 13 matching lines...) Expand all
2246 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); 2245 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
2247 } 2246 }
2248 2247
2249 LInstruction* result = DefineFixed( 2248 LInstruction* result = DefineFixed(
2250 new (zone()) LLoadKeyedGeneric(context, object, key, vector), r3); 2249 new (zone()) LLoadKeyedGeneric(context, object, key, vector), r3);
2251 return MarkAsCall(result, instr); 2250 return MarkAsCall(result, instr);
2252 } 2251 }
2253 2252
2254 2253
2255 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { 2254 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
2256 if (!instr->is_typed_elements()) { 2255 if (!instr->is_fixed_typed_array()) {
2257 DCHECK(instr->elements()->representation().IsTagged()); 2256 DCHECK(instr->elements()->representation().IsTagged());
2258 bool needs_write_barrier = instr->NeedsWriteBarrier(); 2257 bool needs_write_barrier = instr->NeedsWriteBarrier();
2259 LOperand* object = NULL; 2258 LOperand* object = NULL;
2260 LOperand* key = NULL; 2259 LOperand* key = NULL;
2261 LOperand* val = NULL; 2260 LOperand* val = NULL;
2262 2261
2263 if (instr->value()->representation().IsDouble()) { 2262 if (instr->value()->representation().IsDouble()) {
2264 object = UseRegisterAtStart(instr->elements()); 2263 object = UseRegisterAtStart(instr->elements());
2265 val = UseRegister(instr->value()); 2264 val = UseRegister(instr->value());
2266 key = UseRegisterOrConstantAtStart(instr->key()); 2265 key = UseRegisterOrConstantAtStart(instr->key());
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
2670 LInstruction* LChunkBuilder::DoAllocateBlockContext( 2669 LInstruction* LChunkBuilder::DoAllocateBlockContext(
2671 HAllocateBlockContext* instr) { 2670 HAllocateBlockContext* instr) {
2672 LOperand* context = UseFixed(instr->context(), cp); 2671 LOperand* context = UseFixed(instr->context(), cp);
2673 LOperand* function = UseRegisterAtStart(instr->function()); 2672 LOperand* function = UseRegisterAtStart(instr->function());
2674 LAllocateBlockContext* result = 2673 LAllocateBlockContext* result =
2675 new (zone()) LAllocateBlockContext(context, function); 2674 new (zone()) LAllocateBlockContext(context, function);
2676 return MarkAsCall(DefineFixed(result, cp), instr); 2675 return MarkAsCall(DefineFixed(result, cp), instr);
2677 } 2676 }
2678 } // namespace internal 2677 } // namespace internal
2679 } // namespace v8 2678 } // namespace v8
OLDNEW
« no previous file with comments | « src/ppc/lithium-ppc.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698