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

Side by Side Diff: src/crankshaft/ppc/lithium-ppc.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/ppc/lithium-ppc.h ('k') | src/crankshaft/s390/lithium-codegen-s390.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ppc/lithium-ppc.h" 5 #include "src/crankshaft/ppc/lithium-ppc.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/crankshaft/hydrogen-osr.h" 9 #include "src/crankshaft/hydrogen-osr.h"
10 #include "src/crankshaft/lithium-inl.h" 10 #include "src/crankshaft/lithium-inl.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); 213 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
214 } 214 }
215 215
216 216
217 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { 217 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) {
218 stream->Add("if has_instance_type("); 218 stream->Add("if has_instance_type(");
219 value()->PrintTo(stream); 219 value()->PrintTo(stream);
220 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); 220 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
221 } 221 }
222 222
223
224 void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) {
225 stream->Add("if has_cached_array_index(");
226 value()->PrintTo(stream);
227 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
228 }
229
230
231 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) { 223 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
232 stream->Add("if class_of_test("); 224 stream->Add("if class_of_test(");
233 value()->PrintTo(stream); 225 value()->PrintTo(stream);
234 stream->Add(", \"%o\") then B%d else B%d", *hydrogen()->class_name(), 226 stream->Add(", \"%o\") then B%d else B%d", *hydrogen()->class_name(),
235 true_block_id(), false_block_id()); 227 true_block_id(), false_block_id());
236 } 228 }
237 229
238 230
239 void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) { 231 void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
240 stream->Add("if typeof "); 232 stream->Add("if typeof ");
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 } 1687 }
1696 1688
1697 1689
1698 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( 1690 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch(
1699 HHasInstanceTypeAndBranch* instr) { 1691 HHasInstanceTypeAndBranch* instr) {
1700 DCHECK(instr->value()->representation().IsTagged()); 1692 DCHECK(instr->value()->representation().IsTagged());
1701 LOperand* value = UseRegisterAtStart(instr->value()); 1693 LOperand* value = UseRegisterAtStart(instr->value());
1702 return new (zone()) LHasInstanceTypeAndBranch(value); 1694 return new (zone()) LHasInstanceTypeAndBranch(value);
1703 } 1695 }
1704 1696
1705
1706 LInstruction* LChunkBuilder::DoGetCachedArrayIndex(
1707 HGetCachedArrayIndex* instr) {
1708 DCHECK(instr->value()->representation().IsTagged());
1709 LOperand* value = UseRegisterAtStart(instr->value());
1710
1711 return DefineAsRegister(new (zone()) LGetCachedArrayIndex(value));
1712 }
1713
1714
1715 LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch(
1716 HHasCachedArrayIndexAndBranch* instr) {
1717 DCHECK(instr->value()->representation().IsTagged());
1718 return new (zone())
1719 LHasCachedArrayIndexAndBranch(UseRegisterAtStart(instr->value()));
1720 }
1721
1722
1723 LInstruction* LChunkBuilder::DoClassOfTestAndBranch( 1697 LInstruction* LChunkBuilder::DoClassOfTestAndBranch(
1724 HClassOfTestAndBranch* instr) { 1698 HClassOfTestAndBranch* instr) {
1725 DCHECK(instr->value()->representation().IsTagged()); 1699 DCHECK(instr->value()->representation().IsTagged());
1726 LOperand* value = UseRegister(instr->value()); 1700 LOperand* value = UseRegister(instr->value());
1727 return new (zone()) LClassOfTestAndBranch(value, TempRegister()); 1701 return new (zone()) LClassOfTestAndBranch(value, TempRegister());
1728 } 1702 }
1729 1703
1730 1704
1731 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { 1705 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) {
1732 LOperand* string = UseRegisterAtStart(instr->string()); 1706 LOperand* string = UseRegisterAtStart(instr->string());
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
2388 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2362 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2389 LOperand* object = UseRegister(instr->object()); 2363 LOperand* object = UseRegister(instr->object());
2390 LOperand* index = UseTempRegister(instr->index()); 2364 LOperand* index = UseTempRegister(instr->index());
2391 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); 2365 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index);
2392 LInstruction* result = DefineSameAsFirst(load); 2366 LInstruction* result = DefineSameAsFirst(load);
2393 return AssignPointerMap(result); 2367 return AssignPointerMap(result);
2394 } 2368 }
2395 2369
2396 } // namespace internal 2370 } // namespace internal
2397 } // namespace v8 2371 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-ppc.h ('k') | src/crankshaft/s390/lithium-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698