Commit db13f084 authored by Akos Palfi's avatar Akos Palfi

MIPS: new classes: no longer experimental.

Port 2707d4c9

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=
R=paul.lind@imgtec.com

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

Cr-Commit-Position: refs/heads/master@{#26635}
parent 58d8e169
......@@ -807,10 +807,25 @@ void Builtins::Generate_JSConstructStubForDerived(MacroAssembler* masm) {
__ Subu(t0, t0, Operand(2));
__ Branch(&loop, ge, t0, Operand(zero_reg));
__ Addu(a0, a0, Operand(1));
// Handle step in.
Label skip_step_in;
ExternalReference debug_step_in_fp =
ExternalReference::debug_step_in_fp_address(masm->isolate());
__ li(a2, Operand(debug_step_in_fp));
__ lw(a2, MemOperand(a2));
__ Branch(&skip_step_in, eq, a2, Operand(zero_reg));
__ Push(a0, a1, a1);
__ CallRuntime(Runtime::kHandleStepInForDerivedConstructors, 1);
__ Pop(a0, a1);
__ bind(&skip_step_in);
// Call the function.
// a0: number of arguments
// a1: constructor function
__ Addu(a0, a0, Operand(1));
ParameterCount actual(a0);
__ InvokeFunction(a1, actual, CALL_FUNCTION, NullCallWrapper());
......
......@@ -3226,7 +3226,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
Comment cmnt(masm_, "[ SuperConstructorCall");
if (!ValidateSuperCall(expr)) return;
Variable* new_target_var = scope()->DeclarationScope()->new_target_var();
GetVar(result_register(), new_target_var);
__ Push(result_register());
......
......@@ -817,10 +817,26 @@ void Builtins::Generate_JSConstructStubForDerived(MacroAssembler* masm) {
__ Daddu(a4, a4, Operand(-1));
__ Branch(&loop, ge, a4, Operand(zero_reg));
__ Daddu(a0, a0, Operand(1));
// Handle step in.
Label skip_step_in;
ExternalReference debug_step_in_fp =
ExternalReference::debug_step_in_fp_address(masm->isolate());
__ li(a2, Operand(debug_step_in_fp));
__ ld(a2, MemOperand(a2));
__ Branch(&skip_step_in, eq, a2, Operand(zero_reg));
__ Push(a0, a1, a1);
__ CallRuntime(Runtime::kHandleStepInForDerivedConstructors, 1);
__ Pop(a0, a1);
__ bind(&skip_step_in);
// Call the function.
// a0: number of arguments
// a1: constructor function
__ Daddu(a0, a0, Operand(1));
ParameterCount actual(a0);
__ InvokeFunction(a1, actual, CALL_FUNCTION, NullCallWrapper());
......
......@@ -3225,7 +3225,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
Comment cmnt(masm_, "[ SuperConstructorCall");
if (!ValidateSuperCall(expr)) return;
Variable* new_target_var = scope()->DeclarationScope()->new_target_var();
GetVar(result_register(), new_target_var);
__ Push(result_register());
......
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