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

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

Issue 1254623002: 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/mips/lithium-mips.h ('k') | src/mips64/lithium-codegen-mips64.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 #if V8_TARGET_ARCH_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 2169 matching lines...) Expand 10 before | Expand all | Expand 10 after
2180 return DefineAsRegister(new(zone()) LLoadRoot); 2180 return DefineAsRegister(new(zone()) LLoadRoot);
2181 } 2181 }
2182 2182
2183 2183
2184 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { 2184 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
2185 DCHECK(instr->key()->representation().IsSmiOrInteger32()); 2185 DCHECK(instr->key()->representation().IsSmiOrInteger32());
2186 ElementsKind elements_kind = instr->elements_kind(); 2186 ElementsKind elements_kind = instr->elements_kind();
2187 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); 2187 LOperand* key = UseRegisterOrConstantAtStart(instr->key());
2188 LInstruction* result = NULL; 2188 LInstruction* result = NULL;
2189 2189
2190 if (!instr->is_typed_elements()) { 2190 if (!instr->is_fixed_typed_array()) {
2191 LOperand* obj = NULL; 2191 LOperand* obj = NULL;
2192 if (instr->representation().IsDouble()) { 2192 if (instr->representation().IsDouble()) {
2193 obj = UseRegister(instr->elements()); 2193 obj = UseRegister(instr->elements());
2194 } else { 2194 } else {
2195 DCHECK(instr->representation().IsSmiOrTagged()); 2195 DCHECK(instr->representation().IsSmiOrTagged());
2196 obj = UseRegisterAtStart(instr->elements()); 2196 obj = UseRegisterAtStart(instr->elements());
2197 } 2197 }
2198 result = DefineAsRegister(new(zone()) LLoadKeyed(obj, key)); 2198 result = DefineAsRegister(new(zone()) LLoadKeyed(obj, key));
2199 } else { 2199 } else {
2200 DCHECK( 2200 DCHECK(
2201 (instr->representation().IsInteger32() && 2201 (instr->representation().IsInteger32() &&
2202 !IsDoubleOrFloatElementsKind(elements_kind)) || 2202 !IsDoubleOrFloatElementsKind(elements_kind)) ||
2203 (instr->representation().IsDouble() && 2203 (instr->representation().IsDouble() &&
2204 IsDoubleOrFloatElementsKind(elements_kind))); 2204 IsDoubleOrFloatElementsKind(elements_kind)));
2205 LOperand* backing_store = UseRegister(instr->elements()); 2205 LOperand* backing_store = UseRegister(instr->elements());
2206 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key)); 2206 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key));
2207 } 2207 }
2208 2208
2209 bool needs_environment; 2209 bool needs_environment;
2210 if (instr->is_external() || instr->is_fixed_typed_array()) { 2210 if (instr->is_fixed_typed_array()) {
2211 // see LCodeGen::DoLoadKeyedExternalArray 2211 // see LCodeGen::DoLoadKeyedExternalArray
2212 needs_environment = (elements_kind == EXTERNAL_UINT32_ELEMENTS || 2212 needs_environment = elements_kind == UINT32_ELEMENTS &&
2213 elements_kind == UINT32_ELEMENTS) &&
2214 !instr->CheckFlag(HInstruction::kUint32); 2213 !instr->CheckFlag(HInstruction::kUint32);
2215 } else { 2214 } else {
2216 // see LCodeGen::DoLoadKeyedFixedDoubleArray and 2215 // see LCodeGen::DoLoadKeyedFixedDoubleArray and
2217 // LCodeGen::DoLoadKeyedFixedArray 2216 // LCodeGen::DoLoadKeyedFixedArray
2218 needs_environment = 2217 needs_environment =
2219 instr->RequiresHoleCheck() || 2218 instr->RequiresHoleCheck() ||
2220 (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED && info()->IsStub()); 2219 (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED && info()->IsStub());
2221 } 2220 }
2222 2221
2223 if (needs_environment) { 2222 if (needs_environment) {
(...skipping 14 matching lines...) Expand all
2238 } 2237 }
2239 2238
2240 LInstruction* result = 2239 LInstruction* result =
2241 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), 2240 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector),
2242 v0); 2241 v0);
2243 return MarkAsCall(result, instr); 2242 return MarkAsCall(result, instr);
2244 } 2243 }
2245 2244
2246 2245
2247 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { 2246 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
2248 if (!instr->is_typed_elements()) { 2247 if (!instr->is_fixed_typed_array()) {
2249 DCHECK(instr->elements()->representation().IsTagged()); 2248 DCHECK(instr->elements()->representation().IsTagged());
2250 bool needs_write_barrier = instr->NeedsWriteBarrier(); 2249 bool needs_write_barrier = instr->NeedsWriteBarrier();
2251 LOperand* object = NULL; 2250 LOperand* object = NULL;
2252 LOperand* val = NULL; 2251 LOperand* val = NULL;
2253 LOperand* key = NULL; 2252 LOperand* key = NULL;
2254 2253
2255 if (instr->value()->representation().IsDouble()) { 2254 if (instr->value()->representation().IsDouble()) {
2256 object = UseRegisterAtStart(instr->elements()); 2255 object = UseRegisterAtStart(instr->elements());
2257 key = UseRegisterOrConstantAtStart(instr->key()); 2256 key = UseRegisterOrConstantAtStart(instr->key());
2258 val = UseRegister(instr->value()); 2257 val = UseRegister(instr->value());
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
2672 LOperand* function = UseRegisterAtStart(instr->function()); 2671 LOperand* function = UseRegisterAtStart(instr->function());
2673 LAllocateBlockContext* result = 2672 LAllocateBlockContext* result =
2674 new(zone()) LAllocateBlockContext(context, function); 2673 new(zone()) LAllocateBlockContext(context, function);
2675 return MarkAsCall(DefineFixed(result, cp), instr); 2674 return MarkAsCall(DefineFixed(result, cp), instr);
2676 } 2675 }
2677 2676
2678 } // namespace internal 2677 } // namespace internal
2679 } // namespace v8 2678 } // namespace v8
2680 2679
2681 #endif // V8_TARGET_ARCH_MIPS 2680 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.h ('k') | src/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698