<html><head></head><body>Hej, I believe I've fixed this bug recently. Could you check with the git head version?<br>
<br>
Regards, Daniel<br><br><div class="gmail_quote">Dnia 7 kwietnia 2016 23:36:59 CEST, Tomas Hlavaty <tom@logand.com> napisaƂ(a):<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Hi,<br /><br />I was curious how far would ecl get when compiling sbcl and found that<br />ecl seems to struggle with compiling local functions (error log bellow).<br /><br />The problem is that the huge function parse-lambda-list being compiled<br />has a flet (scan-opt/key) inside, which is compiled into a separate C<br />function which does not see the other stuff, namely "volatile struct<br />ecl_cclosure aux_closure;" is missing in the separate C function for<br />flet scan-opt/key.<br /><br />I could not find a reduced testcase but I guess this is a bug in the ecl<br />compiler?<br /><br />Tomas<br /><br />=====<br /><br />;;; Compiling src/compiler/parse-lambda-list.lisp.<br />;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0<br />;;;<br />;;; Compiling (DEFMACRO LAMBDA-LIST-KEYWORD-MASK ...).<br />;;; Compiling (DEFUN LL-KWDS-RESTP ...).<br />;;; Compiling (DEFUN LL-KWDS-KEYP ...).<br />;;; Compiling (DEFUN LL-KWDS-ALLOWP ...).<br />;;; Compiling
(DEFUN PARSE-LAMBDA-LIST ...).<br />;;; Compiling (DEFUN PARSE-DS-LAMBDA-LIST ...).<br />;;; Compiling (DEFMACRO WITH-DS-LAMBDA-LIST-PARTS ...).<br />;;; Compiling (DEFUN PARSE-OPTIONAL-ARG-SPEC ...).<br />;;; Compiling (DEFUN PARSE-KEY-ARG-SPEC ...).<br />;;; Compiling (DEFUN META-ABSTRACTIFY-DS-LAMBDA-LIST ...).<br />;;; Compiling (DEFUN MAKE-LAMBDA-LIST ...).<br />;;; Compiling (DEFUN UNPARSE-DS-LAMBDA-LIST ...).<br />;;; Compiling (DEFUN DS-LAMBDA-LIST-VARIABLES ...).<br />;;; Compiling (DEFUN DS-LAMBDA-LIST-MATCH-P ...).<br />;;; Compiling (DEFUN DS-LAMBDA-LIST-MATCHER ...).<br />;;; Compiling (DEFUN EMIT-DS-LAMBDA-LIST-MATCH ...).<br />;;; Compiling (DEFUN EMIT-DS-BIND-CHECK ...).<br />;;; Compiling (DEFUN EXPAND-DS-BIND ...).<br />;;; Compiling (DEFUN COMPILER-MACRO-ARGS ...).<br />;;; Compiling (DEFUN GET-DS-BIND-CONTEXT ...).<br />;;; Compiling (DEFUN DS-BIND-ERROR ...).<br />;;; Compiling (DEFUN CHECK-DS-BIND-KEYS ...).<br />;;; Compiling (DEFUN CHECK-DS-LIST ...).<br
/>;;; Compiling (DEFUN CHECK-DS-LIST/&REST ...).<br />;;; Compiling (DEFUN CHECK-DS-LIST/&KEY ...).<br />;;; Compiling (DEFUN CMACRO-CHECK-DS-LIST/&KEY ...).<br />;;; Compiling (DEFUN DS-GETF ...).<br />;;; Compiling (DEF!MACRO NAMED-DS-BIND ...).<br />;;; Compiling (DEFUN MAKE-MACRO-LAMBDA ...).<br />;;; Compiling (DEFVAR *STRIP-LAMBA-LIST-RETAIN-AUX* ...).<br />;;; Compiling (DEFUN STRIP-LAMBDA-LIST ...).<br />;;; End of Pass 1.<br />;;; Emitting code for LAMBDA-LIST-KEYWORD-MASK.<br />;;; Emitting code for LL-KWDS-RESTP.<br />;;; Emitting code for LL-KWDS-KEYP.<br />;;; Emitting code for LL-KWDS-ALLOWP.<br />;;; Emitting code for PARSE-LAMBDA-LIST.<br />;;; Emitting code for CROAK.<br />;;; Emitting code for DEFAULTP.<br />;;; Emitting code for NEED-BINDABLE.<br />;;; Emitting code for NEED-SYMBOL.<br />;;; Emitting code for NEED-ARG.<br />;;; Emitting code for REPORT-SUSPICIOUS.<br />;;; Emitting code for CHECK-SUSPICIOUS.<br />;;; Emitting code for
PROBABLY-LL-KEYWORD-P.<br />;;; Emitting code for DESTRUCTURING-P.<br />;;; Emitting code for SCAN-OPT/KEY.<br />;;; Emitting code for PARSE-DS-LAMBDA-LIST.<br />;;; Emitting code for PARSE*.<br />;;; Emitting code for PARSE.<br />;;; Emitting code for #:G116.<br />;;; Emitting code for #:G117.<br />;;; Emitting code for WITH-DS-LAMBDA-LIST-PARTS.<br />;;; Emitting code for PARSE-OPTIONAL-ARG-SPEC.<br />;;; Emitting code for PARSE-KEY-ARG-SPEC.<br />;;; Emitting code for META-ABSTRACTIFY-DS-LAMBDA-LIST.<br />;;; Emitting code for RECURSE.<br />;;; Emitting code for PROCESS-OPT/KEY.<br />;;; Emitting code for #:G175.<br />;;; Emitting code for MAKE-LAMBDA-LIST.<br />;;; Emitting code for UNPARSE-DS-LAMBDA-LIST.<br />;;; Emitting code for MEMOIZE.<br />;;; Emitting code for RECURSE.<br />;;; Emitting code for MAYBE-DEFAULT.<br />;;; Emitting code for PROCESS-OPT.<br />;;; Emitting code for #:G230.<br />;;; Emitting code for DS-LAMBDA-LIST-VARIABLES.<br />;;; Emitting code for SCAN.<br
/>;;; Emitting code for SUPPLIEDP-VAR.<br />;;; Emitting code for COPY.<br />;;; Emitting code for RECURSE.<br />;;; Emitting code for DS-LAMBDA-LIST-MATCH-P.<br />;;; Emitting code for RECURSE.<br />;;; Emitting code for DS-LAMBDA-LIST-MATCHER.<br />;;; Emitting code for EMIT-DS-LAMBDA-LIST-MATCH.<br />;;; Emitting code for EMIT-DS-BIND-CHECK.<br />;;; Emitting code for EXPAND-DS-BIND.<br />;;; Emitting code for DESCEND.<br />;;; Emitting code for GEN-TEST.<br />;;; Emitting code for BIND-IF.<br />;;; Emitting code for BIND-PAT.<br />;;; Emitting code for CAST/POP.<br />;;; Emitting code for COMPILER-MACRO-ARGS.<br />;;; Emitting code for GET-DS-BIND-CONTEXT.<br />;;; Emitting code for DS-BIND-ERROR.<br />;;; Emitting code for CHECK-DS-BIND-KEYS.<br />;;; Emitting code for CHECK-DS-LIST.<br />;;; Emitting code for CHECK-DS-LIST/&REST.<br />;;; Emitting code for CHECK-DS-LIST/&KEY.<br />;;; Emitting code for CMACRO-CHECK-DS-LIST/&KEY.<br />;;; Emitting code for
DS-GETF.<br />;;; Emitting code for NAMED-DS-BIND.<br />;;; Emitting code for MAKE-MACRO-LAMBDA.<br />;;; Emitting code for #:G485.<br />;;; Emitting code for STRIP-LAMBDA-LIST.<br />;;; Emitting code for #:G489.<br />;;; Emitting code for #:G509.<br />In file included from /nix/store/4ha569nsijgnp7ywq89prpn6643h132m-ecl-16.1.2/include/ecl/ecl.h:84:0,<br />                 from /nix/store/4ha569nsijgnp7ywq89prpn6643h132m-ecl-16.1.2/include/ecl/ecl-cmp.h:29,<br />                 from obj/from-host/src/compiler/parse-lambda-list.c:5:<br />obj/from-host/src/compiler/parse-lambda-list.c: In function 'LC14scan_opt_key':<br />obj/from-host/src/compiler/parse-lambda-list.c:1222:15: error: 'aux_closure' undeclared (first use in this function)<br />     if (Null((aux_closure.env=env0,cl_env_copy->function=(cl_object)&aux_closure,LC12defaultp(2, v5arg, v2what_kind)))) { goto L8; }<br />               ^<br
/>/nix/store/4ha569nsijgnp7ywq89prpn6643h132m-ecl-16.1.2/include/ecl/cons.h:27:27: note: in definition of macro 'Null'<br /> #define Null(x)         ((x)==ECL_NIL)<br />                           ^<br />obj/from-host/src/compiler/parse-lambda-list.c:1222:15: note: each undeclared identifier is reported only once for each function it appears in<br />     if (Null((aux_closure.env=env0,cl_env_copy->function=(cl_object)&aux_closure,LC12defaultp(2, v5arg, v2what_kind)))) { goto L8; }<br />               ^<br />/nix/store/4ha569nsijgnp7ywq89prpn6643h132m-ecl-16.1.2/include/ecl/cons.h:27:27: note: in definition of macro 'Null'<br /> #define Null(x)         ((x)==ECL_NIL)<br />                           ^<br />obj/from-host/src/compiler/parse-lambda-list.c:1222:31: error: 'env0' undeclared (first use in this function)<br />     if (Null((aux_closure.env=env0,cl_env_copy->function=(cl_object)&aux_closure,LC12defaultp(2, v5arg, v2what_kind)))) { goto L8; }<br />                
              ^<br />/nix/store/4ha569nsijgnp7ywq89prpn6643h132m-ecl-16.1.2/include/ecl/cons.h:27:27: note: in definition of macro 'Null'<br /> #define Null(x)         ((x)==ECL_NIL)<br />                           ^<br />;;; Internal error:<br />;;;   ** Error code 1 when executing<br />;;; (RUN-PROGRAM "gcc" ("-I." "-I/nix/store/4ha569nsijgnp7ywq89prpn6643h132m-ecl-16.1.2/include/" "-I/nix/store/6f3nbgg28xxyq2mdzdxl0j06dry90sgl-gmp-5.1.3/include" "-I/nix/store/nnjvmplfmzpc22ls4p9h4c7c61rppzc5-libffi-3.2.1/include" "-D_GNU_SOURCE" ...))<br />Condition of type: SIMPLE-ERROR<br />couldn't compile "src/compiler/parse-lambda-list.lisp"<br /><br />Available restarts:<br /><br />1. (RESTART-TOPLEVEL) Go back to Top-Level REPL.<br /><br />Broken at SB-COLD::LOAD-OR-CLOAD-XCOMPILER. In: #<process TOP-LEVEL>.<br /> File: #P"/tmp/nix-build-sbcl-1.3.3.drv-0/sbcl-1.3.3/src/cold/defun-load-or-cload-xcompiler.lisp" (Position #1305)<br /><blockquote class="gmail_quote" style="margin: 0pt
0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> <br /></blockquote></blockquote><br /></pre></blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>