Commit a3fd2b81 authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

X87: Remove strong mode support from rest argument creation.

  port a94d6d6e (r33108)

  original commit message:
  The mode requires an extra register, and since we aren't supporting it now, we can dispense with it.

BUG=

Review URL: https://codereview.chromium.org/1561943002

Cr-Commit-Position: refs/heads/master@{#33147}
parent 020b419c
......@@ -266,8 +266,6 @@ void FullCodeGenerator::Generate() {
Operand(ebp, StandardFrameConstants::kCallerSPOffset + offset));
__ mov(RestParamAccessDescriptor::rest_parameter_index(),
Immediate(Smi::FromInt(rest_index)));
__ mov(RestParamAccessDescriptor::language_mode(),
Immediate(Smi::FromInt(language_mode())));
function_in_register = false;
RestParamAccessStub stub(isolate());
......
......@@ -857,28 +857,25 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
// ecx : number of parameters (tagged)
// edx : parameters pointer
// ebx : rest parameter index (tagged)
// edi : language mode (tagged)
// esp[0] : return address
// Check if the calling frame is an arguments adaptor frame.
Label runtime;
__ mov(eax, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
__ mov(eax, Operand(eax, StandardFrameConstants::kContextOffset));
__ mov(edi, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
__ mov(eax, Operand(edi, StandardFrameConstants::kContextOffset));
__ cmp(eax, Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
__ j(not_equal, &runtime);
// Patch the arguments.length and the parameters pointer.
__ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
__ mov(ecx, Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset));
__ mov(ecx, Operand(edi, ArgumentsAdaptorFrameConstants::kLengthOffset));
__ lea(edx,
Operand(edx, ecx, times_2, StandardFrameConstants::kCallerSPOffset));
Operand(edi, ecx, times_2, StandardFrameConstants::kCallerSPOffset));
__ bind(&runtime);
__ pop(eax); // Save return address.
__ push(ecx); // Push number of parameters.
__ push(edx); // Push parameters pointer.
__ push(ebx); // Push rest parameter index.
__ push(edi); // Push language mode.
__ push(eax); // Push return address.
__ TailCallRuntime(Runtime::kNewRestParam);
}
......
......@@ -67,10 +67,10 @@ const Register ArgumentsAccessNewDescriptor::function() { return edi; }
const Register ArgumentsAccessNewDescriptor::parameter_count() { return ecx; }
const Register ArgumentsAccessNewDescriptor::parameter_pointer() { return edx; }
const Register RestParamAccessDescriptor::parameter_count() { return ecx; }
const Register RestParamAccessDescriptor::parameter_pointer() { return edx; }
const Register RestParamAccessDescriptor::rest_parameter_index() { return ebx; }
const Register RestParamAccessDescriptor::language_mode() { return edi; }
const Register ApiGetterDescriptor::function_address() { return edx; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment