summaryrefslogtreecommitdiff
path: root/deps/v8/src/interpreter/interpreter-assembler.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/interpreter/interpreter-assembler.h')
-rw-r--r--deps/v8/src/interpreter/interpreter-assembler.h43
1 files changed, 25 insertions, 18 deletions
diff --git a/deps/v8/src/interpreter/interpreter-assembler.h b/deps/v8/src/interpreter/interpreter-assembler.h
index 1317f377f4..c2e0bb3bd7 100644
--- a/deps/v8/src/interpreter/interpreter-assembler.h
+++ b/deps/v8/src/interpreter/interpreter-assembler.h
@@ -32,6 +32,9 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
compiler::Node* BytecodeOperandFlag(int operand_index);
// Returns the 32-bit zero-extended index immediate for bytecode operand
// |operand_index| in the current bytecode.
+ compiler::Node* BytecodeOperandIdxInt32(int operand_index);
+ // Returns the word zero-extended index immediate for bytecode operand
+ // |operand_index| in the current bytecode.
compiler::Node* BytecodeOperandIdx(int operand_index);
// Returns the smi index immediate for bytecode operand |operand_index|
// in the current bytecode.
@@ -115,23 +118,25 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
compiler::Node* IncrementCallCount(compiler::Node* feedback_vector,
compiler::Node* slot_id);
- // Call JSFunction or Callable |function| with |arg_count|
- // arguments (not including receiver) and the first argument
- // located at |first_arg|. Type feedback is collected in the
- // slot at index |slot_id|.
- compiler::Node* CallJSWithFeedback(compiler::Node* function,
- compiler::Node* context,
- compiler::Node* first_arg,
- compiler::Node* arg_count,
- compiler::Node* slot_id,
- compiler::Node* feedback_vector,
- TailCallMode tail_call_mode);
-
- // Call JSFunction or Callable |function| with |arg_count|
- // arguments (not including receiver) and the first argument
- // located at |first_arg|.
+ // Call JSFunction or Callable |function| with |arg_count| arguments (not
+ // including receiver) and the first argument located at |first_arg|. Type
+ // feedback is collected in the slot at index |slot_id|.
+ //
+ // If the |receiver_mode| is kNullOrUndefined, then the receiver is implicitly
+ // undefined and |first_arg| is the first parameter. Otherwise, |first_arg| is
+ // the receiver and it is converted according to |receiver_mode|.
+ compiler::Node* CallJSWithFeedback(
+ compiler::Node* function, compiler::Node* context,
+ compiler::Node* first_arg, compiler::Node* arg_count,
+ compiler::Node* slot_id, compiler::Node* feedback_vector,
+ ConvertReceiverMode receiver_mode, TailCallMode tail_call_mode);
+
+ // Call JSFunction or Callable |function| with |arg_count| arguments (not
+ // including receiver) and the first argument located at |first_arg|, possibly
+ // including the receiver depending on |receiver_mode|.
compiler::Node* CallJS(compiler::Node* function, compiler::Node* context,
compiler::Node* first_arg, compiler::Node* arg_count,
+ ConvertReceiverMode receiver_mode,
TailCallMode tail_call_mode);
// Call JSFunction or Callable |function| with |arg_count|
@@ -223,9 +228,6 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
// Returns the offset from the BytecodeArrayPointer of the current bytecode.
compiler::Node* BytecodeOffset();
- // Save the bytecode offset to the interpreter frame.
- void SaveBytecodeOffset();
-
protected:
Bytecode bytecode() const { return bytecode_; }
static bool TargetSupportsUnalignedAccess();
@@ -301,6 +303,9 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
// JumpIfWordNotEqual.
void JumpConditional(compiler::Node* condition, compiler::Node* jump_offset);
+ // Save the bytecode offset to the interpreter frame.
+ void SaveBytecodeOffset();
+
// Updates and returns BytecodeOffset() advanced by the current bytecode's
// size. Traces the exit of the current bytecode.
compiler::Node* Advance();
@@ -334,6 +339,8 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
compiler::Node* DispatchToBytecodeHandlerEntry(
compiler::Node* handler_entry, compiler::Node* bytecode_offset);
+ int CurrentBytecodeSize() const;
+
OperandScale operand_scale() const { return operand_scale_; }
Bytecode bytecode_;