Chromium Code Reviews| Index: src/heap.h |
| diff --git a/src/heap.h b/src/heap.h |
| index 2645d27f45792888b21f90932c475a5d88ce8c1e..cafb4ea51724ab1c9e06f8134ce88fd15d490a85 100644 |
| --- a/src/heap.h |
| +++ b/src/heap.h |
| @@ -683,14 +683,14 @@ class Heap { |
| // constructor. |
| // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| // failed. |
| + // If allocation_site is non-null, then a memento is emitted after the object |
| + // that points to the site. allocation_site does not influence the |
| + // pretenure state. |
|
Hannes Payer (out of office)
2014/02/19 21:29:07
What do you mean by "does not influence the preten
mvstanton
2014/02/26 09:47:41
I mean that the AllocationSite is not mined for in
Hannes Payer (out of office)
2014/03/03 17:03:46
Just drop the "allocation_site does not influence
mvstanton
2014/03/04 09:52:02
Done.
|
| // Please note this does not perform a garbage collection. |
| MUST_USE_RESULT MaybeObject* AllocateJSObject( |
| JSFunction* constructor, |
| - PretenureFlag pretenure = NOT_TENURED); |
| - |
| - MUST_USE_RESULT MaybeObject* AllocateJSObjectWithAllocationSite( |
| - JSFunction* constructor, |
| - Handle<AllocationSite> allocation_site); |
| + PretenureFlag pretenure = NOT_TENURED, |
| + AllocationSite* allocation_site = NULL); |
|
Hannes Payer (out of office)
2014/02/19 21:29:07
What about implementing an AllocationMode, similar
Hannes Payer (out of office)
2014/02/19 21:29:07
Why did you get rid of the Handle?
mvstanton
2014/02/26 09:47:41
Because it's not a handlefied method and the other
mvstanton
2014/02/26 09:47:41
I am thinking small with this CL, focused on elimi
Hannes Payer (out of office)
2014/03/03 17:03:46
OK, I guess we should implement an AllocationMode
mvstanton
2014/03/04 09:52:02
yep, thanks, will be done.
|
| MUST_USE_RESULT MaybeObject* AllocateJSModule(Context* context, |
| ScopeInfo* scope_info); |
| @@ -770,21 +770,21 @@ class Heap { |
| // Allocates and initializes a new JavaScript object based on a map. |
| // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| // failed. |
| + // Passing an allocation site means that a memento will be created that |
| + // points to the site. It doesn't influence pretenure state. |
|
Hannes Payer (out of office)
2014/02/19 21:29:07
same comments as above
mvstanton
2014/02/26 09:47:41
Indeed. And probably the fact that I have to expla
Hannes Payer (out of office)
2014/03/03 17:03:46
Just drop the "It doesn't influence pretenure stat
mvstanton
2014/03/04 09:52:02
Done.
|
| // Please note this does not perform a garbage collection. |
| MUST_USE_RESULT MaybeObject* AllocateJSObjectFromMap( |
| - Map* map, PretenureFlag pretenure = NOT_TENURED, bool alloc_props = true); |
| - |
| - MUST_USE_RESULT MaybeObject* AllocateJSObjectFromMapWithAllocationSite( |
| - Map* map, Handle<AllocationSite> allocation_site); |
| + Map* map, |
| + PretenureFlag pretenure = NOT_TENURED, |
| + bool alloc_props = true, |
| + AllocationSite* allocation_site = NULL); |
| // Allocates a heap object based on the map. |
| // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| // failed. |
| // Please note this function does not perform a garbage collection. |
| - MUST_USE_RESULT MaybeObject* Allocate(Map* map, AllocationSpace space); |
| - |
| - MUST_USE_RESULT MaybeObject* AllocateWithAllocationSite(Map* map, |
| - AllocationSpace space, Handle<AllocationSite> allocation_site); |
| + MUST_USE_RESULT MaybeObject* Allocate(Map* map, AllocationSpace space, |
| + AllocationSite* allocation_site = NULL); |
| // Allocates a JS Map in the heap. |
| // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |