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

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

Issue 2358533002: [crankshaft] Remove HStoreNamedGeneric and use HCallWithDescriptor instead to call StoreIC. (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/x64/lithium-x64.h ('k') | src/crankshaft/x87/lithium-codegen-x87.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 "src/crankshaft/x64/lithium-x64.h" 5 #include "src/crankshaft/x64/lithium-x64.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_X64 9 #if V8_TARGET_ARCH_X64
10 10
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 341
342 void LStoreNamedField::PrintDataTo(StringStream* stream) { 342 void LStoreNamedField::PrintDataTo(StringStream* stream) {
343 object()->PrintTo(stream); 343 object()->PrintTo(stream);
344 std::ostringstream os; 344 std::ostringstream os;
345 os << hydrogen()->access() << " <- "; 345 os << hydrogen()->access() << " <- ";
346 stream->Add(os.str().c_str()); 346 stream->Add(os.str().c_str());
347 value()->PrintTo(stream); 347 value()->PrintTo(stream);
348 } 348 }
349 349
350 350
351 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) {
352 object()->PrintTo(stream);
353 stream->Add(".");
354 stream->Add(String::cast(*name())->ToCString().get());
355 stream->Add(" <- ");
356 value()->PrintTo(stream);
357 }
358
359
360 void LLoadKeyed::PrintDataTo(StringStream* stream) { 351 void LLoadKeyed::PrintDataTo(StringStream* stream) {
361 elements()->PrintTo(stream); 352 elements()->PrintTo(stream);
362 stream->Add("["); 353 stream->Add("[");
363 key()->PrintTo(stream); 354 key()->PrintTo(stream);
364 if (hydrogen()->IsDehoisted()) { 355 if (hydrogen()->IsDehoisted()) {
365 stream->Add(" + %d]", base_offset()); 356 stream->Add(" + %d]", base_offset());
366 } else { 357 } else {
367 stream->Add("]"); 358 stream->Add("]");
368 } 359 }
369 } 360 }
(...skipping 1960 matching lines...) Expand 10 before | Expand all | Expand 10 after
2330 2321
2331 // We only need a scratch register if we have a write barrier or we 2322 // We only need a scratch register if we have a write barrier or we
2332 // have a store into the properties array (not in-object-property). 2323 // have a store into the properties array (not in-object-property).
2333 LOperand* temp = (!is_in_object || needs_write_barrier || 2324 LOperand* temp = (!is_in_object || needs_write_barrier ||
2334 needs_write_barrier_for_map) ? TempRegister() : NULL; 2325 needs_write_barrier_for_map) ? TempRegister() : NULL;
2335 2326
2336 return new(zone()) LStoreNamedField(obj, val, temp); 2327 return new(zone()) LStoreNamedField(obj, val, temp);
2337 } 2328 }
2338 2329
2339 2330
2340 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
2341 LOperand* context = UseFixed(instr->context(), rsi);
2342 LOperand* object =
2343 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister());
2344 LOperand* value = UseFixed(instr->value(), StoreDescriptor::ValueRegister());
2345 LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister());
2346 LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister());
2347
2348 LStoreNamedGeneric* result =
2349 new (zone()) LStoreNamedGeneric(context, object, value, slot, vector);
2350 return MarkAsCall(result, instr);
2351 }
2352
2353
2354 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { 2331 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
2355 LOperand* context = UseFixed(instr->context(), rsi); 2332 LOperand* context = UseFixed(instr->context(), rsi);
2356 LOperand* left = UseFixed(instr->left(), rdx); 2333 LOperand* left = UseFixed(instr->left(), rdx);
2357 LOperand* right = UseFixed(instr->right(), rax); 2334 LOperand* right = UseFixed(instr->right(), rax);
2358 return MarkAsCall( 2335 return MarkAsCall(
2359 DefineFixed(new(zone()) LStringAdd(context, left, right), rax), instr); 2336 DefineFixed(new(zone()) LStringAdd(context, left, right), rax), instr);
2360 } 2337 }
2361 2338
2362 2339
2363 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) { 2340 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) {
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
2569 LOperand* index = UseTempRegister(instr->index()); 2546 LOperand* index = UseTempRegister(instr->index());
2570 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2547 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2571 LInstruction* result = DefineSameAsFirst(load); 2548 LInstruction* result = DefineSameAsFirst(load);
2572 return AssignPointerMap(result); 2549 return AssignPointerMap(result);
2573 } 2550 }
2574 2551
2575 } // namespace internal 2552 } // namespace internal
2576 } // namespace v8 2553 } // namespace v8
2577 2554
2578 #endif // V8_TARGET_ARCH_X64 2555 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-x64.h ('k') | src/crankshaft/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698