correct allocation bugs.

This commit is contained in:
Mark Thom
2018-02-11 12:03:13 -07:00
parent e7560150b0
commit 54e36f0d24
2 changed files with 3 additions and 3 deletions

View File

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