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

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

Issue 1228113008: Crankshaft part of the 'loads and stores to global vars through property cell shortcuts' feature. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments + regression test Created 5 years, 5 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/arm64/lithium-arm64.h ('k') | src/arm64/lithium-codegen-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #include "src/arm64/lithium-codegen-arm64.h" 9 #include "src/arm64/lithium-codegen-arm64.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { 290 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
291 object()->PrintTo(stream); 291 object()->PrintTo(stream);
292 stream->Add("["); 292 stream->Add("[");
293 key()->PrintTo(stream); 293 key()->PrintTo(stream);
294 stream->Add("] <- "); 294 stream->Add("] <- ");
295 value()->PrintTo(stream); 295 value()->PrintTo(stream);
296 } 296 }
297 297
298 298
299 void LLoadGlobalViaContext::PrintDataTo(StringStream* stream) {
300 stream->Add(String::cast(*name())->ToCString().get());
301 stream->Add(" depth:%d slot:%d", depth(), slot_index());
302 }
303
304
299 void LStoreNamedField::PrintDataTo(StringStream* stream) { 305 void LStoreNamedField::PrintDataTo(StringStream* stream) {
300 object()->PrintTo(stream); 306 object()->PrintTo(stream);
301 std::ostringstream os; 307 std::ostringstream os;
302 os << hydrogen()->access(); 308 os << hydrogen()->access();
303 stream->Add(os.str().c_str()); 309 stream->Add(os.str().c_str());
304 stream->Add(" <- "); 310 stream->Add(" <- ");
305 value()->PrintTo(stream); 311 value()->PrintTo(stream);
306 } 312 }
307 313
308 314
309 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) { 315 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) {
310 object()->PrintTo(stream); 316 object()->PrintTo(stream);
311 stream->Add("."); 317 stream->Add(".");
312 stream->Add(String::cast(*name())->ToCString().get()); 318 stream->Add(String::cast(*name())->ToCString().get());
313 stream->Add(" <- "); 319 stream->Add(" <- ");
314 value()->PrintTo(stream); 320 value()->PrintTo(stream);
315 } 321 }
316 322
317 323
324 void LStoreGlobalViaContext::PrintDataTo(StringStream* stream) {
325 stream->Add(String::cast(*name())->ToCString().get());
326 stream->Add(" <- ");
327 value()->PrintTo(stream);
328 stream->Add(" depth:%d slot:%d", depth(), slot_index());
329 }
330
331
318 void LStringCompareAndBranch::PrintDataTo(StringStream* stream) { 332 void LStringCompareAndBranch::PrintDataTo(StringStream* stream) {
319 stream->Add("if string_compare("); 333 stream->Add("if string_compare(");
320 left()->PrintTo(stream); 334 left()->PrintTo(stream);
321 right()->PrintTo(stream); 335 right()->PrintTo(stream);
322 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); 336 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
323 } 337 }
324 338
325 339
326 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { 340 void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
327 object()->PrintTo(stream); 341 object()->PrintTo(stream);
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 if (instr->HasVectorAndSlot()) { 1710 if (instr->HasVectorAndSlot()) {
1697 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); 1711 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister());
1698 } 1712 }
1699 1713
1700 LLoadGlobalGeneric* result = 1714 LLoadGlobalGeneric* result =
1701 new(zone()) LLoadGlobalGeneric(context, global_object, vector); 1715 new(zone()) LLoadGlobalGeneric(context, global_object, vector);
1702 return MarkAsCall(DefineFixed(result, x0), instr); 1716 return MarkAsCall(DefineFixed(result, x0), instr);
1703 } 1717 }
1704 1718
1705 1719
1720 LInstruction* LChunkBuilder::DoLoadGlobalViaContext(
1721 HLoadGlobalViaContext* instr) {
1722 LOperand* context = UseFixed(instr->context(), cp);
1723 DCHECK(instr->slot_index() > 0);
1724 LLoadGlobalViaContext* result = new (zone()) LLoadGlobalViaContext(context);
1725 return MarkAsCall(DefineFixed(result, x0), instr);
1726 }
1727
1728
1706 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { 1729 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
1707 DCHECK(instr->key()->representation().IsSmiOrInteger32()); 1730 DCHECK(instr->key()->representation().IsSmiOrInteger32());
1708 ElementsKind elements_kind = instr->elements_kind(); 1731 ElementsKind elements_kind = instr->elements_kind();
1709 LOperand* elements = UseRegister(instr->elements()); 1732 LOperand* elements = UseRegister(instr->elements());
1710 LOperand* key = UseRegisterOrConstant(instr->key()); 1733 LOperand* key = UseRegisterOrConstant(instr->key());
1711 1734
1712 if (!instr->is_typed_elements()) { 1735 if (!instr->is_typed_elements()) {
1713 if (instr->representation().IsDouble()) { 1736 if (instr->representation().IsDouble()) {
1714 LOperand* temp = (!instr->key()->IsConstant() || 1737 LOperand* temp = (!instr->key()->IsConstant() ||
1715 instr->RequiresHoleCheck()) 1738 instr->RequiresHoleCheck())
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
2450 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); 2473 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister());
2451 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); 2474 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister());
2452 } 2475 }
2453 2476
2454 LStoreNamedGeneric* result = 2477 LStoreNamedGeneric* result =
2455 new (zone()) LStoreNamedGeneric(context, object, value, slot, vector); 2478 new (zone()) LStoreNamedGeneric(context, object, value, slot, vector);
2456 return MarkAsCall(result, instr); 2479 return MarkAsCall(result, instr);
2457 } 2480 }
2458 2481
2459 2482
2483 LInstruction* LChunkBuilder::DoStoreGlobalViaContext(
2484 HStoreGlobalViaContext* instr) {
2485 LOperand* context = UseFixed(instr->context(), cp);
2486 LOperand* value = UseFixed(instr->value(),
2487 StoreGlobalViaContextDescriptor::ValueRegister());
2488 DCHECK(instr->slot_index() > 0);
2489
2490 LStoreGlobalViaContext* result =
2491 new (zone()) LStoreGlobalViaContext(context, value);
2492 return MarkAsCall(result, instr);
2493 }
2494
2495
2460 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { 2496 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
2461 LOperand* context = UseFixed(instr->context(), cp); 2497 LOperand* context = UseFixed(instr->context(), cp);
2462 LOperand* left = UseFixed(instr->left(), x1); 2498 LOperand* left = UseFixed(instr->left(), x1);
2463 LOperand* right = UseFixed(instr->right(), x0); 2499 LOperand* right = UseFixed(instr->right(), x0);
2464 2500
2465 LStringAdd* result = new(zone()) LStringAdd(context, left, right); 2501 LStringAdd* result = new(zone()) LStringAdd(context, left, right);
2466 return MarkAsCall(DefineFixed(result, x0), instr); 2502 return MarkAsCall(DefineFixed(result, x0), instr);
2467 } 2503 }
2468 2504
2469 2505
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
2783 LOperand* context = UseFixed(instr->context(), cp); 2819 LOperand* context = UseFixed(instr->context(), cp);
2784 LOperand* function = UseRegisterAtStart(instr->function()); 2820 LOperand* function = UseRegisterAtStart(instr->function());
2785 LAllocateBlockContext* result = 2821 LAllocateBlockContext* result =
2786 new(zone()) LAllocateBlockContext(context, function); 2822 new(zone()) LAllocateBlockContext(context, function);
2787 return MarkAsCall(DefineFixed(result, cp), instr); 2823 return MarkAsCall(DefineFixed(result, cp), instr);
2788 } 2824 }
2789 2825
2790 2826
2791 } // namespace internal 2827 } // namespace internal
2792 } // namespace v8 2828 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm64/lithium-arm64.h ('k') | src/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698