| 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 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 #define REGISTER_OUTPUT_OPERAND_TYPE_LIST(V) \ | 27 #define REGISTER_OUTPUT_OPERAND_TYPE_LIST(V) \ |
| 28 V(RegOut, OperandTypeInfo::kScalableSignedByte) \ | 28 V(RegOut, OperandTypeInfo::kScalableSignedByte) \ |
| 29 V(RegOutPair, OperandTypeInfo::kScalableSignedByte) \ | 29 V(RegOutPair, OperandTypeInfo::kScalableSignedByte) \ |
| 30 V(RegOutTriple, OperandTypeInfo::kScalableSignedByte) | 30 V(RegOutTriple, OperandTypeInfo::kScalableSignedByte) |
| 31 | 31 |
| 32 #define SCALAR_OPERAND_TYPE_LIST(V) \ | 32 #define SCALAR_OPERAND_TYPE_LIST(V) \ |
| 33 V(Flag8, OperandTypeInfo::kFixedUnsignedByte) \ | 33 V(Flag8, OperandTypeInfo::kFixedUnsignedByte) \ |
| 34 V(IntrinsicId, OperandTypeInfo::kFixedUnsignedByte) \ | 34 V(IntrinsicId, OperandTypeInfo::kFixedUnsignedByte) \ |
| 35 V(Idx, OperandTypeInfo::kScalableUnsignedByte) \ | 35 V(Idx, OperandTypeInfo::kScalableUnsignedByte) \ |
| 36 V(UImm, OperandTypeInfo::kScalableUnsignedByte) \ |
| 36 V(Imm, OperandTypeInfo::kScalableSignedByte) \ | 37 V(Imm, OperandTypeInfo::kScalableSignedByte) \ |
| 37 V(RegCount, OperandTypeInfo::kScalableUnsignedByte) \ | 38 V(RegCount, OperandTypeInfo::kScalableUnsignedByte) \ |
| 38 V(RuntimeId, OperandTypeInfo::kFixedUnsignedShort) | 39 V(RuntimeId, OperandTypeInfo::kFixedUnsignedShort) |
| 39 | 40 |
| 40 #define REGISTER_OPERAND_TYPE_LIST(V) \ | 41 #define REGISTER_OPERAND_TYPE_LIST(V) \ |
| 41 REGISTER_INPUT_OPERAND_TYPE_LIST(V) \ | 42 REGISTER_INPUT_OPERAND_TYPE_LIST(V) \ |
| 42 REGISTER_OUTPUT_OPERAND_TYPE_LIST(V) | 43 REGISTER_OUTPUT_OPERAND_TYPE_LIST(V) |
| 43 | 44 |
| 44 #define NON_REGISTER_OPERAND_TYPE_LIST(V) \ | 45 #define NON_REGISTER_OPERAND_TYPE_LIST(V) \ |
| 45 INVALID_OPERAND_TYPE_LIST(V) \ | 46 INVALID_OPERAND_TYPE_LIST(V) \ |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 V(LdaGlobalInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx) \ | 100 V(LdaGlobalInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx) \ |
| 100 V(StaGlobalSloppy, AccumulatorUse::kRead, OperandType::kIdx, \ | 101 V(StaGlobalSloppy, AccumulatorUse::kRead, OperandType::kIdx, \ |
| 101 OperandType::kIdx) \ | 102 OperandType::kIdx) \ |
| 102 V(StaGlobalStrict, AccumulatorUse::kRead, OperandType::kIdx, \ | 103 V(StaGlobalStrict, AccumulatorUse::kRead, OperandType::kIdx, \ |
| 103 OperandType::kIdx) \ | 104 OperandType::kIdx) \ |
| 104 \ | 105 \ |
| 105 /* Context operations */ \ | 106 /* Context operations */ \ |
| 106 V(PushContext, AccumulatorUse::kRead, OperandType::kRegOut) \ | 107 V(PushContext, AccumulatorUse::kRead, OperandType::kRegOut) \ |
| 107 V(PopContext, AccumulatorUse::kNone, OperandType::kReg) \ | 108 V(PopContext, AccumulatorUse::kNone, OperandType::kReg) \ |
| 108 V(LdaContextSlot, AccumulatorUse::kWrite, OperandType::kReg, \ | 109 V(LdaContextSlot, AccumulatorUse::kWrite, OperandType::kReg, \ |
| 109 OperandType::kIdx, OperandType::kIdx) \ | 110 OperandType::kIdx, OperandType::kUImm) \ |
| 110 V(LdrContextSlot, AccumulatorUse::kNone, OperandType::kReg, \ | 111 V(LdrContextSlot, AccumulatorUse::kNone, OperandType::kReg, \ |
| 111 OperandType::kIdx, OperandType::kIdx, OperandType::kRegOut) \ | 112 OperandType::kIdx, OperandType::kUImm, OperandType::kRegOut) \ |
| 112 V(StaContextSlot, AccumulatorUse::kRead, OperandType::kReg, \ | 113 V(StaContextSlot, AccumulatorUse::kRead, OperandType::kReg, \ |
| 113 OperandType::kIdx, OperandType::kIdx) \ | 114 OperandType::kIdx, OperandType::kUImm) \ |
| 114 \ | 115 \ |
| 115 /* Load-Store lookup slots */ \ | 116 /* Load-Store lookup slots */ \ |
| 116 V(LdaLookupSlot, AccumulatorUse::kWrite, OperandType::kIdx) \ | 117 V(LdaLookupSlot, AccumulatorUse::kWrite, OperandType::kIdx) \ |
| 117 V(LdaLookupSlotInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx) \ | 118 V(LdaLookupSlotInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx) \ |
| 118 V(StaLookupSlotSloppy, AccumulatorUse::kReadWrite, OperandType::kIdx) \ | 119 V(StaLookupSlotSloppy, AccumulatorUse::kReadWrite, OperandType::kIdx) \ |
| 119 V(StaLookupSlotStrict, AccumulatorUse::kReadWrite, OperandType::kIdx) \ | 120 V(StaLookupSlotStrict, AccumulatorUse::kReadWrite, OperandType::kIdx) \ |
| 120 \ | 121 \ |
| 121 /* Register-accumulator transfers */ \ | 122 /* Register-accumulator transfers */ \ |
| 122 V(Ldar, AccumulatorUse::kWrite, OperandType::kReg) \ | 123 V(Ldar, AccumulatorUse::kWrite, OperandType::kReg) \ |
| 123 V(Star, AccumulatorUse::kRead, OperandType::kRegOut) \ | 124 V(Star, AccumulatorUse::kRead, OperandType::kRegOut) \ |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 OperandType::kIdx, OperandType::kFlag8, OperandType::kRegOut) \ | 240 OperandType::kIdx, OperandType::kFlag8, OperandType::kRegOut) \ |
| 240 \ | 241 \ |
| 241 /* Closure allocation */ \ | 242 /* Closure allocation */ \ |
| 242 V(CreateClosure, AccumulatorUse::kWrite, OperandType::kIdx, \ | 243 V(CreateClosure, AccumulatorUse::kWrite, OperandType::kIdx, \ |
| 243 OperandType::kFlag8) \ | 244 OperandType::kFlag8) \ |
| 244 \ | 245 \ |
| 245 /* Context allocation */ \ | 246 /* Context allocation */ \ |
| 246 V(CreateBlockContext, AccumulatorUse::kReadWrite, OperandType::kIdx) \ | 247 V(CreateBlockContext, AccumulatorUse::kReadWrite, OperandType::kIdx) \ |
| 247 V(CreateCatchContext, AccumulatorUse::kReadWrite, OperandType::kReg, \ | 248 V(CreateCatchContext, AccumulatorUse::kReadWrite, OperandType::kReg, \ |
| 248 OperandType::kIdx, OperandType::kIdx) \ | 249 OperandType::kIdx, OperandType::kIdx) \ |
| 249 /* TODO(klaasb) rename Idx or add unsigned Imm OperandType? */ \ | 250 V(CreateFunctionContext, AccumulatorUse::kWrite, OperandType::kUImm) \ |
| 250 V(CreateFunctionContext, AccumulatorUse::kWrite, OperandType::kIdx) \ | |
| 251 V(CreateWithContext, AccumulatorUse::kReadWrite, OperandType::kReg, \ | 251 V(CreateWithContext, AccumulatorUse::kReadWrite, OperandType::kReg, \ |
| 252 OperandType::kIdx) \ | 252 OperandType::kIdx) \ |
| 253 \ | 253 \ |
| 254 /* Arguments allocation */ \ | 254 /* Arguments allocation */ \ |
| 255 V(CreateMappedArguments, AccumulatorUse::kWrite) \ | 255 V(CreateMappedArguments, AccumulatorUse::kWrite) \ |
| 256 V(CreateUnmappedArguments, AccumulatorUse::kWrite) \ | 256 V(CreateUnmappedArguments, AccumulatorUse::kWrite) \ |
| 257 V(CreateRestParameter, AccumulatorUse::kWrite) \ | 257 V(CreateRestParameter, AccumulatorUse::kWrite) \ |
| 258 \ | 258 \ |
| 259 /* Control Flow */ \ | 259 /* Control Flow */ \ |
| 260 V(Jump, AccumulatorUse::kNone, OperandType::kImm) \ | 260 V(Jump, AccumulatorUse::kNone, OperandType::kImm) \ |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 std::ostream& operator<<(std::ostream& os, const AccumulatorUse& use); | 596 std::ostream& operator<<(std::ostream& os, const AccumulatorUse& use); |
| 597 std::ostream& operator<<(std::ostream& os, const OperandScale& operand_scale); | 597 std::ostream& operator<<(std::ostream& os, const OperandScale& operand_scale); |
| 598 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_size); | 598 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_size); |
| 599 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); | 599 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); |
| 600 | 600 |
| 601 } // namespace interpreter | 601 } // namespace interpreter |
| 602 } // namespace internal | 602 } // namespace internal |
| 603 } // namespace v8 | 603 } // namespace v8 |
| 604 | 604 |
| 605 #endif // V8_INTERPRETER_BYTECODES_H_ | 605 #endif // V8_INTERPRETER_BYTECODES_H_ |
| OLD | NEW |