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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 77 // Generates code to perform the binary operation via |Generator| using |
78 // an immediate value rather the accumulator as the rhs operand. | 78 // an immediate value rather the accumulator as the rhs operand. |
79 template <class Generator> | 79 template <class Generator> |
80 void DoBinaryOpWithImmediate(InterpreterAssembler* assembler); | 80 void DoBinaryOpWithImmediate(InterpreterAssembler* assembler); |
81 | 81 |
82 // Generates code to perform the unary operation via |callable|. | 82 // Generates code to perform the unary operation via |callable| and stores |
83 void DoUnaryOp(Callable callable, InterpreterAssembler* assembler); | 83 // the result to the accumulator or to the output register if the |bytecode| |
| 84 // has a single output register operand. |
| 85 void DoUnaryOp(Callable callable, InterpreterAssembler* assembler, |
| 86 Bytecode bytecode); |
84 | 87 |
85 // Generates code to perform the unary operation via |Generator|. | 88 // Generates code to perform the unary operation via |Generator|. |
86 template <class Generator> | 89 template <class Generator> |
87 void DoUnaryOp(InterpreterAssembler* assembler); | 90 void DoUnaryOp(InterpreterAssembler* assembler); |
88 | 91 |
89 // Generates code to perform the comparison operation associated with | 92 // Generates code to perform the comparison operation associated with |
90 // |compare_op|. | 93 // |compare_op|. |
91 void DoCompareOp(Token::Value compare_op, InterpreterAssembler* assembler); | 94 void DoCompareOp(Token::Value compare_op, InterpreterAssembler* assembler); |
92 | 95 |
93 // Generates code to perform a global store via |ic|. | 96 // Generates code to perform a global store via |ic|. |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 v8::base::SmartArrayPointer<uintptr_t> bytecode_dispatch_counters_table_; | 172 v8::base::SmartArrayPointer<uintptr_t> bytecode_dispatch_counters_table_; |
170 | 173 |
171 DISALLOW_COPY_AND_ASSIGN(Interpreter); | 174 DISALLOW_COPY_AND_ASSIGN(Interpreter); |
172 }; | 175 }; |
173 | 176 |
174 } // namespace interpreter | 177 } // namespace interpreter |
175 } // namespace internal | 178 } // namespace internal |
176 } // namespace v8 | 179 } // namespace v8 |
177 | 180 |
178 #endif // V8_INTERPRETER_INTERPRETER_H_ | 181 #endif // V8_INTERPRETER_INTERPRETER_H_ |
OLD | NEW |