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

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

Issue 2350423002: [crankshaft] Remove HStoreKeyedGeneric and use HCallWithDescriptor instead to call KeyedStoreIC. (Closed)
Patch Set: Created 4 years, 3 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/crankshaft/arm/lithium-arm.h ('k') | src/crankshaft/arm/lithium-codegen-arm.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 "src/crankshaft/arm/lithium-arm.h" 5 #include "src/crankshaft/arm/lithium-arm.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/crankshaft/arm/lithium-codegen-arm.h" 9 #include "src/crankshaft/arm/lithium-codegen-arm.h"
10 #include "src/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 if (value() == NULL) { 329 if (value() == NULL) {
330 DCHECK(hydrogen()->IsConstantHoleStore() && 330 DCHECK(hydrogen()->IsConstantHoleStore() &&
331 hydrogen()->value()->representation().IsDouble()); 331 hydrogen()->value()->representation().IsDouble());
332 stream->Add("<the hole(nan)>"); 332 stream->Add("<the hole(nan)>");
333 } else { 333 } else {
334 value()->PrintTo(stream); 334 value()->PrintTo(stream);
335 } 335 }
336 } 336 }
337 337
338 338
339 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
340 object()->PrintTo(stream);
341 stream->Add("[");
342 key()->PrintTo(stream);
343 stream->Add("] <- ");
344 value()->PrintTo(stream);
345 }
346
347
348 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { 339 void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
349 object()->PrintTo(stream); 340 object()->PrintTo(stream);
350 stream->Add(" %p -> %p", *original_map(), *transitioned_map()); 341 stream->Add(" %p -> %p", *original_map(), *transitioned_map());
351 } 342 }
352 343
353 344
354 int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) { 345 int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) {
355 // Skip a slot if for a double-width slot. 346 // Skip a slot if for a double-width slot.
356 if (kind == DOUBLE_REGISTERS) current_frame_slots_++; 347 if (kind == DOUBLE_REGISTERS) current_frame_slots_++;
357 return current_frame_slots_++; 348 return current_frame_slots_++;
(...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after
2164 IsDoubleOrFloatElementsKind(instr->elements_kind()))); 2155 IsDoubleOrFloatElementsKind(instr->elements_kind())));
2165 DCHECK(instr->elements()->representation().IsExternal()); 2156 DCHECK(instr->elements()->representation().IsExternal());
2166 LOperand* val = UseRegister(instr->value()); 2157 LOperand* val = UseRegister(instr->value());
2167 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); 2158 LOperand* key = UseRegisterOrConstantAtStart(instr->key());
2168 LOperand* backing_store = UseRegister(instr->elements()); 2159 LOperand* backing_store = UseRegister(instr->elements());
2169 LOperand* backing_store_owner = UseAny(instr->backing_store_owner()); 2160 LOperand* backing_store_owner = UseAny(instr->backing_store_owner());
2170 return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner); 2161 return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner);
2171 } 2162 }
2172 2163
2173 2164
2174 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
2175 LOperand* context = UseFixed(instr->context(), cp);
2176 LOperand* obj =
2177 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
2178 LOperand* key = UseFixed(instr->key(), StoreDescriptor::NameRegister());
2179 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
2180
2181 DCHECK(instr->object()->representation().IsTagged());
2182 DCHECK(instr->key()->representation().IsTagged());
2183 DCHECK(instr->value()->representation().IsTagged());
2184
2185 LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister());
2186 LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister());
2187
2188 LStoreKeyedGeneric* result =
2189 new (zone()) LStoreKeyedGeneric(context, obj, key, val, slot, vector);
2190 return MarkAsCall(result, instr);
2191 }
2192
2193
2194 LInstruction* LChunkBuilder::DoTransitionElementsKind( 2165 LInstruction* LChunkBuilder::DoTransitionElementsKind(
2195 HTransitionElementsKind* instr) { 2166 HTransitionElementsKind* instr) {
2196 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { 2167 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) {
2197 LOperand* object = UseRegister(instr->object()); 2168 LOperand* object = UseRegister(instr->object());
2198 LOperand* new_map_reg = TempRegister(); 2169 LOperand* new_map_reg = TempRegister();
2199 LTransitionElementsKind* result = 2170 LTransitionElementsKind* result =
2200 new(zone()) LTransitionElementsKind(object, NULL, new_map_reg); 2171 new(zone()) LTransitionElementsKind(object, NULL, new_map_reg);
2201 return result; 2172 return result;
2202 } else { 2173 } else {
2203 LOperand* object = UseFixed(instr->object(), r0); 2174 LOperand* object = UseFixed(instr->object(), r0);
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
2474 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2445 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2475 LOperand* object = UseRegister(instr->object()); 2446 LOperand* object = UseRegister(instr->object());
2476 LOperand* index = UseTempRegister(instr->index()); 2447 LOperand* index = UseTempRegister(instr->index());
2477 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2448 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2478 LInstruction* result = DefineSameAsFirst(load); 2449 LInstruction* result = DefineSameAsFirst(load);
2479 return AssignPointerMap(result); 2450 return AssignPointerMap(result);
2480 } 2451 }
2481 2452
2482 } // namespace internal 2453 } // namespace internal
2483 } // namespace v8 2454 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm/lithium-arm.h ('k') | src/crankshaft/arm/lithium-codegen-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698