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

Unified Diff: src/heap.h

Issue 15094018: Create AllocationSite objects, pointed to by AllocationSiteInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comment response Created 7 years, 5 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.cc ('k') | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
diff --git a/src/heap.h b/src/heap.h
index d6f41a84ebd9b2c74f1d1c18afb0356bd85ff5e9..4bc2d307eb20b97b89578c40cb2164d388322785 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -232,6 +232,7 @@ namespace internal {
V(last_index_string, "lastIndex") \
V(object_string, "object") \
V(payload_string, "payload") \
+ V(literals_string, "literals") \
V(prototype_string, "prototype") \
V(string_string, "string") \
V(String_string, "String") \
@@ -658,7 +659,7 @@ class Heap {
MUST_USE_RESULT MaybeObject* AllocateJSObjectWithAllocationSite(
JSFunction* constructor,
- Handle<Object> allocation_site_info_payload);
+ Handle<AllocationSite> allocation_site);
MUST_USE_RESULT MaybeObject* AllocateJSGeneratorObject(
JSFunction* function);
@@ -677,7 +678,7 @@ class Heap {
inline MUST_USE_RESULT MaybeObject* AllocateEmptyJSArrayWithAllocationSite(
ElementsKind elements_kind,
- Handle<Object> allocation_site_payload);
+ Handle<AllocationSite> allocation_site);
// Allocate a JSArray with a specified length but elements that are left
// uninitialized.
@@ -692,7 +693,7 @@ class Heap {
ElementsKind elements_kind,
int length,
int capacity,
- Handle<Object> allocation_site_payload,
+ Handle<AllocationSite> allocation_site,
ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS);
MUST_USE_RESULT MaybeObject* AllocateJSArrayStorage(
@@ -719,7 +720,8 @@ class Heap {
// Returns failure if allocation failed.
MUST_USE_RESULT MaybeObject* CopyJSObject(JSObject* source);
- MUST_USE_RESULT MaybeObject* CopyJSObjectWithAllocationSite(JSObject* source);
+ MUST_USE_RESULT MaybeObject* CopyJSObjectWithAllocationSite(
+ JSObject* source, AllocationSite* site);
// Allocates the function prototype.
// Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
@@ -769,7 +771,7 @@ class Heap {
Map* map, PretenureFlag pretenure = NOT_TENURED);
MUST_USE_RESULT MaybeObject* AllocateJSObjectFromMapWithAllocationSite(
- Map* map, Handle<Object> allocation_site_info_payload);
+ Map* map, Handle<AllocationSite> allocation_site);
// Allocates a heap object based on the map.
// Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
@@ -778,7 +780,7 @@ class Heap {
MUST_USE_RESULT MaybeObject* Allocate(Map* map, AllocationSpace space);
MUST_USE_RESULT MaybeObject* AllocateWithAllocationSite(Map* map,
- AllocationSpace space, Handle<Object> allocation_site_info_payload);
+ AllocationSpace space, Handle<AllocationSite> allocation_site);
// Allocates a JS Map in the heap.
// Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
@@ -956,6 +958,9 @@ class Heap {
MUST_USE_RESULT MaybeObject* AllocateBox(Object* value,
PretenureFlag pretenure);
+ // 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.
@@ -2159,7 +2164,7 @@ class Heap {
MUST_USE_RESULT MaybeObject* AllocateJSArrayWithAllocationSite(
ElementsKind elements_kind,
- Handle<Object> allocation_site_info_payload);
+ Handle<AllocationSite> allocation_site);
// Allocate empty fixed array.
MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray();
« no previous file with comments | « src/factory.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698