Index: src/ic/arm64/handler-compiler-arm64.cc |
diff --git a/src/ic/arm64/handler-compiler-arm64.cc b/src/ic/arm64/handler-compiler-arm64.cc |
index 87edcd269a871824ca8ebde3c1b3ae0525404e1a..3a6d156943aa8f4e1f23224ffccd2ca81608aa01 100644 |
--- a/src/ic/arm64/handler-compiler-arm64.cc |
+++ b/src/ic/arm64/handler-compiler-arm64.cc |
@@ -178,14 +178,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: |
__ Mov(holder, receiver); |
break; |
case CallOptimization::kHolderFound: |
- __ LoadObject(holder, api_holder); |
+ __ Ldr(holder, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
+ __ Ldr(holder, FieldMemOperand(holder, Map::kPrototypeOffset)); |
+ for (int i = 1; i < holder_depth; i++) { |
+ __ Ldr(holder, FieldMemOperand(holder, HeapObject::kMapOffset)); |
+ __ Ldr(holder, FieldMemOperand(holder, Map::kPrototypeOffset)); |
+ } |
break; |
case CallOptimization::kHolderNotFound: |
UNREACHABLE(); |