Handlify Heap::AllocateAllocationSite.

R=ishell@chromium.org

Review URL: https://codereview.chromium.org/239993003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
mstarzinger@chromium.org 2014-04-16 12:54:29 +00:00
parent 0cba01c420
commit 41f986e62b
4 changed files with 9 additions and 37 deletions

View File

@ -839,10 +839,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;
}

View File

@ -255,6 +255,7 @@ class Factory V8_FINAL {
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 @@ class Factory V8_FINAL {
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);

View File

@ -2424,16 +2424,6 @@ MaybeObject* Heap::AllocatePolymorphicCodeCache() {
}
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[] = {
#define STRING_TYPE_ELEMENT(type, size, name, camel_name) \
{type, size, k##camel_name##MapRootIndex},
@ -2745,20 +2735,6 @@ MaybeObject* Heap::AllocatePropertyCell() {
}
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,
const char* to_string,
Object* to_number,

View File

@ -773,9 +773,6 @@ class Heap {
// 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 @@ class Heap {
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.