| 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 <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 // Clients of this interface shouldn't depend on lots of interpreter internals. | 10 // Clients of this interface shouldn't depend on lots of interpreter internals. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 // Define one debug break for each widening prefix. | 67 // Define one debug break for each widening prefix. |
| 68 #define DEBUG_BREAK_PREFIX_BYTECODE_LIST(V) \ | 68 #define DEBUG_BREAK_PREFIX_BYTECODE_LIST(V) \ |
| 69 V(DebugBreakWide, AccumulatorUse::kRead) \ | 69 V(DebugBreakWide, AccumulatorUse::kRead) \ |
| 70 V(DebugBreakExtraWide, AccumulatorUse::kRead) | 70 V(DebugBreakExtraWide, AccumulatorUse::kRead) |
| 71 | 71 |
| 72 #define DEBUG_BREAK_BYTECODE_LIST(V) \ | 72 #define DEBUG_BREAK_BYTECODE_LIST(V) \ |
| 73 DEBUG_BREAK_PLAIN_BYTECODE_LIST(V) \ | 73 DEBUG_BREAK_PLAIN_BYTECODE_LIST(V) \ |
| 74 DEBUG_BREAK_PREFIX_BYTECODE_LIST(V) | 74 DEBUG_BREAK_PREFIX_BYTECODE_LIST(V) |
| 75 | 75 |
| 76 // The list of bytecodes which are interpreted by the interpreter. | 76 // The list of bytecodes which are interpreted by the interpreter. |
| 77 #define BYTECODE_LIST(V) \ | 77 #define BYTECODE_LIST(V) \ |
| 78 /* Extended width operands */ \ | 78 /* Extended width operands */ \ |
| 79 V(Wide, AccumulatorUse::kNone) \ | 79 V(Wide, AccumulatorUse::kNone) \ |
| 80 V(ExtraWide, AccumulatorUse::kNone) \ | 80 V(ExtraWide, AccumulatorUse::kNone) \ |
| 81 \ | 81 \ |
| 82 /* Loading the accumulator */ \ | 82 /* Loading the accumulator */ \ |
| 83 V(LdaZero, AccumulatorUse::kWrite) \ | 83 V(LdaZero, AccumulatorUse::kWrite) \ |
| 84 V(LdaSmi, AccumulatorUse::kWrite, OperandType::kImm) \ | 84 V(LdaSmi, AccumulatorUse::kWrite, OperandType::kImm) \ |
| 85 V(LdaUndefined, AccumulatorUse::kWrite) \ | 85 V(LdaUndefined, AccumulatorUse::kWrite) \ |
| 86 V(LdaNull, AccumulatorUse::kWrite) \ | 86 V(LdaNull, AccumulatorUse::kWrite) \ |
| 87 V(LdaTheHole, AccumulatorUse::kWrite) \ | 87 V(LdaTheHole, AccumulatorUse::kWrite) \ |
| 88 V(LdaTrue, AccumulatorUse::kWrite) \ | 88 V(LdaTrue, AccumulatorUse::kWrite) \ |
| 89 V(LdaFalse, AccumulatorUse::kWrite) \ | 89 V(LdaFalse, AccumulatorUse::kWrite) \ |
| 90 V(LdaConstant, AccumulatorUse::kWrite, OperandType::kIdx) \ | 90 V(LdaConstant, AccumulatorUse::kWrite, OperandType::kIdx) \ |
| 91 \ | 91 \ |
| 92 /* Loading registers */ \ | 92 /* Loading registers */ \ |
| 93 V(LdrUndefined, AccumulatorUse::kNone, OperandType::kRegOut) \ | 93 V(LdrUndefined, AccumulatorUse::kNone, OperandType::kRegOut) \ |
| 94 \ | 94 \ |
| 95 /* Globals */ \ | 95 /* Globals */ \ |
| 96 V(LdaGlobal, AccumulatorUse::kWrite, OperandType::kIdx, OperandType::kIdx) \ | 96 V(LdaGlobal, AccumulatorUse::kWrite, OperandType::kIdx) \ |
| 97 V(LdrGlobal, AccumulatorUse::kNone, OperandType::kIdx, OperandType::kIdx, \ | 97 V(LdrGlobal, AccumulatorUse::kNone, OperandType::kIdx, OperandType::kRegOut) \ |
| 98 OperandType::kRegOut) \ | 98 V(LdaGlobalInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx) \ |
| 99 V(LdaGlobalInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx, \ | 99 V(StaGlobalSloppy, AccumulatorUse::kRead, OperandType::kIdx, \ |
| 100 OperandType::kIdx) \ | 100 OperandType::kIdx) \ |
| 101 V(StaGlobalSloppy, AccumulatorUse::kRead, OperandType::kIdx, \ | 101 V(StaGlobalStrict, AccumulatorUse::kRead, OperandType::kIdx, \ |
| 102 OperandType::kIdx) \ | 102 OperandType::kIdx) \ |
| 103 V(StaGlobalStrict, AccumulatorUse::kRead, OperandType::kIdx, \ | 103 \ |
| 104 OperandType::kIdx) \ | 104 /* Context operations */ \ |
| 105 \ | 105 V(PushContext, AccumulatorUse::kRead, OperandType::kRegOut) \ |
| 106 /* Context operations */ \ | 106 V(PopContext, AccumulatorUse::kNone, OperandType::kReg) \ |
| 107 V(PushContext, AccumulatorUse::kRead, OperandType::kRegOut) \ | 107 V(LdaContextSlot, AccumulatorUse::kWrite, OperandType::kReg, \ |
| 108 V(PopContext, AccumulatorUse::kNone, OperandType::kReg) \ | 108 OperandType::kIdx) \ |
| 109 V(LdaContextSlot, AccumulatorUse::kWrite, OperandType::kReg, \ | 109 V(LdrContextSlot, AccumulatorUse::kNone, OperandType::kReg, \ |
| 110 OperandType::kIdx) \ | 110 OperandType::kIdx, OperandType::kRegOut) \ |
| 111 V(LdrContextSlot, AccumulatorUse::kNone, OperandType::kReg, \ | 111 V(StaContextSlot, AccumulatorUse::kRead, OperandType::kReg, \ |
| 112 OperandType::kIdx, OperandType::kRegOut) \ | 112 OperandType::kIdx) \ |
| 113 V(StaContextSlot, AccumulatorUse::kRead, OperandType::kReg, \ | 113 \ |
| 114 OperandType::kIdx) \ | 114 /* Load-Store lookup slots */ \ |
| 115 \ | 115 V(LdaLookupSlot, AccumulatorUse::kWrite, OperandType::kIdx) \ |
| 116 /* Load-Store lookup slots */ \ | 116 V(LdaLookupSlotInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx) \ |
| 117 V(LdaLookupSlot, AccumulatorUse::kWrite, OperandType::kIdx) \ | 117 V(StaLookupSlotSloppy, AccumulatorUse::kReadWrite, OperandType::kIdx) \ |
| 118 V(LdaLookupSlotInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx) \ | 118 V(StaLookupSlotStrict, AccumulatorUse::kReadWrite, OperandType::kIdx) \ |
| 119 V(StaLookupSlotSloppy, AccumulatorUse::kReadWrite, OperandType::kIdx) \ | 119 \ |
| 120 V(StaLookupSlotStrict, AccumulatorUse::kReadWrite, OperandType::kIdx) \ | 120 /* Register-accumulator transfers */ \ |
| 121 \ | 121 V(Ldar, AccumulatorUse::kWrite, OperandType::kReg) \ |
| 122 /* Register-accumulator transfers */ \ | 122 V(Star, AccumulatorUse::kRead, OperandType::kRegOut) \ |
| 123 V(Ldar, AccumulatorUse::kWrite, OperandType::kReg) \ | 123 \ |
| 124 V(Star, AccumulatorUse::kRead, OperandType::kRegOut) \ | 124 /* Register-register transfers */ \ |
| 125 \ | 125 V(Mov, AccumulatorUse::kNone, OperandType::kReg, OperandType::kRegOut) \ |
| 126 /* Register-register transfers */ \ | 126 \ |
| 127 V(Mov, AccumulatorUse::kNone, OperandType::kReg, OperandType::kRegOut) \ | 127 /* Property loads (LoadIC) operations */ \ |
| 128 \ | 128 V(LdaNamedProperty, AccumulatorUse::kWrite, OperandType::kReg, \ |
| 129 /* Property loads (LoadIC) operations */ \ | 129 OperandType::kIdx, OperandType::kIdx) \ |
| 130 V(LdaNamedProperty, AccumulatorUse::kWrite, OperandType::kReg, \ | 130 V(LdrNamedProperty, AccumulatorUse::kNone, OperandType::kReg, \ |
| 131 OperandType::kIdx, OperandType::kIdx) \ | 131 OperandType::kIdx, OperandType::kIdx, OperandType::kRegOut) \ |
| 132 V(LdrNamedProperty, AccumulatorUse::kNone, OperandType::kReg, \ | 132 V(LdaKeyedProperty, AccumulatorUse::kReadWrite, OperandType::kReg, \ |
| 133 OperandType::kIdx, OperandType::kIdx, OperandType::kRegOut) \ | 133 OperandType::kIdx) \ |
| 134 V(LdaKeyedProperty, AccumulatorUse::kReadWrite, OperandType::kReg, \ | 134 V(LdrKeyedProperty, AccumulatorUse::kRead, OperandType::kReg, \ |
| 135 OperandType::kIdx) \ | 135 OperandType::kIdx, OperandType::kRegOut) \ |
| 136 V(LdrKeyedProperty, AccumulatorUse::kRead, OperandType::kReg, \ | 136 \ |
| 137 OperandType::kIdx, OperandType::kRegOut) \ | 137 /* Propery stores (StoreIC) operations */ \ |
| 138 \ | 138 V(StaNamedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \ |
| 139 /* Propery stores (StoreIC) operations */ \ | 139 OperandType::kIdx, OperandType::kIdx) \ |
| 140 V(StaNamedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \ | 140 V(StaNamedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \ |
| 141 OperandType::kIdx, OperandType::kIdx) \ | 141 OperandType::kIdx, OperandType::kIdx) \ |
| 142 V(StaNamedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \ | 142 V(StaKeyedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \ |
| 143 OperandType::kIdx, OperandType::kIdx) \ | 143 OperandType::kReg, OperandType::kIdx) \ |
| 144 V(StaKeyedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \ | 144 V(StaKeyedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \ |
| 145 OperandType::kReg, OperandType::kIdx) \ | 145 OperandType::kReg, OperandType::kIdx) \ |
| 146 V(StaKeyedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \ | 146 \ |
| 147 OperandType::kReg, OperandType::kIdx) \ | 147 /* Binary Operators */ \ |
| 148 \ | 148 V(Add, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 149 /* Binary Operators */ \ | 149 V(Sub, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 150 V(Add, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 150 V(Mul, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 151 V(Sub, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 151 V(Div, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 152 V(Mul, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 152 V(Mod, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 153 V(Div, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 153 V(BitwiseOr, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 154 V(Mod, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 154 V(BitwiseXor, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 155 V(BitwiseOr, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 155 V(BitwiseAnd, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 156 V(BitwiseXor, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 156 V(ShiftLeft, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 157 V(BitwiseAnd, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 157 V(ShiftRight, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 158 V(ShiftLeft, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 158 V(ShiftRightLogical, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 159 V(ShiftRight, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 159 \ |
| 160 V(ShiftRightLogical, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 160 /* Unary Operators */ \ |
| 161 \ | 161 V(Inc, AccumulatorUse::kReadWrite) \ |
| 162 /* Unary Operators */ \ | 162 V(Dec, AccumulatorUse::kReadWrite) \ |
| 163 V(Inc, AccumulatorUse::kReadWrite) \ | 163 V(ToBooleanLogicalNot, AccumulatorUse::kReadWrite) \ |
| 164 V(Dec, AccumulatorUse::kReadWrite) \ | 164 V(LogicalNot, AccumulatorUse::kReadWrite) \ |
| 165 V(ToBooleanLogicalNot, AccumulatorUse::kReadWrite) \ | 165 V(TypeOf, AccumulatorUse::kReadWrite) \ |
| 166 V(LogicalNot, AccumulatorUse::kReadWrite) \ | 166 V(DeletePropertyStrict, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 167 V(TypeOf, AccumulatorUse::kReadWrite) \ | 167 V(DeletePropertySloppy, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 168 V(DeletePropertyStrict, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 168 \ |
| 169 V(DeletePropertySloppy, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 169 /* Call operations */ \ |
| 170 \ | 170 V(Call, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \ |
| 171 /* Call operations */ \ | 171 OperandType::kRegCount, OperandType::kIdx) \ |
| 172 V(Call, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \ | 172 V(TailCall, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \ |
| 173 OperandType::kRegCount, OperandType::kIdx) \ | 173 OperandType::kRegCount, OperandType::kIdx) \ |
| 174 V(TailCall, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \ | 174 V(CallRuntime, AccumulatorUse::kWrite, OperandType::kRuntimeId, \ |
| 175 OperandType::kRegCount, OperandType::kIdx) \ | 175 OperandType::kMaybeReg, OperandType::kRegCount) \ |
| 176 V(CallRuntime, AccumulatorUse::kWrite, OperandType::kRuntimeId, \ | 176 V(CallRuntimeForPair, AccumulatorUse::kNone, OperandType::kRuntimeId, \ |
| 177 OperandType::kMaybeReg, OperandType::kRegCount) \ | 177 OperandType::kMaybeReg, OperandType::kRegCount, OperandType::kRegOutPair) \ |
| 178 V(CallRuntimeForPair, AccumulatorUse::kNone, OperandType::kRuntimeId, \ | 178 V(CallJSRuntime, AccumulatorUse::kWrite, OperandType::kIdx, \ |
| 179 OperandType::kMaybeReg, OperandType::kRegCount, OperandType::kRegOutPair) \ | 179 OperandType::kReg, OperandType::kRegCount) \ |
| 180 V(CallJSRuntime, AccumulatorUse::kWrite, OperandType::kIdx, \ | 180 \ |
| 181 OperandType::kReg, OperandType::kRegCount) \ | 181 /* Intrinsics */ \ |
| 182 \ | 182 V(InvokeIntrinsic, AccumulatorUse::kWrite, OperandType::kIntrinsicId, \ |
| 183 /* Intrinsics */ \ | 183 OperandType::kMaybeReg, OperandType::kRegCount) \ |
| 184 V(InvokeIntrinsic, AccumulatorUse::kWrite, OperandType::kIntrinsicId, \ | 184 \ |
| 185 OperandType::kMaybeReg, OperandType::kRegCount) \ | 185 /* New operator */ \ |
| 186 \ | 186 V(New, AccumulatorUse::kReadWrite, OperandType::kReg, \ |
| 187 /* New operator */ \ | 187 OperandType::kMaybeReg, OperandType::kRegCount) \ |
| 188 V(New, AccumulatorUse::kReadWrite, OperandType::kReg, \ | 188 \ |
| 189 OperandType::kMaybeReg, OperandType::kRegCount) \ | 189 /* Test Operators */ \ |
| 190 \ | 190 V(TestEqual, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 191 /* Test Operators */ \ | 191 V(TestNotEqual, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 192 V(TestEqual, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 192 V(TestEqualStrict, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 193 V(TestNotEqual, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 193 V(TestLessThan, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 194 V(TestEqualStrict, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 194 V(TestGreaterThan, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 195 V(TestLessThan, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 195 V(TestLessThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 196 V(TestGreaterThan, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 196 V(TestGreaterThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 197 V(TestLessThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 197 V(TestInstanceOf, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 198 V(TestGreaterThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 198 V(TestIn, AccumulatorUse::kReadWrite, OperandType::kReg) \ |
| 199 V(TestInstanceOf, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 199 \ |
| 200 V(TestIn, AccumulatorUse::kReadWrite, OperandType::kReg) \ | 200 /* Cast operators */ \ |
| 201 \ | 201 V(ToName, AccumulatorUse::kReadWrite) \ |
| 202 /* Cast operators */ \ | 202 V(ToNumber, AccumulatorUse::kReadWrite) \ |
| 203 V(ToName, AccumulatorUse::kReadWrite) \ | 203 V(ToObject, AccumulatorUse::kReadWrite) \ |
| 204 V(ToNumber, AccumulatorUse::kReadWrite) \ | 204 \ |
| 205 V(ToObject, AccumulatorUse::kReadWrite) \ | 205 /* Literals */ \ |
| 206 \ | 206 V(CreateRegExpLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \ |
| 207 /* Literals */ \ | 207 OperandType::kIdx, OperandType::kFlag8) \ |
| 208 V(CreateRegExpLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \ | 208 V(CreateArrayLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \ |
| 209 OperandType::kIdx, OperandType::kFlag8) \ | 209 OperandType::kIdx, OperandType::kFlag8) \ |
| 210 V(CreateArrayLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \ | 210 V(CreateObjectLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \ |
| 211 OperandType::kIdx, OperandType::kFlag8) \ | 211 OperandType::kIdx, OperandType::kFlag8) \ |
| 212 V(CreateObjectLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \ | 212 \ |
| 213 OperandType::kIdx, OperandType::kFlag8) \ | 213 /* Closure allocation */ \ |
| 214 \ | 214 V(CreateClosure, AccumulatorUse::kWrite, OperandType::kIdx, \ |
| 215 /* Closure allocation */ \ | 215 OperandType::kFlag8) \ |
| 216 V(CreateClosure, AccumulatorUse::kWrite, OperandType::kIdx, \ | 216 \ |
| 217 OperandType::kFlag8) \ | 217 /* Arguments allocation */ \ |
| 218 \ | 218 V(CreateMappedArguments, AccumulatorUse::kWrite) \ |
| 219 /* Arguments allocation */ \ | 219 V(CreateUnmappedArguments, AccumulatorUse::kWrite) \ |
| 220 V(CreateMappedArguments, AccumulatorUse::kWrite) \ | 220 V(CreateRestParameter, AccumulatorUse::kWrite) \ |
| 221 V(CreateUnmappedArguments, AccumulatorUse::kWrite) \ | 221 \ |
| 222 V(CreateRestParameter, AccumulatorUse::kWrite) \ | 222 /* Control Flow */ \ |
| 223 \ | 223 V(Jump, AccumulatorUse::kNone, OperandType::kImm) \ |
| 224 /* Control Flow */ \ | 224 V(JumpConstant, AccumulatorUse::kNone, OperandType::kIdx) \ |
| 225 V(Jump, AccumulatorUse::kNone, OperandType::kImm) \ | 225 V(JumpIfTrue, AccumulatorUse::kRead, OperandType::kImm) \ |
| 226 V(JumpConstant, AccumulatorUse::kNone, OperandType::kIdx) \ | 226 V(JumpIfTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \ |
| 227 V(JumpIfTrue, AccumulatorUse::kRead, OperandType::kImm) \ | 227 V(JumpIfFalse, AccumulatorUse::kRead, OperandType::kImm) \ |
| 228 V(JumpIfTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \ | 228 V(JumpIfFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \ |
| 229 V(JumpIfFalse, AccumulatorUse::kRead, OperandType::kImm) \ | 229 V(JumpIfToBooleanTrue, AccumulatorUse::kRead, OperandType::kImm) \ |
| 230 V(JumpIfFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \ | 230 V(JumpIfToBooleanTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \ |
| 231 V(JumpIfToBooleanTrue, AccumulatorUse::kRead, OperandType::kImm) \ | 231 V(JumpIfToBooleanFalse, AccumulatorUse::kRead, OperandType::kImm) \ |
| 232 V(JumpIfToBooleanTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \ | 232 V(JumpIfToBooleanFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \ |
| 233 V(JumpIfToBooleanFalse, AccumulatorUse::kRead, OperandType::kImm) \ | 233 V(JumpIfNull, AccumulatorUse::kRead, OperandType::kImm) \ |
| 234 V(JumpIfToBooleanFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \ | 234 V(JumpIfNullConstant, AccumulatorUse::kRead, OperandType::kIdx) \ |
| 235 V(JumpIfNull, AccumulatorUse::kRead, OperandType::kImm) \ | 235 V(JumpIfUndefined, AccumulatorUse::kRead, OperandType::kImm) \ |
| 236 V(JumpIfNullConstant, AccumulatorUse::kRead, OperandType::kIdx) \ | 236 V(JumpIfUndefinedConstant, AccumulatorUse::kRead, OperandType::kIdx) \ |
| 237 V(JumpIfUndefined, AccumulatorUse::kRead, OperandType::kImm) \ | 237 V(JumpIfNotHole, AccumulatorUse::kRead, OperandType::kImm) \ |
| 238 V(JumpIfUndefinedConstant, AccumulatorUse::kRead, OperandType::kIdx) \ | 238 V(JumpIfNotHoleConstant, AccumulatorUse::kRead, OperandType::kIdx) \ |
| 239 V(JumpIfNotHole, AccumulatorUse::kRead, OperandType::kImm) \ | 239 \ |
| 240 V(JumpIfNotHoleConstant, AccumulatorUse::kRead, OperandType::kIdx) \ | 240 /* Complex flow control For..in */ \ |
| 241 \ | 241 V(ForInPrepare, AccumulatorUse::kRead, OperandType::kRegOutTriple) \ |
| 242 /* Complex flow control For..in */ \ | 242 V(ForInDone, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg) \ |
| 243 V(ForInPrepare, AccumulatorUse::kRead, OperandType::kRegOutTriple) \ | 243 V(ForInNext, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \ |
| 244 V(ForInDone, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg) \ | 244 OperandType::kRegPair, OperandType::kIdx) \ |
| 245 V(ForInNext, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \ | 245 V(ForInStep, AccumulatorUse::kWrite, OperandType::kReg) \ |
| 246 OperandType::kRegPair, OperandType::kIdx) \ | 246 \ |
| 247 V(ForInStep, AccumulatorUse::kWrite, OperandType::kReg) \ | 247 /* Perform a stack guard check */ \ |
| 248 \ | 248 V(StackCheck, AccumulatorUse::kNone) \ |
| 249 /* Perform a stack guard check */ \ | 249 \ |
| 250 V(StackCheck, AccumulatorUse::kNone) \ | 250 /* Non-local flow control */ \ |
| 251 \ | 251 V(Throw, AccumulatorUse::kRead) \ |
| 252 /* Non-local flow control */ \ | 252 V(ReThrow, AccumulatorUse::kRead) \ |
| 253 V(Throw, AccumulatorUse::kRead) \ | 253 V(Return, AccumulatorUse::kRead) \ |
| 254 V(ReThrow, AccumulatorUse::kRead) \ | 254 \ |
| 255 V(Return, AccumulatorUse::kRead) \ | 255 /* Generators */ \ |
| 256 \ | 256 V(SuspendGenerator, AccumulatorUse::kRead, OperandType::kReg) \ |
| 257 /* Generators */ \ | 257 V(ResumeGenerator, AccumulatorUse::kWrite, OperandType::kReg) \ |
| 258 V(SuspendGenerator, AccumulatorUse::kRead, OperandType::kReg) \ | 258 \ |
| 259 V(ResumeGenerator, AccumulatorUse::kWrite, OperandType::kReg) \ | 259 /* Debugger */ \ |
| 260 \ | 260 V(Debugger, AccumulatorUse::kNone) \ |
| 261 /* Debugger */ \ | 261 DEBUG_BREAK_BYTECODE_LIST(V) \ |
| 262 V(Debugger, AccumulatorUse::kNone) \ | 262 \ |
| 263 DEBUG_BREAK_BYTECODE_LIST(V) \ | 263 /* Illegal bytecode (terminates execution) */ \ |
| 264 \ | 264 V(Illegal, AccumulatorUse::kNone) \ |
| 265 /* Illegal bytecode (terminates execution) */ \ | 265 \ |
| 266 V(Illegal, AccumulatorUse::kNone) \ | 266 /* No operation (used to maintain source positions for peephole */ \ |
| 267 \ | 267 /* eliminated bytecodes). */ \ |
| 268 /* No operation (used to maintain source positions for peephole */ \ | |
| 269 /* eliminated bytecodes). */ \ | |
| 270 V(Nop, AccumulatorUse::kNone) | 268 V(Nop, AccumulatorUse::kNone) |
| 271 | 269 |
| 272 enum class AccumulatorUse : uint8_t { | 270 enum class AccumulatorUse : uint8_t { |
| 273 kNone = 0, | 271 kNone = 0, |
| 274 kRead = 1 << 0, | 272 kRead = 1 << 0, |
| 275 kWrite = 1 << 1, | 273 kWrite = 1 << 1, |
| 276 kReadWrite = kRead | kWrite | 274 kReadWrite = kRead | kWrite |
| 277 }; | 275 }; |
| 278 | 276 |
| 279 V8_INLINE AccumulatorUse operator&(AccumulatorUse lhs, AccumulatorUse rhs) { | 277 V8_INLINE AccumulatorUse operator&(AccumulatorUse lhs, AccumulatorUse rhs) { |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 std::ostream& operator<<(std::ostream& os, const AccumulatorUse& use); | 673 std::ostream& operator<<(std::ostream& os, const AccumulatorUse& use); |
| 676 std::ostream& operator<<(std::ostream& os, const OperandScale& operand_scale); | 674 std::ostream& operator<<(std::ostream& os, const OperandScale& operand_scale); |
| 677 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_size); | 675 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_size); |
| 678 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); | 676 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); |
| 679 | 677 |
| 680 } // namespace interpreter | 678 } // namespace interpreter |
| 681 } // namespace internal | 679 } // namespace internal |
| 682 } // namespace v8 | 680 } // namespace v8 |
| 683 | 681 |
| 684 #endif // V8_INTERPRETER_BYTECODES_H_ | 682 #endif // V8_INTERPRETER_BYTECODES_H_ |
| OLD | NEW |