Index: src/ic/mips64/handler-compiler-mips64.cc |
diff --git a/src/ic/mips64/handler-compiler-mips64.cc b/src/ic/mips64/handler-compiler-mips64.cc |
index e82073fe76c504dd52fe2c44615e1eef9c2f146e..5e7814c8154ba45c7fabbd820092d8b6f28b3f35 100644 |
--- a/src/ic/mips64/handler-compiler-mips64.cc |
+++ b/src/ic/mips64/handler-compiler-mips64.cc |
@@ -260,14 +260,20 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall( |
// Put holder in place. |
CallOptimization::HolderLookup holder_lookup; |
- Handle<JSObject> api_holder = |
- optimization.LookupHolderOfExpectedType(receiver_map, &holder_lookup); |
+ int holder_depth = 0; |
+ optimization.LookupHolderOfExpectedType(receiver_map, &holder_lookup, |
+ &holder_depth); |
switch (holder_lookup) { |
case CallOptimization::kHolderIsReceiver: |
__ Move(holder, receiver); |
break; |
case CallOptimization::kHolderFound: |
- __ li(holder, api_holder); |
+ __ ld(holder, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
+ __ ld(holder, FieldMemOperand(holder, Map::kPrototypeOffset)); |
+ for (int i = 1; i < holder_depth; i++) { |
+ __ ld(holder, FieldMemOperand(holder, HeapObject::kMapOffset)); |
+ __ ld(holder, FieldMemOperand(holder, Map::kPrototypeOffset)); |
+ } |
break; |
case CallOptimization::kHolderNotFound: |
UNREACHABLE(); |