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

Side by Side Diff: src/crankshaft/mips/lithium-mips.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/mips/lithium-mips.h ('k') | src/crankshaft/mips64/lithium-codegen-mips64.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/mips/lithium-mips.h" 5 #include "src/crankshaft/mips/lithium-mips.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 208
209 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { 209 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) {
210 stream->Add("if has_instance_type("); 210 stream->Add("if has_instance_type(");
211 value()->PrintTo(stream); 211 value()->PrintTo(stream);
212 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); 212 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
213 } 213 }
214 214
215
216 void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) {
217 stream->Add("if has_cached_array_index(");
218 value()->PrintTo(stream);
219 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
220 }
221
222
223 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) { 215 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
224 stream->Add("if class_of_test("); 216 stream->Add("if class_of_test(");
225 value()->PrintTo(stream); 217 value()->PrintTo(stream);
226 stream->Add(", \"%o\") then B%d else B%d", 218 stream->Add(", \"%o\") then B%d else B%d",
227 *hydrogen()->class_name(), 219 *hydrogen()->class_name(),
228 true_block_id(), 220 true_block_id(),
229 false_block_id()); 221 false_block_id());
230 } 222 }
231 223
232 224
(...skipping 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 } 1657 }
1666 1658
1667 1659
1668 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( 1660 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch(
1669 HHasInstanceTypeAndBranch* instr) { 1661 HHasInstanceTypeAndBranch* instr) {
1670 DCHECK(instr->value()->representation().IsTagged()); 1662 DCHECK(instr->value()->representation().IsTagged());
1671 LOperand* value = UseRegisterAtStart(instr->value()); 1663 LOperand* value = UseRegisterAtStart(instr->value());
1672 return new(zone()) LHasInstanceTypeAndBranch(value); 1664 return new(zone()) LHasInstanceTypeAndBranch(value);
1673 } 1665 }
1674 1666
1675
1676 LInstruction* LChunkBuilder::DoGetCachedArrayIndex(
1677 HGetCachedArrayIndex* instr) {
1678 DCHECK(instr->value()->representation().IsTagged());
1679 LOperand* value = UseRegisterAtStart(instr->value());
1680
1681 return DefineAsRegister(new(zone()) LGetCachedArrayIndex(value));
1682 }
1683
1684
1685 LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch(
1686 HHasCachedArrayIndexAndBranch* instr) {
1687 DCHECK(instr->value()->representation().IsTagged());
1688 return new(zone()) LHasCachedArrayIndexAndBranch(
1689 UseRegisterAtStart(instr->value()));
1690 }
1691
1692
1693 LInstruction* LChunkBuilder::DoClassOfTestAndBranch( 1667 LInstruction* LChunkBuilder::DoClassOfTestAndBranch(
1694 HClassOfTestAndBranch* instr) { 1668 HClassOfTestAndBranch* instr) {
1695 DCHECK(instr->value()->representation().IsTagged()); 1669 DCHECK(instr->value()->representation().IsTagged());
1696 return new(zone()) LClassOfTestAndBranch(UseRegister(instr->value()), 1670 return new(zone()) LClassOfTestAndBranch(UseRegister(instr->value()),
1697 TempRegister()); 1671 TempRegister());
1698 } 1672 }
1699 1673
1700 1674
1701 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { 1675 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) {
1702 LOperand* string = UseRegisterAtStart(instr->string()); 1676 LOperand* string = UseRegisterAtStart(instr->string());
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
2367 LOperand* index = UseTempRegister(instr->index()); 2341 LOperand* index = UseTempRegister(instr->index());
2368 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2342 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2369 LInstruction* result = DefineSameAsFirst(load); 2343 LInstruction* result = DefineSameAsFirst(load);
2370 return AssignPointerMap(result); 2344 return AssignPointerMap(result);
2371 } 2345 }
2372 2346
2373 } // namespace internal 2347 } // namespace internal
2374 } // namespace v8 2348 } // namespace v8
2375 2349
2376 #endif // V8_TARGET_ARCH_MIPS 2350 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-mips.h ('k') | src/crankshaft/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698