Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: src/interpreter/bytecodes.h

Issue 1422033002: [Interpreter] Add support for for..in. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment nits. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 V(TestGreaterThan, OperandType::kReg8) \ 111 V(TestGreaterThan, OperandType::kReg8) \
112 V(TestLessThanOrEqual, OperandType::kReg8) \ 112 V(TestLessThanOrEqual, OperandType::kReg8) \
113 V(TestGreaterThanOrEqual, OperandType::kReg8) \ 113 V(TestGreaterThanOrEqual, OperandType::kReg8) \
114 V(TestInstanceOf, OperandType::kReg8) \ 114 V(TestInstanceOf, OperandType::kReg8) \
115 V(TestIn, OperandType::kReg8) \ 115 V(TestIn, OperandType::kReg8) \
116 \ 116 \
117 /* Cast operators */ \ 117 /* Cast operators */ \
118 V(ToBoolean, OperandType::kNone) \ 118 V(ToBoolean, OperandType::kNone) \
119 V(ToName, OperandType::kNone) \ 119 V(ToName, OperandType::kNone) \
120 V(ToNumber, OperandType::kNone) \ 120 V(ToNumber, OperandType::kNone) \
121 V(ToObject, OperandType::kNone) \
121 \ 122 \
122 /* Literals */ \ 123 /* Literals */ \
123 V(CreateRegExpLiteral, OperandType::kIdx8, OperandType::kReg8) \ 124 V(CreateRegExpLiteral, OperandType::kIdx8, OperandType::kReg8) \
124 V(CreateArrayLiteral, OperandType::kIdx8, OperandType::kImm8) \ 125 V(CreateArrayLiteral, OperandType::kIdx8, OperandType::kImm8) \
125 V(CreateObjectLiteral, OperandType::kIdx8, OperandType::kImm8) \ 126 V(CreateObjectLiteral, OperandType::kIdx8, OperandType::kImm8) \
126 \ 127 \
127 /* Closure allocation */ \ 128 /* Closure allocation */ \
128 V(CreateClosure, OperandType::kImm8) \ 129 V(CreateClosure, OperandType::kImm8) \
129 \ 130 \
130 /* Arguments allocation */ \ 131 /* Arguments allocation */ \
131 V(CreateMappedArguments, OperandType::kNone) \ 132 V(CreateMappedArguments, OperandType::kNone) \
132 V(CreateUnmappedArguments, OperandType::kNone) \ 133 V(CreateUnmappedArguments, OperandType::kNone) \
133 \ 134 \
134 /* Control Flow */ \ 135 /* Control Flow */ \
135 V(Jump, OperandType::kImm8) \ 136 V(Jump, OperandType::kImm8) \
136 V(JumpConstant, OperandType::kIdx8) \ 137 V(JumpConstant, OperandType::kIdx8) \
137 V(JumpIfTrue, OperandType::kImm8) \ 138 V(JumpIfTrue, OperandType::kImm8) \
138 V(JumpIfTrueConstant, OperandType::kIdx8) \ 139 V(JumpIfTrueConstant, OperandType::kIdx8) \
139 V(JumpIfFalse, OperandType::kImm8) \ 140 V(JumpIfFalse, OperandType::kImm8) \
140 V(JumpIfFalseConstant, OperandType::kIdx8) \ 141 V(JumpIfFalseConstant, OperandType::kIdx8) \
141 V(JumpIfToBooleanTrue, OperandType::kImm8) \ 142 V(JumpIfToBooleanTrue, OperandType::kImm8) \
142 V(JumpIfToBooleanTrueConstant, OperandType::kIdx8) \ 143 V(JumpIfToBooleanTrueConstant, OperandType::kIdx8) \
143 V(JumpIfToBooleanFalse, OperandType::kImm8) \ 144 V(JumpIfToBooleanFalse, OperandType::kImm8) \
144 V(JumpIfToBooleanFalseConstant, OperandType::kIdx8) \ 145 V(JumpIfToBooleanFalseConstant, OperandType::kIdx8) \
146 V(JumpIfNull, OperandType::kImm8) \
147 V(JumpIfNullConstant, OperandType::kIdx8) \
148 V(JumpIfUndefined, OperandType::kImm8) \
149 V(JumpIfUndefinedConstant, OperandType::kIdx8) \
150 \
151 /* Complex flow control For..in */ \
152 V(ForInPrepare, OperandType::kReg8) \
153 V(ForInNext, OperandType::kReg8, OperandType::kReg8) \
154 V(ForInDone, OperandType::kReg8) \
155 \
156 /* Non-local flow control */ \
145 V(Throw, OperandType::kNone) \ 157 V(Throw, OperandType::kNone) \
146 V(Return, OperandType::kNone) 158 V(Return, OperandType::kNone)
147 159
148 160
149 // Enumeration of the size classes of operand types used by bytecodes. 161 // Enumeration of the size classes of operand types used by bytecodes.
150 enum class OperandSize : uint8_t { 162 enum class OperandSize : uint8_t {
151 kNone = 0, 163 kNone = 0,
152 kByte = 1, 164 kByte = 1,
153 kShort = 2, 165 kShort = 2,
154 }; 166 };
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 316
305 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); 317 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode);
306 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); 318 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type);
307 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_type); 319 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_type);
308 320
309 } // namespace interpreter 321 } // namespace interpreter
310 } // namespace internal 322 } // namespace internal
311 } // namespace v8 323 } // namespace v8
312 324
313 #endif // V8_INTERPRETER_BYTECODES_H_ 325 #endif // V8_INTERPRETER_BYTECODES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698