Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(721)

Unified Diff: src/code-stubs-hydrogen.cc

Issue 15094018: Create AllocationSite objects, pointed to by AllocationSiteInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Some cleanup Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs.cc ('k') | src/factory.h » ('j') | src/flag-definitions.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « src/code-stubs.cc ('k') | src/factory.h » ('j') | src/flag-definitions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698