Revision: 20805
Author:   [email protected]
Date:     Wed Apr 16 12:54:29 2014 UTC
Log:      Handlify Heap::AllocateAllocationSite.

[email protected]

Review URL: https://codereview.chromium.org/239993003
http://code.google.com/p/v8/source/detail?r=20805

Modified:
 /branches/bleeding_edge/src/factory.cc
 /branches/bleeding_edge/src/factory.h
 /branches/bleeding_edge/src/heap.cc
 /branches/bleeding_edge/src/heap.h

=======================================
--- /branches/bleeding_edge/src/factory.cc      Wed Apr 16 12:10:56 2014 UTC
+++ /branches/bleeding_edge/src/factory.cc      Wed Apr 16 12:54:29 2014 UTC
@@ -839,10 +839,14 @@


 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;
 }


=======================================
--- /branches/bleeding_edge/src/factory.h       Wed Apr 16 12:10:56 2014 UTC
+++ /branches/bleeding_edge/src/factory.h       Wed Apr 16 12:54:29 2014 UTC
@@ -255,6 +255,7 @@

   Handle<PropertyCell> NewPropertyCell(Handle<Object> value);

+  // Allocate a tenured AllocationSite. It's payload is null.
   Handle<AllocationSite> NewAllocationSite();

   Handle<Map> NewMap(
@@ -325,9 +326,6 @@
       bool allocate_properties = true,
Handle<AllocationSite> allocation_site = Handle<AllocationSite>::null());

-  Handle<JSObject> NewJSObjectFromMapForDeoptimizer(
-      Handle<Map> map, PretenureFlag pretenure = NOT_TENURED);
-
   // JS modules are pretenured.
   Handle<JSModule> NewJSModule(Handle<Context> context,
                                Handle<ScopeInfo> scope_info);
=======================================
--- /branches/bleeding_edge/src/heap.cc Wed Apr 16 11:38:56 2014 UTC
+++ /branches/bleeding_edge/src/heap.cc Wed Apr 16 12:54:29 2014 UTC
@@ -2422,16 +2422,6 @@
 MaybeObject* Heap::AllocatePolymorphicCodeCache() {
   return AllocateStruct(POLYMORPHIC_CODE_CACHE_TYPE);
 }
-
-
-MaybeObject* Heap::AllocateAliasedArgumentsEntry(int aliased_context_slot) {
-  AliasedArgumentsEntry* entry;
- { MaybeObject* maybe_entry = AllocateStruct(ALIASED_ARGUMENTS_ENTRY_TYPE);
-    if (!maybe_entry->To(&entry)) return maybe_entry;
-  }
-  entry->set_aliased_context_slot(aliased_context_slot);
-  return entry;
-}


 const Heap::StringTypeTable Heap::string_type_table[] = {
@@ -2743,20 +2733,6 @@
   cell->set_type(HeapType::None());
   return result;
 }
-
-
-MaybeObject* Heap::AllocateAllocationSite() {
-  AllocationSite* site;
-  MaybeObject* maybe_result = Allocate(allocation_site_map(),
-                                       OLD_POINTER_SPACE);
-  if (!maybe_result->To(&site)) return maybe_result;
-  site->Initialize();
-
-  // Link the site
-  site->set_weak_next(allocation_sites_list());
-  set_allocation_sites_list(site);
-  return site;
-}


 MaybeObject* Heap::CreateOddball(Map* map,
=======================================
--- /branches/bleeding_edge/src/heap.h  Wed Apr 16 11:38:56 2014 UTC
+++ /branches/bleeding_edge/src/heap.h  Wed Apr 16 12:54:29 2014 UTC
@@ -773,9 +773,6 @@
   // Allocates an empty PolymorphicCodeCache.
   MUST_USE_RESULT MaybeObject* AllocatePolymorphicCodeCache();

-  // Allocates an AliasedArgumentsEntry.
-  MUST_USE_RESULT MaybeObject* AllocateAliasedArgumentsEntry(int slot);
-
   // Clear the Instanceof cache (used when a prototype changes).
   inline void ClearInstanceofCache();

@@ -907,9 +904,6 @@
   MUST_USE_RESULT MaybeObject* AllocateSymbol();
   MUST_USE_RESULT MaybeObject* AllocatePrivateSymbol();

-  // Allocate a tenured AllocationSite. It's payload is null
-  MUST_USE_RESULT MaybeObject* AllocateAllocationSite();
-
   // Allocates a fixed array initialized with undefined values
// Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
   // failed.

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to