Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth committed Sep 30, 2024
1 parent c0fcc59 commit a8b1406
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions jit-compiler/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ impl<'a, T: FieldElement> CodeGenerator<'a, T> {
"({})",
items
.iter()
.map(|i| self.format_expr(i))
.collect::<Result<Vec<_>, _>>()?
.map(|i| Ok(format!("({}.clone())", self.format_expr(i)?)))
.collect::<Result<Vec<_>, String>>()?
.join(", ")
),
Expression::BlockExpression(_, BlockExpression { statements, expr }) => {
Expand Down
8 changes: 7 additions & 1 deletion jit-compiler/tests/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ use powdr_pil_analyzer::analyze_string;

fn compile(input: &str, symbol: &str) -> LoadedFunction {
let analyzed = analyze_string::<GoldilocksField>(input).unwrap();
powdr_jit_compiler::compile(&analyzed, &[symbol]).unwrap()[symbol].clone()
powdr_jit_compiler::compile(&analyzed, &[symbol])
.map_err(|e| {
eprintln!("Error jit-compiling:\n{e}");
e
})
.unwrap()[symbol]
.clone()
}

#[test]
Expand Down

0 comments on commit a8b1406

Please sign in to comment.