Index: src/code-stubs-hydrogen.cc |
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc |
index 4be21c30da3c3173c3f660f45d49573bb6af2e5e..817a6eca57a9cbb05cfe997bf85863d37cae7dae 100644 |
--- a/src/code-stubs-hydrogen.cc |
+++ b/src/code-stubs-hydrogen.cc |
@@ -315,16 +315,18 @@ HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() { |
FastCloneShallowArrayStub::Mode mode = casted_stub()->mode(); |
int length = casted_stub()->length(); |
- HInstruction* boilerplate = |
- AddInstruction(new(zone) HLoadKeyed(GetParameter(0), |
+ HValue* literals = GetParameter(0); |
+ HInstruction* allocation_site = |
+ AddInstruction(new(zone) HLoadKeyed(literals, |
Hannes Payer (out of office)
2013/06/25 16:35:07
literals is just used there, you could just use th
mvstanton
2013/07/02 13:55:11
Done.
|
GetParameter(1), |
NULL, |
FAST_ELEMENTS)); |
- |
IfBuilder checker(this); |
- checker.IfNot<HCompareObjectEqAndBranch, HValue*>(boilerplate, undefined); |
+ checker.IfNot<HCompareObjectEqAndBranch, HValue*>(allocation_site, undefined); |
checker.Then(); |
+ HObjectAccess access = HObjectAccess::ForAllocationSiteInfoPayload(); |
+ HInstruction* boilerplate = AddLoad(allocation_site, access); |
if (mode == FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS) { |
HValue* elements = AddLoadElements(boilerplate); |
@@ -333,6 +335,7 @@ HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() { |
if_fixed_cow.Then(); |
environment()->Push(BuildCloneShallowArray(context(), |
boilerplate, |
+ allocation_site, |
alloc_site_mode, |
FAST_ELEMENTS, |
0/*copy-on-write*/)); |
@@ -343,12 +346,14 @@ HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() { |
if_fixed.Then(); |
environment()->Push(BuildCloneShallowArray(context(), |
boilerplate, |
+ allocation_site, |
alloc_site_mode, |
FAST_ELEMENTS, |
length)); |
if_fixed.Else(); |
environment()->Push(BuildCloneShallowArray(context(), |
boilerplate, |
+ allocation_site, |
alloc_site_mode, |
FAST_DOUBLE_ELEMENTS, |
length)); |
@@ -356,6 +361,7 @@ HValue* CodeStubGraphBuilder<FastCloneShallowArrayStub>::BuildCodeStub() { |
ElementsKind elements_kind = casted_stub()->ComputeElementsKind(); |
environment()->Push(BuildCloneShallowArray(context(), |
boilerplate, |
+ allocation_site, |
alloc_site_mode, |
elements_kind, |
length)); |