MIPS: new classes: no longer experimental.

Port 2707d4c9f4

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}
This commit is contained in:
Akos Palfi 2015-02-13 02:25:58 +01:00
parent 58d8e169f1
commit db13f0847b
4 changed files with 35 additions and 4 deletions

View File

@ -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());

View File

@ -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());

View File

@ -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());

View File

@ -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());