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

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

Issue 2427673004: [intrinsics] Nuke %HasCachedArrayIndex and %GetCachedArrayIndex. (Closed)
Patch Set: Created 4 years, 2 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/arm64/lithium-arm64.h ('k') | src/crankshaft/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 "src/crankshaft/arm64/lithium-arm64.h" 5 #include "src/crankshaft/arm64/lithium-arm64.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" 9 #include "src/crankshaft/arm64/lithium-codegen-arm64.h"
10 #include "src/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 96
97 void LCompareNumericAndBranch::PrintDataTo(StringStream* stream) { 97 void LCompareNumericAndBranch::PrintDataTo(StringStream* stream) {
98 stream->Add("if "); 98 stream->Add("if ");
99 left()->PrintTo(stream); 99 left()->PrintTo(stream);
100 stream->Add(" %s ", Token::String(op())); 100 stream->Add(" %s ", Token::String(op()));
101 right()->PrintTo(stream); 101 right()->PrintTo(stream);
102 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); 102 stream->Add(" then B%d else B%d", true_block_id(), false_block_id());
103 } 103 }
104 104
105
106 void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) {
107 stream->Add("if has_cached_array_index(");
108 value()->PrintTo(stream);
109 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
110 }
111
112
113 bool LGoto::HasInterestingComment(LCodeGen* gen) const { 105 bool LGoto::HasInterestingComment(LCodeGen* gen) const {
114 return !gen->IsNextEmittedBlock(block_id()); 106 return !gen->IsNextEmittedBlock(block_id());
115 } 107 }
116 108
117 109
118 void LGoto::PrintDataTo(StringStream* stream) { 110 void LGoto::PrintDataTo(StringStream* stream) {
119 stream->Add("B%d", block_id()); 111 stream->Add("B%d", block_id());
120 } 112 }
121 113
122 114
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1421 1413
1422 1414
1423 LInstruction* LChunkBuilder::DoForceRepresentation( 1415 LInstruction* LChunkBuilder::DoForceRepresentation(
1424 HForceRepresentation* instr) { 1416 HForceRepresentation* instr) {
1425 // All HForceRepresentation instructions should be eliminated in the 1417 // All HForceRepresentation instructions should be eliminated in the
1426 // representation change phase of Hydrogen. 1418 // representation change phase of Hydrogen.
1427 UNREACHABLE(); 1419 UNREACHABLE();
1428 return NULL; 1420 return NULL;
1429 } 1421 }
1430 1422
1431
1432 LInstruction* LChunkBuilder::DoGetCachedArrayIndex(
1433 HGetCachedArrayIndex* instr) {
1434 DCHECK(instr->value()->representation().IsTagged());
1435 LOperand* value = UseRegisterAtStart(instr->value());
1436 return DefineAsRegister(new(zone()) LGetCachedArrayIndex(value));
1437 }
1438
1439
1440 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { 1423 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
1441 return new(zone()) LGoto(instr->FirstSuccessor()); 1424 return new(zone()) LGoto(instr->FirstSuccessor());
1442 } 1425 }
1443 1426
1444
1445 LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch(
1446 HHasCachedArrayIndexAndBranch* instr) {
1447 DCHECK(instr->value()->representation().IsTagged());
1448 return new(zone()) LHasCachedArrayIndexAndBranch(
1449 UseRegisterAtStart(instr->value()), TempRegister());
1450 }
1451
1452
1453 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( 1427 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch(
1454 HHasInstanceTypeAndBranch* instr) { 1428 HHasInstanceTypeAndBranch* instr) {
1455 DCHECK(instr->value()->representation().IsTagged()); 1429 DCHECK(instr->value()->representation().IsTagged());
1456 LOperand* value = UseRegisterAtStart(instr->value()); 1430 LOperand* value = UseRegisterAtStart(instr->value());
1457 return new(zone()) LHasInstanceTypeAndBranch(value, TempRegister()); 1431 return new(zone()) LHasInstanceTypeAndBranch(value, TempRegister());
1458 } 1432 }
1459 1433
1460 1434
1461 LInstruction* LChunkBuilder::DoInnerAllocatedObject( 1435 LInstruction* LChunkBuilder::DoInnerAllocatedObject(
1462 HInnerAllocatedObject* instr) { 1436 HInnerAllocatedObject* instr) {
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
2515 2489
2516 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { 2490 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) {
2517 LOperand* receiver = UseRegister(instr->receiver()); 2491 LOperand* receiver = UseRegister(instr->receiver());
2518 LOperand* function = UseRegister(instr->function()); 2492 LOperand* function = UseRegister(instr->function());
2519 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function); 2493 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function);
2520 return AssignEnvironment(DefineAsRegister(result)); 2494 return AssignEnvironment(DefineAsRegister(result));
2521 } 2495 }
2522 2496
2523 } // namespace internal 2497 } // namespace internal
2524 } // namespace v8 2498 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-arm64.h ('k') | src/crankshaft/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698