Index: src/ic/ia32/handler-compiler-ia32.cc |
diff --git a/src/ic/ia32/handler-compiler-ia32.cc b/src/ic/ia32/handler-compiler-ia32.cc |
index c7f683fd5b60f8f2400ba9888bebd4a90d6d5582..65adbff48eb683766c22b9425a50d199f3e9dd12 100644 |
--- a/src/ic/ia32/handler-compiler-ia32.cc |
+++ b/src/ic/ia32/handler-compiler-ia32.cc |
@@ -175,14 +175,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: |
- __ LoadHeapObject(holder, api_holder); |
+ __ mov(holder, FieldOperand(receiver, HeapObject::kMapOffset)); |
+ __ mov(holder, FieldOperand(holder, Map::kPrototypeOffset)); |
+ for (int i = 1; i < holder_depth; i++) { |
+ __ mov(holder, FieldOperand(holder, HeapObject::kMapOffset)); |
+ __ mov(holder, FieldOperand(holder, Map::kPrototypeOffset)); |
+ } |
break; |
case CallOptimization::kHolderNotFound: |
UNREACHABLE(); |