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

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

Issue 23567003: Added a DependentCode field to AllocationSite. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 7 years, 3 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 | « no previous file | src/heap-snapshot-generator.cc » ('j') | src/objects-inl.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 1a6ae007ba6278701313b8e68bc29e229d92dd12..3e00f15bc1a5553f2274445b43c83a4b224acc30 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -474,14 +474,27 @@ HValue* CodeStubGraphBuilder<CreateAllocationSiteStub>::BuildCodeStub() {
HObjectAccess::ForAllocationSiteTransitionInfo(),
initial_elements_kind);
+ // Store an empty fixed array for the code dependency.
+ HConstant* empty_fixed_array =
+ Add<HConstant>(isolate()->factory()->empty_fixed_array());
+ ASSERT(!isolate()->heap()->InNewSpace(
+ isolate()->heap()->empty_fixed_array()));
Michael Starzinger 2013/09/19 13:56:17 nit: Let's drop this assert, see comment below.
mvstanton 2013/09/19 14:06:11 Done.
+ HStoreNamedField* store = Add<HStoreNamedField>(
+ object,
+ HObjectAccess::ForAllocationSiteDependentCode(),
+ empty_fixed_array);
+ // SkipWriteBarrier because we just created this object, and because
+ // empty_fixed_array won't be in new space
+ store->SkipWriteBarrier();
Michael Starzinger 2013/09/19 13:56:17 We should just add the empty fixed array to the li
mvstanton 2013/09/19 14:06:11 Right on, done!
+
// Link the object to the allocation site list
HValue* site_list = Add<HConstant>(
ExternalReference::allocation_sites_list_address(isolate()));
HValue* site = Add<HLoadNamedField>(site_list,
HObjectAccess::ForAllocationSiteList());
- HStoreNamedField* store =
- Add<HStoreNamedField>(object, HObjectAccess::ForAllocationSiteWeakNext(),
- site);
+ store = Add<HStoreNamedField>(object,
+ HObjectAccess::ForAllocationSiteWeakNext(),
+ site);
store->SkipWriteBarrier();
Add<HStoreNamedField>(site_list, HObjectAccess::ForAllocationSiteList(),
object);
« no previous file with comments | « no previous file | src/heap-snapshot-generator.cc » ('j') | src/objects-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698