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

Side by Side Diff: src/mips64/lithium-mips64.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/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 2172 matching lines...) Expand 10 before | Expand all | Expand 10 after
2183 return DefineAsRegister(new(zone()) LLoadRoot); 2183 return DefineAsRegister(new(zone()) LLoadRoot);
2184 } 2184 }
2185 2185
2186 2186
2187 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { 2187 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
2188 DCHECK(instr->key()->representation().IsSmiOrInteger32()); 2188 DCHECK(instr->key()->representation().IsSmiOrInteger32());
2189 ElementsKind elements_kind = instr->elements_kind(); 2189 ElementsKind elements_kind = instr->elements_kind();
2190 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); 2190 LOperand* key = UseRegisterOrConstantAtStart(instr->key());
2191 LInstruction* result = NULL; 2191 LInstruction* result = NULL;
2192 2192
2193 if (!instr->is_fixed_typed_array()) { 2193 if (!instr->is_typed_elements()) {
2194 LOperand* obj = NULL; 2194 LOperand* obj = NULL;
2195 if (instr->representation().IsDouble()) { 2195 if (instr->representation().IsDouble()) {
2196 obj = UseRegister(instr->elements()); 2196 obj = UseRegister(instr->elements());
2197 } else { 2197 } else {
2198 DCHECK(instr->representation().IsSmiOrTagged() || 2198 DCHECK(instr->representation().IsSmiOrTagged() ||
2199 instr->representation().IsInteger32()); 2199 instr->representation().IsInteger32());
2200 obj = UseRegisterAtStart(instr->elements()); 2200 obj = UseRegisterAtStart(instr->elements());
2201 } 2201 }
2202 result = DefineAsRegister(new(zone()) LLoadKeyed(obj, key)); 2202 result = DefineAsRegister(new(zone()) LLoadKeyed(obj, key));
2203 } else { 2203 } else {
2204 DCHECK( 2204 DCHECK(
2205 (instr->representation().IsInteger32() && 2205 (instr->representation().IsInteger32() &&
2206 !IsDoubleOrFloatElementsKind(elements_kind)) || 2206 !IsDoubleOrFloatElementsKind(elements_kind)) ||
2207 (instr->representation().IsDouble() && 2207 (instr->representation().IsDouble() &&
2208 IsDoubleOrFloatElementsKind(elements_kind))); 2208 IsDoubleOrFloatElementsKind(elements_kind)));
2209 LOperand* backing_store = UseRegister(instr->elements()); 2209 LOperand* backing_store = UseRegister(instr->elements());
2210 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key)); 2210 result = DefineAsRegister(new(zone()) LLoadKeyed(backing_store, key));
2211 } 2211 }
2212 2212
2213 bool needs_environment; 2213 bool needs_environment;
2214 if (instr->is_fixed_typed_array()) { 2214 if (instr->is_external() || instr->is_fixed_typed_array()) {
2215 // see LCodeGen::DoLoadKeyedExternalArray 2215 // see LCodeGen::DoLoadKeyedExternalArray
2216 needs_environment = elements_kind == UINT32_ELEMENTS && 2216 needs_environment = (elements_kind == EXTERNAL_UINT32_ELEMENTS ||
2217 elements_kind == UINT32_ELEMENTS) &&
2217 !instr->CheckFlag(HInstruction::kUint32); 2218 !instr->CheckFlag(HInstruction::kUint32);
2218 } else { 2219 } else {
2219 // see LCodeGen::DoLoadKeyedFixedDoubleArray and 2220 // see LCodeGen::DoLoadKeyedFixedDoubleArray and
2220 // LCodeGen::DoLoadKeyedFixedArray 2221 // LCodeGen::DoLoadKeyedFixedArray
2221 needs_environment = 2222 needs_environment =
2222 instr->RequiresHoleCheck() || 2223 instr->RequiresHoleCheck() ||
2223 (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED && info()->IsStub()); 2224 (instr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED && info()->IsStub());
2224 } 2225 }
2225 2226
2226 if (needs_environment) { 2227 if (needs_environment) {
(...skipping 14 matching lines...) Expand all
2241 } 2242 }
2242 2243
2243 LInstruction* result = 2244 LInstruction* result =
2244 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector), 2245 DefineFixed(new(zone()) LLoadKeyedGeneric(context, object, key, vector),
2245 v0); 2246 v0);
2246 return MarkAsCall(result, instr); 2247 return MarkAsCall(result, instr);
2247 } 2248 }
2248 2249
2249 2250
2250 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { 2251 LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
2251 if (!instr->is_fixed_typed_array()) { 2252 if (!instr->is_typed_elements()) {
2252 DCHECK(instr->elements()->representation().IsTagged()); 2253 DCHECK(instr->elements()->representation().IsTagged());
2253 bool needs_write_barrier = instr->NeedsWriteBarrier(); 2254 bool needs_write_barrier = instr->NeedsWriteBarrier();
2254 LOperand* object = NULL; 2255 LOperand* object = NULL;
2255 LOperand* val = NULL; 2256 LOperand* val = NULL;
2256 LOperand* key = NULL; 2257 LOperand* key = NULL;
2257 2258
2258 if (instr->value()->representation().IsDouble()) { 2259 if (instr->value()->representation().IsDouble()) {
2259 object = UseRegisterAtStart(instr->elements()); 2260 object = UseRegisterAtStart(instr->elements());
2260 key = UseRegisterOrConstantAtStart(instr->key()); 2261 key = UseRegisterOrConstantAtStart(instr->key());
2261 val = UseRegister(instr->value()); 2262 val = UseRegister(instr->value());
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
2676 LAllocateBlockContext* result = 2677 LAllocateBlockContext* result =
2677 new(zone()) LAllocateBlockContext(context, function); 2678 new(zone()) LAllocateBlockContext(context, function);
2678 return MarkAsCall(DefineFixed(result, cp), instr); 2679 return MarkAsCall(DefineFixed(result, cp), instr);
2679 } 2680 }
2680 2681
2681 2682
2682 } // namespace internal 2683 } // namespace internal
2683 } // namespace v8 2684 } // namespace v8
2684 2685
2685 #endif // V8_TARGET_ARCH_MIPS64 2686 #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