Skip to content

Commit 2108a5a

Browse files
committed
Return null in stdlib functions
1 parent f9b0822 commit 2108a5a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/lang/stdlib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,18 @@ pub fn compile_stdlib_module() -> Module {
1111
1,
1212
));
1313
module.opcodes.push(Opcode::Vmcall(1));
14+
module.opcodes.push(Opcode::Loadcnu());
1415
module.opcodes.push(Opcode::Ret());
16+
1517
module.functions.push(ModuleFunction::new(
1618
"println".into(),
1719
module.opcodes.len() as u32,
1820
1,
1921
));
2022
module.opcodes.push(Opcode::Vmcall(2));
23+
module.opcodes.push(Opcode::Loadcnu());
2124
module.opcodes.push(Opcode::Ret());
25+
2226
module.functions.push(ModuleFunction::new(
2327
"get_string".into(),
2428
module.opcodes.len() as u32,

0 commit comments

Comments
 (0)