Skip to content

Commit 17da768

Browse files
committed
set function signature
1 parent 3eb983c commit 17da768

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/compiler.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,12 @@ mod tests {
322322
let code = r#"
323323
assert(cond: bool) → void
324324
325-
id(x: i32) → i32 {
326-
x
327-
}
325+
// id(x: i32) → i32 {
326+
// x
327+
// }
328328
329329
main {
330-
let y = id(42)
330+
// let y = id(42)
331331
// assert(y == 42)
332332
}
333333
"#;

src/jit.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ impl JIT {
106106
decls: &DeclTable,
107107
decl: &FuncDecl,
108108
) -> Result<cranelift_module::FuncId, String> {
109-
// self.ctx.func.signature =
109+
self.ctx.func.signature = fn_sig(&self.module,
110+
decl.domain(),
111+
decl.ret);
110112

111113
let called_functions = self.function_body(decls, decl);
112114

0 commit comments

Comments
 (0)