Commit a34ed972 authored by chunyang.dai's avatar chunyang.dai Committed by Commit bot

X87: new classes: no longer experimental.

port 2707d4c9 (r26628).

original commit message:

   This CL fixes tests that no longer valid and also fixes two issues:
    1. 'super()' in non derived constructors.
    2. Failure to step into derived constructors.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26647}
parent de7527bc
......@@ -539,6 +539,25 @@ void Builtins::Generate_JSConstructStubForDerived(MacroAssembler* masm) {
__ j(greater_equal, &loop);
__ inc(eax); // Pushed new.target.
// Handle step in.
Label skip_step_in;
ExternalReference debug_step_in_fp =
ExternalReference::debug_step_in_fp_address(masm->isolate());
__ cmp(Operand::StaticVariable(debug_step_in_fp), Immediate(0));
__ j(equal, &skip_step_in);
__ push(eax);
__ push(edi);
__ push(edi);
__ CallRuntime(Runtime::kHandleStepInForDerivedConstructors, 1);
__ pop(edi);
__ pop(eax);
__ bind(&skip_step_in);
// Invoke function.
ParameterCount actual(eax);
__ InvokeFunction(edi, actual, CALL_FUNCTION, NullCallWrapper());
......
......@@ -3120,6 +3120,8 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
if (!ValidateSuperCall(expr)) return;
Variable* new_target_var = scope()->DeclarationScope()->new_target_var();
GetVar(eax, new_target_var);
__ push(eax);
......@@ -4085,6 +4087,7 @@ void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) {
}
__ bind(&args_set_up);
__ mov(edi, Operand(esp, eax, times_pointer_size, 0));
CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL);
......
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