pub struct AllocationScope<'gcl, 'ast, 'ctx> { /* private fields */ }Expand description
RAII allocation scope over the arena: everything allocated (nodes AND
list elements) between construction and drop is reclaimed at drop, with
bump-allocator save/restore semantics. Port of the C++ AllocationScope
(hermes/Support/Allocator.h:500-521) as used by the parser’s PreParse
pass (JSParserImpl.cpp:548, 7523).
See GCLock::alloc_scope for the safety contract.
Trait Implementations§
Source§impl Drop for AllocationScope<'_, '_, '_>
impl Drop for AllocationScope<'_, '_, '_>
Auto Trait Implementations§
impl<'gcl, 'ast, 'ctx> !RefUnwindSafe for AllocationScope<'gcl, 'ast, 'ctx>
impl<'gcl, 'ast, 'ctx> !Send for AllocationScope<'gcl, 'ast, 'ctx>
impl<'gcl, 'ast, 'ctx> !Sync for AllocationScope<'gcl, 'ast, 'ctx>
impl<'gcl, 'ast, 'ctx> !UnwindSafe for AllocationScope<'gcl, 'ast, 'ctx>
impl<'gcl, 'ast, 'ctx> Freeze for AllocationScope<'gcl, 'ast, 'ctx>
impl<'gcl, 'ast, 'ctx> Unpin for AllocationScope<'gcl, 'ast, 'ctx>
impl<'gcl, 'ast, 'ctx> UnsafeUnpin for AllocationScope<'gcl, 'ast, 'ctx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more