Skip to content

Commit

Permalink
Compile predicates in IR (FuelLabs#1640)
Browse files Browse the repository at this point in the history
  • Loading branch information
sezna authored May 24, 2022
1 parent b4865af commit c4eb292
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions sway-core/src/optimize.rs
Original file line number Diff line number Diff line change
@@ -24,13 +24,15 @@ pub(crate) fn compile_ast(ast: TypedParseTree) -> Result<Context, CompileError>
main_function,
declarations,
all_nodes: _,
} => compile_script(&mut ctx, main_function, &namespace, declarations),
TypedParseTree::Predicate {
namespace: _,
main_function: _,
declarations: _,
}
| TypedParseTree::Predicate {
namespace,
main_function,
declarations,
all_nodes: _,
} => unimplemented!("compile predicate to ir"),
// predicates and scripts have the same codegen, their only difference is static
// type-check time checks.
} => compile_script(&mut ctx, main_function, &namespace, declarations),
TypedParseTree::Contract {
abi_entries,
namespace,

0 comments on commit c4eb292

Please sign in to comment.