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

Unified Diff: src/factory.cc

Issue 239993003: Handlify Heap::AllocateAllocationSite. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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/factory.h ('k') | src/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 3c76e5467c970b410371f1b03802909b2556b292..2b213e85adc7b1b4b4869f2b390c2c4e5c65371d 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -830,10 +830,14 @@ Handle<PropertyCell> Factory::NewPropertyCell(Handle<Object> value) {
Handle<AllocationSite> Factory::NewAllocationSite() {
- CALL_HEAP_FUNCTION(
- isolate(),
- isolate()->heap()->AllocateAllocationSite(),
- AllocationSite);
+ Handle<Map> map = allocation_site_map();
+ Handle<AllocationSite> site = New<AllocationSite>(map, OLD_POINTER_SPACE);
+ site->Initialize();
+
+ // Link the site
+ site->set_weak_next(isolate()->heap()->allocation_sites_list());
+ isolate()->heap()->set_allocation_sites_list(*site);
+ return site;
}
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698