| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 206 |
| 207 // Call a JS function. The JSFunction or Callable to be called should be in | 207 // Call a JS function. The JSFunction or Callable to be called should be in |
| 208 // |callable|. The arguments should be in |args|, with the receiver in | 208 // |callable|. The arguments should be in |args|, with the receiver in |
| 209 // |args[0]|. The call type of the expression is in |call_type|. Type feedback | 209 // |args[0]|. The call type of the expression is in |call_type|. Type feedback |
| 210 // is recorded in the |feedback_slot| in the type feedback vector. | 210 // is recorded in the |feedback_slot| in the type feedback vector. |
| 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 |
| 217 // |args[0]|, the receiver in |args[1]| and the arguments in |args[2]| |
| 218 // onwards. The final argument must be a spread. |
| 219 BytecodeArrayBuilder& CallWithSpread(RegisterList args); |
| 220 |
| 216 // Call the new operator. The accumulator holds the |new_target|. | 221 // Call the new operator. The accumulator holds the |new_target|. |
| 217 // The |constructor| is in a register and arguments are in |args|. | 222 // The |constructor| is in a register and arguments are in |args|. |
| 218 BytecodeArrayBuilder& New(Register constructor, RegisterList args, | 223 BytecodeArrayBuilder& New(Register constructor, RegisterList args, |
| 219 int feedback_slot); | 224 int feedback_slot); |
| 220 | 225 |
| 221 // Call the runtime function with |function_id| and arguments |args|. | 226 // Call the runtime function with |function_id| and arguments |args|. |
| 222 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, | 227 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, |
| 223 RegisterList args); | 228 RegisterList args); |
| 224 // Call the runtime function with |function_id| with single argument |arg|. | 229 // Call the runtime function with |function_id| with single argument |arg|. |
| 225 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, | 230 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 static int const kNoFeedbackSlot = 0; | 444 static int const kNoFeedbackSlot = 0; |
| 440 | 445 |
| 441 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 446 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
| 442 }; | 447 }; |
| 443 | 448 |
| 444 } // namespace interpreter | 449 } // namespace interpreter |
| 445 } // namespace internal | 450 } // namespace internal |
| 446 } // namespace v8 | 451 } // namespace v8 |
| 447 | 452 |
| 448 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 453 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
| OLD | NEW |