pub trait FusedUllbcPass: Sync {
// Provided methods
fn should_run(&self, _options: &TranslateOptions) -> bool { ... }
fn transform_body(&self, _ctx: &mut TransformCtx, _body: &mut ExprBody) { ... }
fn transform_function(&self, ctx: &mut TransformCtx, decl: &mut FunDecl) { ... }
fn name(&self) -> &str { ... }
}Expand description
A pass that modifies ullbc bodies and can be fused with previous passes so that we run all of them on a given body.
Provided Methods§
Sourcefn should_run(&self, _options: &TranslateOptions) -> bool
fn should_run(&self, _options: &TranslateOptions) -> bool
Whether the pass should run.
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)
fn transform_function(&self, ctx: &mut TransformCtx, decl: &mut FunDecl)
Transform a function declaration. This forwards to transform_body by default.
Implementors§
impl FusedUllbcPass for charon_lib::transform::control_flow::duplicate_return::Transform
impl FusedUllbcPass for charon_lib::transform::control_flow::merge_goto_chains::Transform
impl FusedUllbcPass for charon_lib::transform::normalize::filter_unreachable_blocks::Transform
impl FusedUllbcPass for charon_lib::transform::resugar::move_asserts_to_statements::Transform
impl FusedUllbcPass for charon_lib::transform::resugar::reconstruct_asserts::Transform
impl FusedUllbcPass for charon_lib::transform::resugar::reconstruct_boxes::Transform
The special alloc::boxed::box_new(x) intrinsic becomes the following:
@4 := alloc::alloc::exchange_malloc(const .., const ..)
storage_live(@5)
@5 := shallow_init_box::<i32>(move (@4))
// possibly some intermediate statements
*(@5) := xWe reconstruct this into a call to Box::new(x).