HValue* dominator) {
ASSERT(side_effect == kChangesNewSpacePromotion);
Zone* zone = block()->zone();
- if (!FLAG_use_allocation_folding ||
- isolate()->heap_profiler()->is_tracking_allocations()) {
- return;
- }
+ if (!FLAG_use_allocation_folding) return;
// Try to fold allocations together with their dominating allocations.
if (!dominator->IsAllocate()) {
PretenureFlag pretenure_flag,
InstanceType instance_type) {
return new(zone) HAllocate(context, size, type, pretenure_flag,
- instance_type, zone);
+ instance_type);
}
// Maximum instance size for which allocations will be inlined.
HValue* size,
HType type,
PretenureFlag pretenure_flag,
- InstanceType instance_type,
- Zone* zone)
+ InstanceType instance_type)
: HTemplateInstruction<2>(type),
dominating_allocate_(NULL),
filler_free_space_size_(NULL),
// other, i.e., have a pointer to each other. A GC in between these
// allocations may leave such objects behind in a not completely initialized
// state.
- if (!FLAG_use_gvn || !FLAG_use_allocation_folding ||
- zone->isolate()->heap_profiler()->is_tracking_allocations()) {
+ if (!FLAG_use_gvn || !FLAG_use_allocation_folding) {
flags_ = static_cast<HAllocate::Flags>(flags_ | PREFILL_WITH_FILLER);
}
clear_next_map_word_ = pretenure_flag == NOT_TENURED &&
" a.shift();\n"
"findUntrackedObjects();\n");
}
-
-
-// If we don't disable allocation folding when allocations tracking is on, we
-// may have untracked allocations.
-TEST(DisableAllocationFolding) {
- LocalContext env;
- v8::HandleScope scope(env->GetIsolate());
- HeapObjectsTracker tracker;
- CompileRun(
- "function literal() {"
- " return [1];"
- "}"
- "function modify_literal(literal, v) {"
- " literal[0] = v;"
- " return literal;"
- "}"
- "obj = modify_literal(literal(), 1);"
- "obj = modify_literal(literal(), 1.5);"
- "obj = modify_literal(literal(), 1);");
-}