From 9ba744078223d73a86fbc0d6cbe22b6e13ffdc40 Mon Sep 17 00:00:00 2001 From: Daniel Kochmanski Date: Mon, 9 Oct 2017 22:45:50 +0200 Subject: [PATCH] bytecmp: be smart wrt bytecompiled code bytecompiled functions may not have a name (i.e lambda assigned to smothing). Recognize that fact, so when we read back such functions from file we can call bc-compile on them. Fixes #313. --- src/c/cfun.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/c/cfun.d b/src/c/cfun.d index e1f550523..4eea0be0e 100644 --- a/src/c/cfun.d +++ b/src/c/cfun.d @@ -130,9 +130,9 @@ cl_function_lambda_expression(cl_object fun) case t_bytecodes: name = fun->bytecodes.name; output = fun->bytecodes.definition; - if (name == ECL_NIL) + if (name == ECL_NIL && output != ECL_NIL) output = cl_cons(@'lambda', output); - else if (name != @'si::bytecodes') + else if (name != @'si::bytecodes' && output != ECL_NIL) output = @list*(3, @'ext::lambda-block', name, output); break; case t_cfun: