| OLD | NEW |
| 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/mips64/lithium-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-mips64.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
| 10 | 10 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1671 } | 1663 } |
| 1672 | 1664 |
| 1673 | 1665 |
| 1674 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( | 1666 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( |
| 1675 HHasInstanceTypeAndBranch* instr) { | 1667 HHasInstanceTypeAndBranch* instr) { |
| 1676 DCHECK(instr->value()->representation().IsTagged()); | 1668 DCHECK(instr->value()->representation().IsTagged()); |
| 1677 LOperand* value = UseRegisterAtStart(instr->value()); | 1669 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1678 return new(zone()) LHasInstanceTypeAndBranch(value); | 1670 return new(zone()) LHasInstanceTypeAndBranch(value); |
| 1679 } | 1671 } |
| 1680 | 1672 |
| 1681 | |
| 1682 LInstruction* LChunkBuilder::DoGetCachedArrayIndex( | |
| 1683 HGetCachedArrayIndex* instr) { | |
| 1684 DCHECK(instr->value()->representation().IsTagged()); | |
| 1685 LOperand* value = UseRegisterAtStart(instr->value()); | |
| 1686 | |
| 1687 return DefineAsRegister(new(zone()) LGetCachedArrayIndex(value)); | |
| 1688 } | |
| 1689 | |
| 1690 | |
| 1691 LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch( | |
| 1692 HHasCachedArrayIndexAndBranch* instr) { | |
| 1693 DCHECK(instr->value()->representation().IsTagged()); | |
| 1694 return new(zone()) LHasCachedArrayIndexAndBranch( | |
| 1695 UseRegisterAtStart(instr->value())); | |
| 1696 } | |
| 1697 | |
| 1698 | |
| 1699 LInstruction* LChunkBuilder::DoClassOfTestAndBranch( | 1673 LInstruction* LChunkBuilder::DoClassOfTestAndBranch( |
| 1700 HClassOfTestAndBranch* instr) { | 1674 HClassOfTestAndBranch* instr) { |
| 1701 DCHECK(instr->value()->representation().IsTagged()); | 1675 DCHECK(instr->value()->representation().IsTagged()); |
| 1702 return new(zone()) LClassOfTestAndBranch(UseRegister(instr->value()), | 1676 return new(zone()) LClassOfTestAndBranch(UseRegister(instr->value()), |
| 1703 TempRegister()); | 1677 TempRegister()); |
| 1704 } | 1678 } |
| 1705 | 1679 |
| 1706 | 1680 |
| 1707 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { | 1681 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { |
| 1708 LOperand* string = UseRegisterAtStart(instr->string()); | 1682 LOperand* string = UseRegisterAtStart(instr->string()); |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2372 LOperand* index = UseTempRegister(instr->index()); | 2346 LOperand* index = UseTempRegister(instr->index()); |
| 2373 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2347 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
| 2374 LInstruction* result = DefineSameAsFirst(load); | 2348 LInstruction* result = DefineSameAsFirst(load); |
| 2375 return AssignPointerMap(result); | 2349 return AssignPointerMap(result); |
| 2376 } | 2350 } |
| 2377 | 2351 |
| 2378 } // namespace internal | 2352 } // namespace internal |
| 2379 } // namespace v8 | 2353 } // namespace v8 |
| 2380 | 2354 |
| 2381 #endif // V8_TARGET_ARCH_MIPS64 | 2355 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |