Reviewers: danno, Paul Lind, kisg, kilvadyb,
Description:
MIPS: Remove extranous holder load in some prototype-chain checking cases
Port r14136 (d091bc0e)
BUG=
Please review this at
https://codereview.chromium.org/13636002/
SVN Base:
https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/mips/lithium-codegen-mips.cc
M src/mips/lithium-mips.h
M src/mips/lithium-mips.cc
Index: src/mips/lithium-codegen-mips.cc
diff --git a/src/mips/lithium-codegen-mips.cc
b/src/mips/lithium-codegen-mips.cc
index
b5d6c451f8d57ba153e9f216bcde42b15256c2f4..95a1e05d1e67bdda228f381f572c1ab10469f44f
100644
--- a/src/mips/lithium-codegen-mips.cc
+++ b/src/mips/lithium-codegen-mips.cc
@@ -5207,7 +5207,6 @@ void LCodeGen::DoClampTToUint8(LClampTToUint8* instr)
{
void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
- ASSERT(instr->temp()->Equals(instr->result()));
Register prototype_reg = ToRegister(instr->temp());
Register map_reg = ToRegister(instr->temp2());
@@ -5220,8 +5219,6 @@ void
LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
for (int i = 0; i < maps->length(); i++) {
prototype_maps_.Add(maps->at(i), info()->zone());
}
- __ LoadHeapObject(prototype_reg,
- prototypes->at(prototypes->length() - 1));
} else {
for (int i = 0; i < prototypes->length(); i++) {
__ LoadHeapObject(prototype_reg, prototypes->at(i));
Index: src/mips/lithium-mips.cc
diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc
index
652c7cad079c0a21122c3fda060d9eb551abdd19..7a2975a3695df277f9c721127e3ae69f55ef1941
100644
--- a/src/mips/lithium-mips.cc
+++ b/src/mips/lithium-mips.cc
@@ -1807,7 +1807,7 @@ LInstruction*
LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) {
LUnallocated* temp1 = TempRegister();
LOperand* temp2 = TempRegister();
LCheckPrototypeMaps* result = new(zone()) LCheckPrototypeMaps(temp1,
temp2);
- return AssignEnvironment(Define(result, temp1));
+ return AssignEnvironment(result);
}
Index: src/mips/lithium-mips.h
diff --git a/src/mips/lithium-mips.h b/src/mips/lithium-mips.h
index
e99590545e24c36a2924031a2cca0cb8c60fdcf5..8d8cb588cec1fdf21d930bdb26b3ff21a3232311
100644
--- a/src/mips/lithium-mips.h
+++ b/src/mips/lithium-mips.h
@@ -2184,7 +2184,7 @@ class LCheckMaps: public LTemplateInstruction<0, 1,
0> {
};
-class LCheckPrototypeMaps: public LTemplateInstruction<1, 0, 2> {
+class LCheckPrototypeMaps: public LTemplateInstruction<0, 0, 2> {
public:
LCheckPrototypeMaps(LOperand* temp, LOperand* temp2) {
temps_[0] = temp;