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_INTERPRETER_H_ | 5 #ifndef V8_INTERPRETER_INTERPRETER_H_ |
6 #define V8_INTERPRETER_INTERPRETER_H_ | 6 #define V8_INTERPRETER_INTERPRETER_H_ |
7 | 7 |
8 // Clients of this interface shouldn't depend on lots of interpreter internals. | 8 // Clients of this interface shouldn't depend on lots of interpreter internals. |
9 // Do not include anything from src/interpreter other than | 9 // Do not include anything from src/interpreter other than |
10 // src/interpreter/bytecodes.h here! | 10 // src/interpreter/bytecodes.h here! |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // Bytecode handler generator functions. | 67 // Bytecode handler generator functions. |
68 #define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \ | 68 #define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \ |
69 void Do##Name(InterpreterAssembler* assembler); | 69 void Do##Name(InterpreterAssembler* assembler); |
70 BYTECODE_LIST(DECLARE_BYTECODE_HANDLER_GENERATOR) | 70 BYTECODE_LIST(DECLARE_BYTECODE_HANDLER_GENERATOR) |
71 #undef DECLARE_BYTECODE_HANDLER_GENERATOR | 71 #undef DECLARE_BYTECODE_HANDLER_GENERATOR |
72 | 72 |
73 // Generates code to perform the binary operation via |Generator|. | 73 // Generates code to perform the binary operation via |Generator|. |
74 template <class Generator> | 74 template <class Generator> |
75 void DoBinaryOp(InterpreterAssembler* assembler); | 75 void DoBinaryOp(InterpreterAssembler* assembler); |
76 | 76 |
| 77 // Generates code to perform the binary operation via |Generator| using |
| 78 // an immediate value rather the accumulator as the rhs operand. |
| 79 template <class Generator> |
| 80 void DoBinaryOpWithImmediate(InterpreterAssembler* assembler); |
| 81 |
77 // Generates code to perform the unary operation via |callable|. | 82 // Generates code to perform the unary operation via |callable|. |
78 void DoUnaryOp(Callable callable, InterpreterAssembler* assembler); | 83 void DoUnaryOp(Callable callable, InterpreterAssembler* assembler); |
79 | 84 |
80 // Generates code to perform the unary operation via |Generator|. | 85 // Generates code to perform the unary operation via |Generator|. |
81 template <class Generator> | 86 template <class Generator> |
82 void DoUnaryOp(InterpreterAssembler* assembler); | 87 void DoUnaryOp(InterpreterAssembler* assembler); |
83 | 88 |
84 // Generates code to perform the comparison operation associated with | 89 // Generates code to perform the comparison operation associated with |
85 // |compare_op|. | 90 // |compare_op|. |
86 void DoCompareOp(Token::Value compare_op, InterpreterAssembler* assembler); | 91 void DoCompareOp(Token::Value compare_op, InterpreterAssembler* assembler); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 v8::base::SmartArrayPointer<uintptr_t> bytecode_dispatch_counters_table_; | 170 v8::base::SmartArrayPointer<uintptr_t> bytecode_dispatch_counters_table_; |
166 | 171 |
167 DISALLOW_COPY_AND_ASSIGN(Interpreter); | 172 DISALLOW_COPY_AND_ASSIGN(Interpreter); |
168 }; | 173 }; |
169 | 174 |
170 } // namespace interpreter | 175 } // namespace interpreter |
171 } // namespace internal | 176 } // namespace internal |
172 } // namespace v8 | 177 } // namespace v8 |
173 | 178 |
174 #endif // V8_INTERPRETER_INTERPRETER_H_ | 179 #endif // V8_INTERPRETER_INTERPRETER_H_ |
OLD | NEW |