Index: src/code-stubs-hydrogen.cc |
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc |
index 8ec255b2644fff2329f069941e231cec3bb03fdc..aa3f50ddca174d6051bc089eb615b4b8728c3b09 100644 |
--- a/src/code-stubs-hydrogen.cc |
+++ b/src/code-stubs-hydrogen.cc |
@@ -437,14 +437,19 @@ HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() { |
Factory* factory = isolate()->factory(); |
HValue* undefined = graph()->GetConstantUndefined(); |
AllocationSiteMode alloc_site_mode = casted_stub()->allocation_site_mode(); |
+ HValue* closure = GetParameter(0); |
+ HValue* literal_index = GetParameter(1); |
// This stub is very performance sensitive, the generated code must be tuned |
// so that it doesn't build and eager frame. |
info()->MarkMustNotHaveEagerFrame(); |
+ HValue* literals_array = Add<HLoadNamedField>( |
+ closure, nullptr, HObjectAccess::ForLiteralsPointer()); |
+ |
HInstruction* allocation_site = Add<HLoadKeyed>( |
- GetParameter(0), GetParameter(1), nullptr, FAST_ELEMENTS, |
- NEVER_RETURN_HOLE, LiteralsArray::kOffsetToFirstLiteral - kHeapObjectTag); |
+ literals_array, literal_index, nullptr, FAST_ELEMENTS, NEVER_RETURN_HOLE, |
+ LiteralsArray::kOffsetToFirstLiteral - kHeapObjectTag); |
IfBuilder checker(this); |
checker.IfNot<HCompareObjectEqAndBranch, HValue*>(allocation_site, |
undefined); |
@@ -504,10 +509,15 @@ Handle<Code> FastCloneShallowArrayStub::GenerateCode() { |
template <> |
HValue* CodeStubGraphBuilder<FastCloneShallowObjectStub>::BuildCodeStub() { |
HValue* undefined = graph()->GetConstantUndefined(); |
+ HValue* closure = GetParameter(0); |
+ HValue* literal_index = GetParameter(1); |
+ |
+ HValue* literals_array = Add<HLoadNamedField>( |
+ closure, nullptr, HObjectAccess::ForLiteralsPointer()); |
HInstruction* allocation_site = Add<HLoadKeyed>( |
- GetParameter(0), GetParameter(1), nullptr, FAST_ELEMENTS, |
- NEVER_RETURN_HOLE, LiteralsArray::kOffsetToFirstLiteral - kHeapObjectTag); |
+ literals_array, literal_index, nullptr, FAST_ELEMENTS, NEVER_RETURN_HOLE, |
+ LiteralsArray::kOffsetToFirstLiteral - kHeapObjectTag); |
IfBuilder checker(this); |
checker.IfNot<HCompareObjectEqAndBranch, HValue*>(allocation_site, |