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

Side by Side Diff: src/mips64/lithium-mips64.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/mips64/lithium-mips64.h ('k') | src/objects.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 <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS64 9 #if V8_TARGET_ARCH_MIPS64
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 instr->representation().IsInteger32()); 2196 instr->representation().IsInteger32());
2197 obj = UseRegisterAtStart(instr->elements()); 2197 obj = UseRegisterAtStart(instr->elements());
2198 } 2198 }
2199 result = DefineAsRegister(new(zone()) LLoadKeyed(obj, key)); 2199 result = DefineAsRegister(new(zone()) LLoadKeyed(obj, key));
2200 } else { 2200 } else {
2201 DCHECK( 2201 DCHECK(
2202 (instr->representation().IsInteger32() && 2202 (instr->representation().IsInteger32() &&
2203 !IsDoubleOrFloatElementsKind(elements_kind)) || 2203 !IsDoubleOrFloatElementsKind(elements_kind)) ||
2204 (instr->representation().IsDouble() && 2204 (instr->representation().IsDouble() &&
2205 IsDoubleOrFloatElementsKind(elements_kind))); 2205 IsDoubleOrFloatElementsKind(elements_kind)));
2206 LOperand* backing_store = UseRegister(instr->elements()); 2206 LOperand* backing_store = UseRegister(instr->elements());
2207 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key)); 2207 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key));
2208 } 2208 }
2209 2209
2210 bool needs_environment; 2210 bool needs_environment;
2211 if (instr->is_external() || instr->is_fixed_typed_array()) { 2211 if (instr->is_fixed_typed_array()) {
2212 // see LCodeGen::DoLoadKeyedExternalArray 2212 // see LCodeGen::DoLoadKeyedExternalArray
2213 needs_environment = (elements_kind == EXTERNAL_UINT32_ELEMENTS || 2213 needs_environment = elements_kind == UINT32_ELEMENTS &&
2214 elements_kind == UINT32_ELEMENTS) &&
2215 !instr->CheckFlag(HInstruction::kUint32); 2214 !instr->CheckFlag(HInstruction::kUint32);
2216 } else { 2215 } else {
2217 // see LCodeGen::DoLoadKeyedFixedDoubleArray and 2216 // see LCodeGen::DoLoadKeyedFixedDoubleArray and
2218 // LCodeGen::DoLoadKeyedFixedArray 2217 // LCodeGen::DoLoadKeyedFixedArray
2219 needs_environment = 2218 needs_environment =
2220 instr->RequiresHoleCheck() || 2219 instr->RequiresHoleCheck() ||
2221 (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED && info()->IsStub()); 2220 (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED && info()->IsStub());
2222 } 2221 }
2223 2222
2224 if (needs_environment) { 2223 if (needs_environment) {
(...skipping 14 matching lines...) Expand all
2239 } 2238 }
2240 2239
2241 LInstruction* result = 2240 LInstruction* result =
2242 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), 2241 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector),
2243 v0); 2242 v0);
2244 return MarkAsCall(result, instr); 2243 return MarkAsCall(result, instr);
2245 } 2244 }
2246 2245
2247 2246
2248 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { 2247 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
2249 if (!instr->is_typed_elements()) { 2248 if (!instr->is_fixed_typed_array()) {
2250 DCHECK(instr->elements()->representation().IsTagged()); 2249 DCHECK(instr->elements()->representation().IsTagged());
2251 bool needs_write_barrier = instr->NeedsWriteBarrier(); 2250 bool needs_write_barrier = instr->NeedsWriteBarrier();
2252 LOperand* object = NULL; 2251 LOperand* object = NULL;
2253 LOperand* val = NULL; 2252 LOperand* val = NULL;
2254 LOperand* key = NULL; 2253 LOperand* key = NULL;
2255 2254
2256 if (instr->value()->representation().IsDouble()) { 2255 if (instr->value()->representation().IsDouble()) {
2257 object = UseRegisterAtStart(instr->elements()); 2256 object = UseRegisterAtStart(instr->elements());
2258 key = UseRegisterOrConstantAtStart(instr->key()); 2257 key = UseRegisterOrConstantAtStart(instr->key());
2259 val = UseRegister(instr->value()); 2258 val = UseRegister(instr->value());
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 2677
2679 2678
2680 } // namespace internal 2679 } // namespace internal
2681 } // namespace v8 2680 } // namespace v8
2682 2681
2683 #endif // V8_TARGET_ARCH_MIPS64 2682 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/lithium-mips64.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698