diff options
Diffstat (limited to 'deps/v8/src/compiler/allocation-builder.h')
-rw-r--r-- | deps/v8/src/compiler/allocation-builder.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/deps/v8/src/compiler/allocation-builder.h b/deps/v8/src/compiler/allocation-builder.h index a0ba02cd33..86fea33090 100644 --- a/deps/v8/src/compiler/allocation-builder.h +++ b/deps/v8/src/compiler/allocation-builder.h @@ -48,6 +48,16 @@ class AllocationBuilder final { index, value, effect_, control_); } + // Compound allocation of a context. + void AllocateContext(int length, Handle<Map> map) { + DCHECK(map->instance_type() >= BLOCK_CONTEXT_TYPE && + map->instance_type() <= WITH_CONTEXT_TYPE); + int size = FixedArray::SizeFor(length); + Allocate(size, NOT_TENURED, Type::OtherInternal()); + Store(AccessBuilder::ForMap(), map); + Store(AccessBuilder::ForFixedArrayLength(), jsgraph()->Constant(length)); + } + // Compound allocation of a FixedArray. void AllocateArray(int length, Handle<Map> map, PretenureFlag pretenure = NOT_TENURED) { |