Chromium Code Reviews| Index: src/heap.h |
| diff --git a/src/heap.h b/src/heap.h |
| index 42546af5d3e4c6aa0f663903226544a0af884cb8..6d74076689ab65f74c7d2059d27ae863f1080154 100644 |
| --- a/src/heap.h |
| +++ b/src/heap.h |
| @@ -588,7 +588,10 @@ class Heap { |
| // failed. |
| // Please note this does not perform a garbage collection. |
| MUST_USE_RESULT MaybeObject* AllocateJSObject( |
| - JSFunction* constructor, PretenureFlag pretenure = NOT_TENURED); |
| + JSFunction* constructor, |
| + PretenureFlag pretenure = NOT_TENURED, |
| + AllocationSiteMode = DONT_TRACK_ALLOCATION_SITE, |
| + Handle<Object>* allocation_site_info_payload = NULL); |
| MUST_USE_RESULT MaybeObject* AllocateJSModule(Context* context, |
| ScopeInfo* scope_info); |
| @@ -596,8 +599,14 @@ 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. |
|
Toon Verwaest
2013/02/13 15:14:51
Outdated comment?
mvstanton
2013/02/19 11:04:08
yep, thx!
|
| return AllocateJSArrayAndStorage(elements_kind, 0, 0, |
| + allocation_site_mode, |
| + allocation_site_payload, |
| DONT_INITIALIZE_ARRAY_ELEMENTS, |
| pretenure); |
| } |
| @@ -608,6 +617,9 @@ class Heap { |
| 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); |
| @@ -670,7 +682,9 @@ class Heap { |
| // failed. |
| // Please note this does not perform a garbage collection. |
| MUST_USE_RESULT MaybeObject* AllocateJSObjectFromMap( |
| - Map* map, PretenureFlag pretenure = NOT_TENURED); |
| + Map* map, PretenureFlag pretenure = NOT_TENURED, |
| + AllocationSiteMode mode = DONT_TRACK_ALLOCATION_SITE, |
| + Handle<Object>* allocation_site_info_payload = NULL); |
| // Allocates a heap object based on the map. |
| // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| @@ -678,6 +692,10 @@ 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); |
| + |
| // Allocates a JS Map in the heap. |
| // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| // failed. |
| @@ -2015,7 +2033,9 @@ class Heap { |
| // Allocate a JSArray with no elements |
| MUST_USE_RESULT MaybeObject* AllocateJSArray( |
| ElementsKind elements_kind, |
| - PretenureFlag pretenure = NOT_TENURED); |
| + PretenureFlag pretenure = NOT_TENURED, |
| + AllocationSiteMode mode = DONT_TRACK_ALLOCATION_SITE, |
| + Handle<Object>* allocation_site_info_payload = NULL); |
| // Allocate empty fixed array. |
| MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray(); |