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

Unified Diff: src/heap.h

Issue 11818021: Allocation Info Tracking, continued. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: A partial delta against Toon's previous review Created 7 years, 10 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 9e26b0c5036056a2f91fc13d2d266050502ec29b..f8b33aa80bfb9f40efb1923ada014e482e8d4aba 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -592,9 +592,11 @@ class Heap {
// Please note this does not perform a garbage collection.
MUST_USE_RESULT MaybeObject* AllocateJSObject(
JSFunction* constructor,
- PretenureFlag pretenure = NOT_TENURED,
- AllocationSiteMode = DONT_TRACK_ALLOCATION_SITE,
- Handle<Object>* allocation_site_info_payload = NULL);
+ PretenureFlag pretenure = NOT_TENURED);
+
+ MUST_USE_RESULT MaybeObject* AllocateJSObjectWithAllocationSite(
+ JSFunction* constructor,
+ Handle<Object> allocation_site_info_payload);
MUST_USE_RESULT MaybeObject* AllocateJSModule(Context* context,
ScopeInfo* scope_info);
@@ -602,30 +604,38 @@ class Heap {
// Allocate a JSArray with no elements
MUST_USE_RESULT MaybeObject* AllocateEmptyJSArray(
ElementsKind elements_kind,
- AllocationSiteMode allocation_site_mode = DONT_TRACK_ALLOCATION_SITE,
- Handle<Object> *allocation_site_payload = NULL,
PretenureFlag pretenure = NOT_TENURED) {
- // TODO(mvstanton): Danno's original change does something here, but I
- // didn't include it because I don't see why we need it yet.
return AllocateJSArrayAndStorage(elements_kind, 0, 0,
- allocation_site_mode,
- allocation_site_payload,
DONT_INITIALIZE_ARRAY_ELEMENTS,
pretenure);
}
+ inline MUST_USE_RESULT MaybeObject* AllocateEmptyJSArrayWithAllocationSite(
+ ElementsKind elements_kind,
+ Handle<Object> allocation_site_payload);
+
// Allocate a JSArray with a specified length but elements that are left
// uninitialized.
MUST_USE_RESULT MaybeObject* AllocateJSArrayAndStorage(
ElementsKind elements_kind,
int length,
int capacity,
- AllocationSiteMode allocation_site_info_mode =
- DONT_TRACK_ALLOCATION_SITE,
- Handle<Object> *allocation_site_payload = NULL,
ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS,
PretenureFlag pretenure = NOT_TENURED);
+ MUST_USE_RESULT MaybeObject* AllocateJSArrayAndStorageWithAllocationSite(
+ ElementsKind elements_kind,
+ int length,
+ int capacity,
+ Handle<Object> allocation_site_payload,
+ ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS);
+
+ MUST_USE_RESULT MaybeObject* AllocateJSArrayStorage(
+ JSArray* array,
+ int length,
+ int capacity,
+ ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS);
+
// Allocate a JSArray with no elements
MUST_USE_RESULT MaybeObject* AllocateJSArrayWithElements(
FixedArrayBase* array_base,
@@ -642,9 +652,9 @@ class Heap {
// Returns a deep copy of the JavaScript object.
// Properties and elements are copied too.
// Returns failure if allocation failed.
- MUST_USE_RESULT MaybeObject* CopyJSObject(
- JSObject* source,
- AllocationSiteMode mode = DONT_TRACK_ALLOCATION_SITE);
+ MUST_USE_RESULT MaybeObject* CopyJSObject(JSObject* source);
+
+ MUST_USE_RESULT MaybeObject* CopyJSObjectWithAllocationSite(JSObject* source);
// Allocates the function prototype.
// Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
@@ -685,9 +695,10 @@ class Heap {
// failed.
// Please note this does not perform a garbage collection.
MUST_USE_RESULT MaybeObject* AllocateJSObjectFromMap(
- Map* map, PretenureFlag pretenure = NOT_TENURED,
- AllocationSiteMode mode = DONT_TRACK_ALLOCATION_SITE,
- Handle<Object>* allocation_site_info_payload = NULL);
+ Map* map, PretenureFlag pretenure = NOT_TENURED);
+
+ MUST_USE_RESULT MaybeObject* AllocateJSObjectFromMapWithAllocationSite(
+ Map* map, Handle<Object> allocation_site_info_payload);
// Allocates a heap object based on the map.
// Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
@@ -695,9 +706,8 @@ class Heap {
// Please note this function does not perform a garbage collection.
MUST_USE_RESULT MaybeObject* Allocate(Map* map, AllocationSpace space);
- MUST_USE_RESULT MaybeObject* AllocateWithAllocationSiteInfo(Map* map,
- AllocationSpace space,
- Handle<Object>* allocation_site_info_payload);
+ MUST_USE_RESULT MaybeObject* AllocateWithAllocationSite(Map* map,
+ AllocationSpace space, Handle<Object> allocation_site_info_payload);
// Allocates a JS Map in the heap.
// Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
@@ -2033,9 +2043,11 @@ class Heap {
// Allocate a JSArray with no elements
MUST_USE_RESULT MaybeObject* AllocateJSArray(
ElementsKind elements_kind,
- PretenureFlag pretenure = NOT_TENURED,
- AllocationSiteMode mode = DONT_TRACK_ALLOCATION_SITE,
- Handle<Object>* allocation_site_info_payload = NULL);
+ PretenureFlag pretenure = NOT_TENURED);
+
+ MUST_USE_RESULT MaybeObject* AllocateJSArrayWithAllocationSite(
+ ElementsKind elements_kind,
+ Handle<Object> allocation_site_info_payload);
// 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