fix setup_call_cleanup bug

This commit is contained in:
Mark Thom
2018-02-01 23:39:03 -07:00
parent 7b5a2786da
commit 9c2e8dfd72
4 changed files with 17 additions and 12 deletions

View File

@@ -494,6 +494,8 @@ fn compile_decl<'a, 'b: 'a>(wam: &'a mut Machine, tl: &'b TopLevel, queue: &'b V
return EvalSession::from(e);
};
print_code(&code);
if !code.is_empty() {
if let Some(name) = tl.name() {
wam.add_user_code(name, tl.arity(), code)