| 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/x87/lithium-x87.h" | 5 #include "src/crankshaft/x87/lithium-x87.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_X87 | 9 #if V8_TARGET_ARCH_X87 |
| 10 | 10 |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 228 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
| 229 } | 229 } |
| 230 | 230 |
| 231 | 231 |
| 232 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { | 232 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { |
| 233 stream->Add("if has_instance_type("); | 233 stream->Add("if has_instance_type("); |
| 234 value()->PrintTo(stream); | 234 value()->PrintTo(stream); |
| 235 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 235 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
| 236 } | 236 } |
| 237 | 237 |
| 238 | |
| 239 void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) { | |
| 240 stream->Add("if has_cached_array_index("); | |
| 241 value()->PrintTo(stream); | |
| 242 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | |
| 243 } | |
| 244 | |
| 245 | |
| 246 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) { | 238 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) { |
| 247 stream->Add("if class_of_test("); | 239 stream->Add("if class_of_test("); |
| 248 value()->PrintTo(stream); | 240 value()->PrintTo(stream); |
| 249 stream->Add(", \"%o\") then B%d else B%d", | 241 stream->Add(", \"%o\") then B%d else B%d", |
| 250 *hydrogen()->class_name(), | 242 *hydrogen()->class_name(), |
| 251 true_block_id(), | 243 true_block_id(), |
| 252 false_block_id()); | 244 false_block_id()); |
| 253 } | 245 } |
| 254 | 246 |
| 255 | 247 |
| (...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 return new(zone()) LHasInstanceTypeAndBranch( | 1693 return new(zone()) LHasInstanceTypeAndBranch( |
| 1702 UseRegisterAtStart(instr->value()), | 1694 UseRegisterAtStart(instr->value()), |
| 1703 TempRegister()); | 1695 TempRegister()); |
| 1704 } | 1696 } |
| 1705 | 1697 |
| 1706 | |
| 1707 LInstruction* LChunkBuilder::DoGetCachedArrayIndex( | |
| 1708 HGetCachedArrayIndex* instr) { | |
| 1709 DCHECK(instr->value()->representation().IsTagged()); | |
| 1710 LOperand* value = UseRegisterAtStart(instr->value()); | |
| 1711 | |
| 1712 return DefineAsRegister(new(zone()) LGetCachedArrayIndex(value)); | |
| 1713 } | |
| 1714 | |
| 1715 | |
| 1716 LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch( | |
| 1717 HHasCachedArrayIndexAndBranch* instr) { | |
| 1718 DCHECK(instr->value()->representation().IsTagged()); | |
| 1719 return new(zone()) LHasCachedArrayIndexAndBranch( | |
| 1720 UseRegisterAtStart(instr->value())); | |
| 1721 } | |
| 1722 | |
| 1723 | |
| 1724 LInstruction* LChunkBuilder::DoClassOfTestAndBranch( | 1698 LInstruction* LChunkBuilder::DoClassOfTestAndBranch( |
| 1725 HClassOfTestAndBranch* instr) { | 1699 HClassOfTestAndBranch* instr) { |
| 1726 DCHECK(instr->value()->representation().IsTagged()); | 1700 DCHECK(instr->value()->representation().IsTagged()); |
| 1727 return new(zone()) LClassOfTestAndBranch(UseRegister(instr->value()), | 1701 return new(zone()) LClassOfTestAndBranch(UseRegister(instr->value()), |
| 1728 TempRegister(), | 1702 TempRegister(), |
| 1729 TempRegister()); | 1703 TempRegister()); |
| 1730 } | 1704 } |
| 1731 | 1705 |
| 1732 | 1706 |
| 1733 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { | 1707 LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) { |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2490 LOperand* index = UseTempRegister(instr->index()); | 2464 LOperand* index = UseTempRegister(instr->index()); |
| 2491 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2465 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
| 2492 LInstruction* result = DefineSameAsFirst(load); | 2466 LInstruction* result = DefineSameAsFirst(load); |
| 2493 return AssignPointerMap(result); | 2467 return AssignPointerMap(result); |
| 2494 } | 2468 } |
| 2495 | 2469 |
| 2496 } // namespace internal | 2470 } // namespace internal |
| 2497 } // namespace v8 | 2471 } // namespace v8 |
| 2498 | 2472 |
| 2499 #endif // V8_TARGET_ARCH_X87 | 2473 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |