| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_INTERPRETER_BYTECODES_H_ | 5 #ifndef V8_INTERPRETER_BYTECODES_H_ |
| 6 #define V8_INTERPRETER_BYTECODES_H_ | 6 #define V8_INTERPRETER_BYTECODES_H_ |
| 7 | 7 |
| 8 #include <cstdint> | 8 #include <cstdint> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 OperandType::kIdx) \ | 176 OperandType::kIdx) \ |
| 177 V(TestGreaterThan, AccumulatorUse::kReadWrite, OperandType::kReg, \ | 177 V(TestGreaterThan, AccumulatorUse::kReadWrite, OperandType::kReg, \ |
| 178 OperandType::kIdx) \ | 178 OperandType::kIdx) \ |
| 179 V(TestLessThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \ | 179 V(TestLessThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \ |
| 180 OperandType::kIdx) \ | 180 OperandType::kIdx) \ |
| 181 V(TestGreaterThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \ | 181 V(TestGreaterThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \ |
| 182 OperandType::kIdx) \ | 182 OperandType::kIdx) \ |
| 183 V(TestInstanceOf, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 183 V(TestInstanceOf, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 184 V(TestIn, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 184 V(TestIn, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 185 \ | 185 \ |
| 186 /* TestEqual with Null or Undefined */ \ |
| 187 V(TestUndetectable, AccumulatorUse::kWrite, OperandType::kReg) \ |
| 188 \ |
| 186 /* Cast operators */ \ | 189 /* Cast operators */ \ |
| 187 V(ToName, AccumulatorUse::kRead, OperandType::kRegOut) \ | 190 V(ToName, AccumulatorUse::kRead, OperandType::kRegOut) \ |
| 188 V(ToNumber, AccumulatorUse::kRead, OperandType::kRegOut) \ | 191 V(ToNumber, AccumulatorUse::kRead, OperandType::kRegOut) \ |
| 189 V(ToObject, AccumulatorUse::kRead, OperandType::kRegOut) \ | 192 V(ToObject, AccumulatorUse::kRead, OperandType::kRegOut) \ |
| 190 \ | 193 \ |
| 191 /* Literals */ \ | 194 /* Literals */ \ |
| 192 V(CreateRegExpLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \ | 195 V(CreateRegExpLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \ |
| 193 OperandType::kIdx, OperandType::kFlag8) \ | 196 OperandType::kIdx, OperandType::kFlag8) \ |
| 194 V(CreateArrayLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \ | 197 V(CreateArrayLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \ |
| 195 OperandType::kIdx, OperandType::kFlag8) \ | 198 OperandType::kIdx, OperandType::kFlag8) \ |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 case Bytecode::kLogicalNot: | 409 case Bytecode::kLogicalNot: |
| 407 case Bytecode::kTestEqual: | 410 case Bytecode::kTestEqual: |
| 408 case Bytecode::kTestNotEqual: | 411 case Bytecode::kTestNotEqual: |
| 409 case Bytecode::kTestEqualStrict: | 412 case Bytecode::kTestEqualStrict: |
| 410 case Bytecode::kTestLessThan: | 413 case Bytecode::kTestLessThan: |
| 411 case Bytecode::kTestLessThanOrEqual: | 414 case Bytecode::kTestLessThanOrEqual: |
| 412 case Bytecode::kTestGreaterThan: | 415 case Bytecode::kTestGreaterThan: |
| 413 case Bytecode::kTestGreaterThanOrEqual: | 416 case Bytecode::kTestGreaterThanOrEqual: |
| 414 case Bytecode::kTestInstanceOf: | 417 case Bytecode::kTestInstanceOf: |
| 415 case Bytecode::kTestIn: | 418 case Bytecode::kTestIn: |
| 419 case Bytecode::kTestUndetectable: |
| 416 case Bytecode::kForInContinue: | 420 case Bytecode::kForInContinue: |
| 417 return true; | 421 return true; |
| 418 default: | 422 default: |
| 419 return false; | 423 return false; |
| 420 } | 424 } |
| 421 } | 425 } |
| 422 | 426 |
| 423 // Return true if |bytecode| is an accumulator load without effects, | 427 // Return true if |bytecode| is an accumulator load without effects, |
| 424 // e.g. LdaConstant, LdaTrue, Ldar. | 428 // e.g. LdaConstant, LdaTrue, Ldar. |
| 425 static CONSTEXPR bool IsAccumulatorLoadWithoutEffects(Bytecode bytecode) { | 429 static CONSTEXPR bool IsAccumulatorLoadWithoutEffects(Bytecode bytecode) { |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 #undef CONSTEXPR | 757 #undef CONSTEXPR |
| 754 | 758 |
| 755 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, | 759 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, |
| 756 const Bytecode& bytecode); | 760 const Bytecode& bytecode); |
| 757 | 761 |
| 758 } // namespace interpreter | 762 } // namespace interpreter |
| 759 } // namespace internal | 763 } // namespace internal |
| 760 } // namespace v8 | 764 } // namespace v8 |
| 761 | 765 |
| 762 #endif // V8_INTERPRETER_BYTECODES_H_ | 766 #endif // V8_INTERPRETER_BYTECODES_H_ |
| OLD | NEW |