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 "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/base/compiler-specific.h" | 9 #include "src/base/compiler-specific.h" |
10 #include "src/globals.h" | 10 #include "src/globals.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 BytecodeArrayBuilder& Call( | 211 BytecodeArrayBuilder& Call( |
212 Register callable, RegisterList args, int feedback_slot, | 212 Register callable, RegisterList args, int feedback_slot, |
213 Call::CallType call_type, | 213 Call::CallType call_type, |
214 TailCallMode tail_call_mode = TailCallMode::kDisallow); | 214 TailCallMode tail_call_mode = TailCallMode::kDisallow); |
215 | 215 |
216 // Call a JS function. The JSFunction or Callable to be called should be in | 216 // Call a JS function. The JSFunction or Callable to be called should be in |
217 // |callable|, the receiver in |args[0]| and the arguments in |args[1]| | 217 // |callable|, the receiver in |args[0]| and the arguments in |args[1]| |
218 // onwards. The final argument must be a spread. | 218 // onwards. The final argument must be a spread. |
219 BytecodeArrayBuilder& CallWithSpread(Register callable, RegisterList args); | 219 BytecodeArrayBuilder& CallWithSpread(Register callable, RegisterList args); |
220 | 220 |
221 // Call the new operator. The accumulator holds the |new_target|. | 221 // Call the Construct operator. The accumulator holds the |new_target|. |
222 // The |constructor| is in a register and arguments are in |args|. | 222 // The |constructor| is in a register and arguments are in |args|. |
223 BytecodeArrayBuilder& New(Register constructor, RegisterList args, | 223 BytecodeArrayBuilder& Construct(Register constructor, RegisterList args, |
224 int feedback_slot); | 224 int feedback_slot); |
225 | 225 |
226 // Call the new operator for use with a spread. The accumulator holds the | 226 // Call the Construct operator for use with a spread. The accumulator holds |
227 // |new_target|. The |constructor| is in a register and arguments are in | 227 // the |new_target|. The |constructor| is in a register and arguments are in |
228 // |args|. The final argument must be a spread. | 228 // |args|. The final argument must be a spread. |
229 BytecodeArrayBuilder& NewWithSpread(Register constructor, RegisterList args); | 229 BytecodeArrayBuilder& ConstructWithSpread(Register constructor, |
| 230 RegisterList args); |
230 | 231 |
231 // Call the runtime function with |function_id| and arguments |args|. | 232 // Call the runtime function with |function_id| and arguments |args|. |
232 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, | 233 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, |
233 RegisterList args); | 234 RegisterList args); |
234 // Call the runtime function with |function_id| with single argument |arg|. | 235 // Call the runtime function with |function_id| with single argument |arg|. |
235 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, | 236 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, |
236 Register arg); | 237 Register arg); |
237 // Call the runtime function with |function_id| with no arguments. | 238 // Call the runtime function with |function_id| with no arguments. |
238 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id); | 239 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id); |
239 | 240 |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 static int const kNoFeedbackSlot = 0; | 444 static int const kNoFeedbackSlot = 0; |
444 | 445 |
445 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 446 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
446 }; | 447 }; |
447 | 448 |
448 } // namespace interpreter | 449 } // namespace interpreter |
449 } // namespace internal | 450 } // namespace internal |
450 } // namespace v8 | 451 } // namespace v8 |
451 | 452 |
452 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 453 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |