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_BYTECODE_ARRAY_BUILDER_H_ | 5 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "src/ast.h" | 10 #include "src/ast.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // applied to the constructor. | 143 // applied to the constructor. |
144 BytecodeArrayBuilder& New(Register constructor, Register first_arg, | 144 BytecodeArrayBuilder& New(Register constructor, Register first_arg, |
145 size_t arg_count); | 145 size_t arg_count); |
146 | 146 |
147 // Call the runtime function with |function_id|. The first argument should be | 147 // Call the runtime function with |function_id|. The first argument should be |
148 // in |first_arg| and all subsequent arguments should be in registers | 148 // in |first_arg| and all subsequent arguments should be in registers |
149 // <first_arg + 1> to <first_arg + 1 + arg_count>. | 149 // <first_arg + 1> to <first_arg + 1 + arg_count>. |
150 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, | 150 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, |
151 Register first_arg, size_t arg_count); | 151 Register first_arg, size_t arg_count); |
152 | 152 |
| 153 // Call the JS runtime function with |context_index|. The the receiver should |
| 154 // be in |receiver| and all subsequent arguments should be in registers |
| 155 // <receiver + 1> to <receiver + 1 + arg_count>. |
| 156 BytecodeArrayBuilder& CallJSRuntime(int context_index, Register receiver, |
| 157 size_t arg_count); |
| 158 |
153 // Operators (register holds the lhs value, accumulator holds the rhs value). | 159 // Operators (register holds the lhs value, accumulator holds the rhs value). |
154 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg, | 160 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg, |
155 Strength strength); | 161 Strength strength); |
156 | 162 |
157 // Count Operators (value stored in accumulator). | 163 // Count Operators (value stored in accumulator). |
158 BytecodeArrayBuilder& CountOperation(Token::Value op, Strength strength); | 164 BytecodeArrayBuilder& CountOperation(Token::Value op, Strength strength); |
159 | 165 |
160 // Unary Operators. | 166 // Unary Operators. |
161 BytecodeArrayBuilder& LogicalNot(); | 167 BytecodeArrayBuilder& LogicalNot(); |
162 BytecodeArrayBuilder& TypeOf(); | 168 BytecodeArrayBuilder& TypeOf(); |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 350 |
345 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); | 351 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); |
346 }; | 352 }; |
347 | 353 |
348 | 354 |
349 } // namespace interpreter | 355 } // namespace interpreter |
350 } // namespace internal | 356 } // namespace internal |
351 } // namespace v8 | 357 } // namespace v8 |
352 | 358 |
353 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 359 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |