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 | |
221 // Call the new operator. The accumulator holds the |new_target|. | 216 // Call the new operator. The accumulator holds the |new_target|. |
222 // The |constructor| is in a register and arguments are in |args|. | 217 // The |constructor| is in a register and arguments are in |args|. |
223 BytecodeArrayBuilder& New(Register constructor, RegisterList args, | 218 BytecodeArrayBuilder& New(Register constructor, RegisterList args, |
224 int feedback_slot); | 219 int feedback_slot); |
225 | 220 |
226 // Call the new operator for use with a spread. The accumulator holds the | 221 // 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 | 222 // |new_target|. The |constructor| is in a register and arguments are in |
228 // |args|. The final argument must be a spread. | 223 // |args|. The final argument must be a spread. |
229 BytecodeArrayBuilder& NewWithSpread(Register constructor, RegisterList args); | 224 BytecodeArrayBuilder& NewWithSpread(Register constructor, RegisterList args); |
230 | 225 |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 static int const kNoFeedbackSlot = 0; | 438 static int const kNoFeedbackSlot = 0; |
444 | 439 |
445 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 440 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
446 }; | 441 }; |
447 | 442 |
448 } // namespace interpreter | 443 } // namespace interpreter |
449 } // namespace internal | 444 } // namespace internal |
450 } // namespace v8 | 445 } // namespace v8 |
451 | 446 |
452 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 447 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |