Commit 83fbd2b5 authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

MIPS: Fix simplification of DoLoadNamedFieldPolymorphic. This is a commit of...

MIPS: Fix simplification of DoLoadNamedFieldPolymorphic.  This is a commit of https://chromiumcodereview.appspot.com/10391096/ for Akos Palfi

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11572 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 18a5298a
......@@ -2343,6 +2343,7 @@ void LCodeGen::DoLoadNamedFieldPolymorphic(LLoadNamedFieldPolymorphic* instr) {
Register object = ToRegister(instr->object());
Register result = ToRegister(instr->result());
Register scratch = scratch0();
int map_count = instr->hydrogen()->types()->length();
bool need_generic = instr->hydrogen()->need_generic();
......@@ -2357,8 +2358,8 @@ void LCodeGen::DoLoadNamedFieldPolymorphic(LLoadNamedFieldPolymorphic* instr) {
bool last = (i == map_count - 1);
Handle<Map> map = instr->hydrogen()->types()->at(i);
if (last && !need_generic) {
Handle<Map> map = instr->hydrogen()->types()->last();
DeoptimizeIf(ne, instr->environment(), scratch, Operand(map));
EmitLoadFieldOrConstantFunction(result, object, map, name);
} else {
Label next;
__ Branch(&next, ne, scratch, Operand(map));
......
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