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

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

Issue 146893002: A64: Add LGetCachedArrayIndex and LHasCachedArrayIndexAndBranch (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « src/a64/lithium-a64.h ('k') | src/a64/lithium-codegen-a64.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 void LCmpIDAndBranch::PrintDataTo(StringStream* stream) { 125 void LCmpIDAndBranch::PrintDataTo(StringStream* stream) {
126 stream->Add("if "); 126 stream->Add("if ");
127 left()->PrintTo(stream); 127 left()->PrintTo(stream);
128 stream->Add(" %s ", Token::String(op())); 128 stream->Add(" %s ", Token::String(op()));
129 right()->PrintTo(stream); 129 right()->PrintTo(stream);
130 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); 130 stream->Add(" then B%d else B%d", true_block_id(), false_block_id());
131 } 131 }
132 132
133 133
134 void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) {
135 stream->Add("if has_cached_array_index(");
136 value()->PrintTo(stream);
137 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
138 }
139
140
134 bool LGoto::HasInterestingComment(LCodeGen* gen) const { 141 bool LGoto::HasInterestingComment(LCodeGen* gen) const {
135 return !gen->IsNextEmittedBlock(block_id()); 142 return !gen->IsNextEmittedBlock(block_id());
136 } 143 }
137 144
138 145
139 void LGoto::PrintDataTo(StringStream* stream) { 146 void LGoto::PrintDataTo(StringStream* stream) {
140 stream->Add("B%d", block_id()); 147 stream->Add("B%d", block_id());
141 } 148 }
142 149
143 150
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 } 1457 }
1451 1458
1452 1459
1453 LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) { 1460 LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) {
1454 return MarkAsCall(DefineFixed(new(zone()) LFunctionLiteral, x0), instr); 1461 return MarkAsCall(DefineFixed(new(zone()) LFunctionLiteral, x0), instr);
1455 } 1462 }
1456 1463
1457 1464
1458 LInstruction* LChunkBuilder::DoGetCachedArrayIndex( 1465 LInstruction* LChunkBuilder::DoGetCachedArrayIndex(
1459 HGetCachedArrayIndex* instr) { 1466 HGetCachedArrayIndex* instr) {
1460 UNIMPLEMENTED_INSTRUCTION(); 1467 ASSERT(instr->value()->representation().IsTagged());
1468 LOperand* value = UseRegisterAtStart(instr->value());
1469 return DefineAsRegister(new(zone()) LGetCachedArrayIndex(value));
1461 } 1470 }
1462 1471
1463 1472
1464 LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) { 1473 LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) {
1465 LOperand* context = UseRegisterAtStart(instr->value()); 1474 LOperand* context = UseRegisterAtStart(instr->value());
1466 return DefineAsRegister(new(zone()) LGlobalObject(context)); 1475 return DefineAsRegister(new(zone()) LGlobalObject(context));
1467 } 1476 }
1468 1477
1469 1478
1470 LInstruction* LChunkBuilder::DoGlobalReceiver(HGlobalReceiver* instr) { 1479 LInstruction* LChunkBuilder::DoGlobalReceiver(HGlobalReceiver* instr) {
1471 LOperand* global_object = UseRegisterAtStart(instr->value()); 1480 LOperand* global_object = UseRegisterAtStart(instr->value());
1472 return DefineAsRegister(new(zone()) LGlobalReceiver(global_object)); 1481 return DefineAsRegister(new(zone()) LGlobalReceiver(global_object));
1473 } 1482 }
1474 1483
1475 1484
1476 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { 1485 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
1477 return new(zone()) LGoto(instr->FirstSuccessor()->block_id()); 1486 return new(zone()) LGoto(instr->FirstSuccessor()->block_id());
1478 } 1487 }
1479 1488
1480 1489
1481 LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch( 1490 LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch(
1482 HHasCachedArrayIndexAndBranch* instr) { 1491 HHasCachedArrayIndexAndBranch* instr) {
1483 UNIMPLEMENTED_INSTRUCTION(); 1492 ASSERT(instr->value()->representation().IsTagged());
1493 return new(zone()) LHasCachedArrayIndexAndBranch(
1494 UseRegisterAtStart(instr->value()), TempRegister());
1484 } 1495 }
1485 1496
1486 1497
1487 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( 1498 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch(
1488 HHasInstanceTypeAndBranch* instr) { 1499 HHasInstanceTypeAndBranch* instr) {
1489 ASSERT(instr->value()->representation().IsTagged()); 1500 ASSERT(instr->value()->representation().IsTagged());
1490 LOperand* value = UseRegisterAtStart(instr->value()); 1501 LOperand* value = UseRegisterAtStart(instr->value());
1491 return new(zone()) LHasInstanceTypeAndBranch(value, TempRegister()); 1502 return new(zone()) LHasInstanceTypeAndBranch(value, TempRegister());
1492 } 1503 }
1493 1504
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
2499 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { 2510 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) {
2500 LOperand* receiver = UseRegister(instr->receiver()); 2511 LOperand* receiver = UseRegister(instr->receiver());
2501 LOperand* function = UseRegisterAtStart(instr->function()); 2512 LOperand* function = UseRegisterAtStart(instr->function());
2502 LOperand* temp = TempRegister(); 2513 LOperand* temp = TempRegister();
2503 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp); 2514 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp);
2504 return AssignEnvironment(DefineAsRegister(result)); 2515 return AssignEnvironment(DefineAsRegister(result));
2505 } 2516 }
2506 2517
2507 2518
2508 } } // namespace v8::internal 2519 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/a64/lithium-a64.h ('k') | src/a64/lithium-codegen-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698