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

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

Issue 1343363002: [Interpreter] Basic flow control. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Switch test-bytecode-generator/IfConditions to use new style bytecode array check. Created 5 years, 2 months 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
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/interpreter/bytecodes.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 /* Binary Operators */ \ 54 /* Binary Operators */ \
55 V(Add, OperandType::kReg) \ 55 V(Add, OperandType::kReg) \
56 V(Sub, OperandType::kReg) \ 56 V(Sub, OperandType::kReg) \
57 V(Mul, OperandType::kReg) \ 57 V(Mul, OperandType::kReg) \
58 V(Div, OperandType::kReg) \ 58 V(Div, OperandType::kReg) \
59 V(Mod, OperandType::kReg) \ 59 V(Mod, OperandType::kReg) \
60 \ 60 \
61 /* Call operations. */ \ 61 /* Call operations. */ \
62 V(Call, OperandType::kReg, OperandType::kReg, OperandType::kCount) \ 62 V(Call, OperandType::kReg, OperandType::kReg, OperandType::kCount) \
63 \ 63 \
64 /* Test Operators */ \
65 V(TestEqual, OperandType::kReg) \
66 V(TestNotEqual, OperandType::kReg) \
67 V(TestEqualStrict, OperandType::kReg) \
68 V(TestNotEqualStrict, OperandType::kReg) \
69 V(TestLessThan, OperandType::kReg) \
70 V(TestGreaterThan, OperandType::kReg) \
71 V(TestLessThanEqual, OperandType::kReg) \
72 V(TestGreaterThanEqual, OperandType::kReg) \
73 V(TestInstanceOf, OperandType::kReg) \
74 V(TestIn, OperandType::kReg) \
75 \
76 /* Cast operators */ \
77 V(ToBoolean, OperandType::kNone) \
78 \
64 /* Control Flow */ \ 79 /* Control Flow */ \
80 V(Jump, OperandType::kImm8) \
81 V(JumpConstant, OperandType::kIdx) \
82 V(JumpIfTrue, OperandType::kImm8) \
83 V(JumpIfTrueConstant, OperandType::kIdx) \
84 V(JumpIfFalse, OperandType::kImm8) \
85 V(JumpIfFalseConstant, OperandType::kIdx) \
65 V(Return, OperandType::kNone) 86 V(Return, OperandType::kNone)
66 87
67 88
68 // Enumeration of operand types used by bytecodes. 89 // Enumeration of operand types used by bytecodes.
69 enum class OperandType : uint8_t { 90 enum class OperandType : uint8_t {
70 #define DECLARE_OPERAND_TYPE(Name) k##Name, 91 #define DECLARE_OPERAND_TYPE(Name) k##Name,
71 OPERAND_TYPE_LIST(DECLARE_OPERAND_TYPE) 92 OPERAND_TYPE_LIST(DECLARE_OPERAND_TYPE)
72 #undef DECLARE_OPERAND_TYPE 93 #undef DECLARE_OPERAND_TYPE
73 #define COUNT_OPERAND_TYPES(x) +1 94 #define COUNT_OPERAND_TYPES(x) +1
74 // The COUNT_OPERAND macro will turn this into kLast = -1 +1 +1... which will 95 // The COUNT_OPERAND macro will turn this into kLast = -1 +1 +1... which will
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 }; 187 };
167 188
168 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); 189 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode);
169 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); 190 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type);
170 191
171 } // namespace interpreter 192 } // namespace interpreter
172 } // namespace internal 193 } // namespace internal
173 } // namespace v8 194 } // namespace v8
174 195
175 #endif // V8_INTERPRETER_BYTECODES_H_ 196 #endif // V8_INTERPRETER_BYTECODES_H_
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/interpreter/bytecodes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698