Index: src/x64/macro-assembler-x64.h |
diff --git a/src/x64/macro-assembler-x64.h b/src/x64/macro-assembler-x64.h |
index 9c0b7964b3441f4c575989ee4aae10bcf7ba9965..ac5ea8f6ca9448585b1352475e885067408485e2 100644 |
--- a/src/x64/macro-assembler-x64.h |
+++ b/src/x64/macro-assembler-x64.h |
@@ -56,6 +56,8 @@ enum class SmiOperationConstraint { |
kBailoutOnOverflow = 1 << 2 |
}; |
+enum class ReturnAddressState { kOnStack, kNotOnStack }; |
+ |
typedef base::Flags<SmiOperationConstraint> SmiOperationConstraints; |
DEFINE_OPERATORS_FOR_FLAGS(SmiOperationConstraints) |
@@ -370,6 +372,16 @@ class MacroAssembler: public Assembler { |
// --------------------------------------------------------------------------- |
// JavaScript invokes |
+ // Removes current frame and its arguments from the stack preserving |
+ // the arguments and a return address pushed to the stack for the next call. |
+ // |ra_state| defines whether return address is already pushed to stack or |
+ // not. Both |callee_args_count| and |caller_args_count_reg| do not include |
+ // receiver. |callee_args_count| is not modified, |caller_args_count_reg| |
+ // is trashed. |
+ void PrepareForTailCall(const ParameterCount& callee_args_count, |
+ Register caller_args_count_reg, Register scratch0, |
+ Register scratch1, ReturnAddressState ra_state); |
+ |
// Invoke the JavaScript function code by either calling or jumping. |
void InvokeFunctionCode(Register function, Register new_target, |
const ParameterCount& expected, |
@@ -1014,12 +1026,6 @@ class MacroAssembler: public Assembler { |
return (target.requires_rex() ? 2 : 1) + target.operand_size(); |
} |
- // Emit call to the code we are currently generating. |
- void CallSelf() { |
- Handle<Code> self(reinterpret_cast<Code**>(CodeObject().location())); |
- Call(self, RelocInfo::CODE_TARGET); |
- } |
- |
// Non-SSE2 instructions. |
void Pextrd(Register dst, XMMRegister src, int8_t imm8); |
void Pinsrd(XMMRegister dst, Register src, int8_t imm8); |