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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 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]| | 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(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 new 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& New(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 new operator for use with a spread. The accumulator holds the |
227 // |new_target|. The |constructor| is in a register and arguments are in | 227 // |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& NewWithSpread(Register constructor, RegisterList args); |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 static int const kNoFeedbackSlot = 0; | 443 static int const kNoFeedbackSlot = 0; |
444 | 444 |
445 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 445 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
446 }; | 446 }; |
447 | 447 |
448 } // namespace interpreter | 448 } // namespace interpreter |
449 } // namespace internal | 449 } // namespace internal |
450 } // namespace v8 | 450 } // namespace v8 |
451 | 451 |
452 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 452 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |