| OLD | NEW |
| 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 #ifndef V8_COMPILER_INSTRUCTION_H_ | 5 #ifndef V8_COMPILER_INSTRUCTION_H_ |
| 6 #define V8_COMPILER_INSTRUCTION_H_ | 6 #define V8_COMPILER_INSTRUCTION_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 DCHECK(!reference_map_); | 849 DCHECK(!reference_map_); |
| 850 reference_map_ = map; | 850 reference_map_ = map; |
| 851 } | 851 } |
| 852 | 852 |
| 853 void OverwriteWithNop() { | 853 void OverwriteWithNop() { |
| 854 opcode_ = ArchOpcodeField::encode(kArchNop); | 854 opcode_ = ArchOpcodeField::encode(kArchNop); |
| 855 bit_field_ = 0; | 855 bit_field_ = 0; |
| 856 reference_map_ = nullptr; | 856 reference_map_ = nullptr; |
| 857 } | 857 } |
| 858 | 858 |
| 859 bool IsNop() const { | 859 bool IsNop() const { return arch_opcode() == kArchNop; } |
| 860 return arch_opcode() == kArchNop && InputCount() == 0 && | |
| 861 OutputCount() == 0 && TempCount() == 0; | |
| 862 } | |
| 863 | 860 |
| 864 bool IsDeoptimizeCall() const { | 861 bool IsDeoptimizeCall() const { |
| 865 return arch_opcode() == ArchOpcode::kArchDeoptimize || | 862 return arch_opcode() == ArchOpcode::kArchDeoptimize || |
| 866 FlagsModeField::decode(opcode()) == kFlags_deoptimize; | 863 FlagsModeField::decode(opcode()) == kFlags_deoptimize; |
| 867 } | 864 } |
| 868 | 865 |
| 869 bool IsJump() const { return arch_opcode() == ArchOpcode::kArchJmp; } | 866 bool IsJump() const { return arch_opcode() == ArchOpcode::kArchJmp; } |
| 870 bool IsRet() const { return arch_opcode() == ArchOpcode::kArchRet; } | 867 bool IsRet() const { return arch_opcode() == ArchOpcode::kArchRet; } |
| 871 bool IsTailCall() const { | 868 bool IsTailCall() const { |
| 872 return arch_opcode() == ArchOpcode::kArchTailCallCodeObject || | 869 return arch_opcode() == ArchOpcode::kArchTailCallCodeObject || |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1488 | 1485 |
| 1489 | 1486 |
| 1490 std::ostream& operator<<(std::ostream& os, | 1487 std::ostream& operator<<(std::ostream& os, |
| 1491 const PrintableInstructionSequence& code); | 1488 const PrintableInstructionSequence& code); |
| 1492 | 1489 |
| 1493 } // namespace compiler | 1490 } // namespace compiler |
| 1494 } // namespace internal | 1491 } // namespace internal |
| 1495 } // namespace v8 | 1492 } // namespace v8 |
| 1496 | 1493 |
| 1497 #endif // V8_COMPILER_INSTRUCTION_H_ | 1494 #endif // V8_COMPILER_INSTRUCTION_H_ |
| OLD | NEW |