Struct tvix_eval::observer::DisassemblingObserver
source · pub struct DisassemblingObserver<W: Write> {
source: SourceCode,
writer: TabWriter<W>,
}
Expand description
An observer that prints disassembled chunk information to its internal writer whenwever the compiler emits a toplevel function, closure or thunk.
Fields§
§source: SourceCode
§writer: TabWriter<W>
Implementations§
source§impl<W: Write> DisassemblingObserver<W>
impl<W: Write> DisassemblingObserver<W>
pub fn new(source: SourceCode, writer: W) -> Self
fn lambda_header(&mut self, kind: &str, lambda: &Rc<Lambda>)
fn disassemble_chunk(&mut self, chunk: &Chunk)
Trait Implementations§
source§impl<W: Write> CompilerObserver for DisassemblingObserver<W>
impl<W: Write> CompilerObserver for DisassemblingObserver<W>
source§fn observe_compiled_toplevel(&mut self, lambda: &Rc<Lambda>)
fn observe_compiled_toplevel(&mut self, lambda: &Rc<Lambda>)
Called when the compiler finishes compilation of the top-level
of an expression (usually the root Nix expression of a file).
source§fn observe_compiled_lambda(&mut self, lambda: &Rc<Lambda>)
fn observe_compiled_lambda(&mut self, lambda: &Rc<Lambda>)
Called when the compiler finishes compilation of a
user-defined function. Read more
source§fn observe_compiled_thunk(&mut self, lambda: &Rc<Lambda>)
fn observe_compiled_thunk(&mut self, lambda: &Rc<Lambda>)
Called when the compiler finishes compilation of a thunk.
Auto Trait Implementations§
impl<W> Freeze for DisassemblingObserver<W>where
W: Freeze,
impl<W> !RefUnwindSafe for DisassemblingObserver<W>
impl<W> !Send for DisassemblingObserver<W>
impl<W> !Sync for DisassemblingObserver<W>
impl<W> Unpin for DisassemblingObserver<W>where
W: Unpin,
impl<W> !UnwindSafe for DisassemblingObserver<W>
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more