Index: src/ic.cc |
diff --git a/src/ic.cc b/src/ic.cc |
index 846d361c089a593398aadf32c10b818737f56fa6..31a2840618c437e7523d60b7435366babca3fb66 100644 |
--- a/src/ic.cc |
+++ b/src/ic.cc |
@@ -1064,13 +1064,16 @@ Handle<Code> LoadIC::CompileHandler(LookupIterator* lookup, |
if (receiver_is_holder) { |
return SimpleFieldLoad(field); |
} |
- return compiler.CompileLoadField(name, field, lookup->representation()); |
+ return compiler.CompileLoadField(name, field); |
} |
// -------------- Constant properties -------------- |
DCHECK(lookup->property_details().type() == CONSTANT); |
- Handle<Object> constant = lookup->GetDataValue(); |
- return compiler.CompileLoadConstant(name, constant); |
+ if (receiver_is_holder) { |
+ LoadConstantStub stub(isolate(), lookup->GetConstantIndex()); |
+ return stub.GetCode(); |
+ } |
+ return compiler.CompileLoadConstant(name, lookup->GetConstantIndex()); |
} |