pub trait UllbcPass: Sync {
// Provided methods
fn transform_body(&self, _ctx: &mut TransformCtx<'_>, _body: &mut ExprBody) { ... }
fn transform_function(
&self,
ctx: &mut TransformCtx<'_>,
_decl: &mut FunDecl,
body: Result<&mut ExprBody, Opaque>,
) { ... }
fn transform_ctx(&self, ctx: &mut TransformCtx<'_>) { ... }
fn name(&self) -> &str { ... }
fn log_before_body(
&self,
ctx: &TransformCtx<'_>,
name: &Name,
body: Result<&ExprBody, &Opaque>,
) { ... }
}
Expand description
A pass that modifies ullbc bodies.
Provided Methods§
sourcefn transform_body(&self, _ctx: &mut TransformCtx<'_>, _body: &mut ExprBody)
fn transform_body(&self, _ctx: &mut TransformCtx<'_>, _body: &mut ExprBody)
Transform a body.
sourcefn transform_function(
&self,
ctx: &mut TransformCtx<'_>,
_decl: &mut FunDecl,
body: Result<&mut ExprBody, Opaque>,
)
fn transform_function( &self, ctx: &mut TransformCtx<'_>, _decl: &mut FunDecl, body: Result<&mut ExprBody, Opaque>, )
Transform a function declaration. This forwards to transform_body
by default.
sourcefn transform_ctx(&self, ctx: &mut TransformCtx<'_>)
fn transform_ctx(&self, ctx: &mut TransformCtx<'_>)
Transform the given context. This forwards to the other methods by default.
sourcefn name(&self) -> &str
fn name(&self) -> &str
The name of the pass, used for debug logging. The default implementation uses the type name.
sourcefn log_before_body(
&self,
ctx: &TransformCtx<'_>,
name: &Name,
body: Result<&ExprBody, &Opaque>,
)
fn log_before_body( &self, ctx: &TransformCtx<'_>, name: &Name, body: Result<&ExprBody, &Opaque>, )
Log that the pass is about to be run on this body.