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

Side by Side Diff: src/crankshaft/arm/lithium-arm.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/arm/lithium-arm.h ('k') | src/crankshaft/arm/lithium-codegen-arm.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/arm/lithium-arm.h" 5 #include "src/crankshaft/arm/lithium-arm.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/crankshaft/arm/lithium-codegen-arm.h" 9 #include "src/crankshaft/arm/lithium-codegen-arm.h"
10 #include "src/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); 198 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
199 } 199 }
200 200
201 201
202 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { 202 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) {
203 stream->Add("if has_instance_type("); 203 stream->Add("if has_instance_type(");
204 value()->PrintTo(stream); 204 value()->PrintTo(stream);
205 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); 205 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
206 } 206 }
207 207
208
209 void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) {
210 stream->Add("if has_cached_array_index(");
211 value()->PrintTo(stream);
212 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
213 }
214
215
216 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) { 208 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
217 stream->Add("if class_of_test("); 209 stream->Add("if class_of_test(");
218 value()->PrintTo(stream); 210 value()->PrintTo(stream);
219 stream->Add(", \"%o\") then B%d else B%d", 211 stream->Add(", \"%o\") then B%d else B%d",
220 *hydrogen()->class_name(), 212 *hydrogen()->class_name(),
221 true_block_id(), 213 true_block_id(),
222 false_block_id()); 214 false_block_id());
223 } 215 }
224 216
225 217
(...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after
1718 } 1710 }
1719 1711
1720 1712
1721 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( 1713 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch(
1722 HHasInstanceTypeAndBranch* instr) { 1714 HHasInstanceTypeAndBranch* instr) {
1723 DCHECK(instr->value()->representation().IsTagged()); 1715 DCHECK(instr->value()->representation().IsTagged());
1724 LOperand* value = UseRegisterAtStart(instr->value()); 1716 LOperand* value = UseRegisterAtStart(instr->value());
1725 return new(zone()) LHasInstanceTypeAndBranch(value); 1717 return new(zone()) LHasInstanceTypeAndBranch(value);
1726 } 1718 }
1727 1719
1728
1729 LInstruction* LChunkBuilder::DoGetCachedArrayIndex(
1730 HGetCachedArrayIndex* instr) {
1731 DCHECK(instr->value()->representation().IsTagged());
1732 LOperand* value = UseRegisterAtStart(instr->value());
1733
1734 return DefineAsRegister(new(zone()) LGetCachedArrayIndex(value));
1735 }
1736
1737
1738 LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch(
1739 HHasCachedArrayIndexAndBranch* instr) {
1740 DCHECK(instr->value()->representation().IsTagged());
1741 return new(zone()) LHasCachedArrayIndexAndBranch(
1742 UseRegisterAtStart(instr->value()));
1743 }
1744
1745
1746 LInstruction* LChunkBuilder::DoClassOfTestAndBranch( 1720 LInstruction* LChunkBuilder::DoClassOfTestAndBranch(
1747 HClassOfTestAndBranch* instr) { 1721 HClassOfTestAndBranch* instr) {
1748 DCHECK(instr->value()->representation().IsTagged()); 1722 DCHECK(instr->value()->representation().IsTagged());
1749 LOperand* value = UseRegister(instr->value()); 1723 LOperand* value = UseRegister(instr->value());
1750 return new(zone()) LClassOfTestAndBranch(value, TempRegister()); 1724 return new(zone()) LClassOfTestAndBranch(value, TempRegister());
1751 } 1725 }
1752 1726
1753 1727
1754 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { 1728 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) {
1755 LOperand* string = UseRegisterAtStart(instr->string()); 1729 LOperand* string = UseRegisterAtStart(instr->string());
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
2418 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2392 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2419 LOperand* object = UseRegister(instr->object()); 2393 LOperand* object = UseRegister(instr->object());
2420 LOperand* index = UseTempRegister(instr->index()); 2394 LOperand* index = UseTempRegister(instr->index());
2421 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2395 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2422 LInstruction* result = DefineSameAsFirst(load); 2396 LInstruction* result = DefineSameAsFirst(load);
2423 return AssignPointerMap(result); 2397 return AssignPointerMap(result);
2424 } 2398 }
2425 2399
2426 } // namespace internal 2400 } // namespace internal
2427 } // namespace v8 2401 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm/lithium-arm.h ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698