Commit 43aee033 authored by ishell's avatar ishell Committed by Commit bot

[fullcode][mips][mips64][ppc][s390] Avoid trashing of a home object when doing...

[fullcode][mips][mips64][ppc][s390] Avoid trashing of a home object when doing a keyed store to a super.

BUG=chromium:625590

Review-Url: https://codereview.chromium.org/2120963002
Cr-Commit-Position: refs/heads/master@{#37497}
parent 4f7f6aee
......@@ -1692,18 +1692,18 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
}
break;
case KEYED_SUPER_PROPERTY: {
const Register scratch = a1;
VisitForStackValue(
property->obj()->AsSuperPropertyReference()->this_var());
VisitForAccumulatorValue(
VisitForStackValue(
property->obj()->AsSuperPropertyReference()->home_object());
__ Move(scratch, result_register());
VisitForAccumulatorValue(property->key());
PushOperands(scratch, result_register());
PushOperand(result_register());
if (expr->is_compound()) {
const Register scratch1 = t0;
const Register scratch2 = a1;
__ lw(scratch1, MemOperand(sp, 2 * kPointerSize));
PushOperands(scratch1, scratch, result_register());
__ lw(scratch2, MemOperand(sp, 1 * kPointerSize));
PushOperands(scratch1, scratch2, result_register());
}
break;
}
......
......@@ -1693,18 +1693,18 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
}
break;
case KEYED_SUPER_PROPERTY: {
const Register scratch = a1;
VisitForStackValue(
property->obj()->AsSuperPropertyReference()->this_var());
VisitForAccumulatorValue(
VisitForStackValue(
property->obj()->AsSuperPropertyReference()->home_object());
__ Move(scratch, result_register());
VisitForAccumulatorValue(property->key());
PushOperands(scratch, result_register());
PushOperand(result_register());
if (expr->is_compound()) {
const Register scratch1 = a4;
const Register scratch2 = a1;
__ ld(scratch1, MemOperand(sp, 2 * kPointerSize));
PushOperands(scratch1, scratch, result_register());
__ ld(scratch2, MemOperand(sp, 1 * kPointerSize));
PushOperands(scratch1, scratch2, result_register());
}
break;
}
......
......@@ -1657,18 +1657,18 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
}
break;
case KEYED_SUPER_PROPERTY: {
const Register scratch = r4;
VisitForStackValue(
property->obj()->AsSuperPropertyReference()->this_var());
VisitForAccumulatorValue(
VisitForStackValue(
property->obj()->AsSuperPropertyReference()->home_object());
__ mr(scratch, result_register());
VisitForAccumulatorValue(property->key());
PushOperands(scratch, result_register());
PushOperand(result_register());
if (expr->is_compound()) {
const Register scratch1 = r5;
const Register scratch = r4;
__ LoadP(scratch1, MemOperand(sp, 2 * kPointerSize));
PushOperands(scratch1, scratch, result_register());
__ LoadP(scratch2, MemOperand(sp, 1 * kPointerSize));
PushOperands(scratch1, scratch2, result_register());
}
break;
}
......
......@@ -1617,18 +1617,18 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
}
break;
case KEYED_SUPER_PROPERTY: {
const Register scratch = r3;
VisitForStackValue(
property->obj()->AsSuperPropertyReference()->this_var());
VisitForAccumulatorValue(
VisitForStackValue(
property->obj()->AsSuperPropertyReference()->home_object());
__ LoadRR(scratch, result_register());
VisitForAccumulatorValue(property->key());
PushOperands(scratch, result_register());
PushOperand(result_register());
if (expr->is_compound()) {
const Register scratch1 = r4;
const Register scratch2 = r3;
__ LoadP(scratch1, MemOperand(sp, 2 * kPointerSize));
PushOperands(scratch1, scratch, result_register());
__ LoadP(scratch2, MemOperand(sp, 1 * kPointerSize));
PushOperands(scratch1, scratch2, result_register());
}
break;
}
......
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var obj = {};
function f() {}
f.prototype = {
mSloppy() {
super[obj] = 15;
}
};
new f().mSloppy();
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