36 if (
top().is_null()) {
41 if (FLAG_trace_creation_allocation_sites) {
42 PrintF(
"*** Creating top level AllocationSite %p\n",
43 static_cast<void*>(*scope_site));
48 if (FLAG_trace_creation_allocation_sites) {
49 PrintF(
"Creating nested site (top, current, new) (%p, %p, %p)\n",
50 static_cast<void*>(*
top()),
52 static_cast<void*>(*scope_site));
54 current()->set_nested_site(*scope_site);
65 if (!
object.is_null() && !object->IsFailure()) {
66 bool top_level = !scope_site.
is_null() &&
67 top().is_identical_to(scope_site);
69 scope_site->set_transition_info(*
object);
70 if (FLAG_trace_creation_allocation_sites) {
72 PrintF(
"*** Setting AllocationSite %p transition_info %p\n",
73 static_cast<void*>(*scope_site),
74 static_cast<void*>(*
object));
76 PrintF(
"Setting AllocationSite (%p, %p) transition_info %p\n",
77 static_cast<void*>(*
top()),
78 static_cast<void*>(*scope_site),
79 static_cast<void*>(*
object));
88 if (FLAG_allocation_site_pretenuring ||
91 if (FLAG_trace_creation_allocation_sites) {
92 PrintF(
"*** Creating Memento for %s %p\n",
93 object->IsJSArray() ?
"JSArray" :
"JSObject",
94 static_cast<void*
>(*object));
Handle< AllocationSite > EnterNewScope()
bool ShouldCreateMemento(Handle< JSObject > object)
void PrintF(const char *format,...)
Handle< AllocationSite > top()
#define ASSERT(condition)
void update_current_site(AllocationSite *site)
void InitializeTraversal(Handle< AllocationSite > site)
Handle< AllocationSite > NewAllocationSite()
static AllocationSiteMode GetMode(ElementsKind boilerplate_elements_kind)
void ExitScope(Handle< AllocationSite > site, Handle< JSObject > object)
Handle< AllocationSite > current()
static bool CanTrack(InstanceType type)