On Thu, 30 Sep 2010 23:31:51 +0400, Samium Gromoff <_deepf...@feelingofgreen.ru> wrote: > Juan, > > compiling a file containing: > > (defun bar () > (labels ((rec (x) > (rec x))))) > > (defun foo () > (labels ((rec (x) > (rec x))))) > > yields: > > $ ecl.exe -eval '(compile-file "../foo.lisp")' -eval '(si:quit)' > ;;; Loading #P"d:/usr/src/ecl-bin/cmp.fas" > ;;; > ;;; Compiling ../foo.lisp. > ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0 > ;;; > ;;; Compiling (DEFUN BAR ...). > ;;; Compiling (DEFUN FOO ...). > ;;; Internal error: > ;;; in file foo.lisp, position 53 > ;;; at (DEFUN FOO ...) > ;;; ** C-STACK overflow at size 557056. Stack can probably be resized. > > Experimentation tells that following conditions must hold for the error > to manifest itself: > > - the names of the functions established by LABELS must coincide > - the bodies of the functions established by LABELS function bodies > must be the same
Not quite absolutely necessarily the same, it appears that /some/ variance in certain specific places retains the error. For example, the original function definitions which tripped this error were: (defun leftmost (tree) (labels ((rec (sub) (if (consp sub) (rec (car sub)) <========= sub))) (let ((r (rec (tree-root tree)))) (if (plug-p r) (seek-plugs r #'leaf-next) r)))) (defun rightmost (tree) (labels ((rec (sub) (if (consp sub) (rec (cdr sub)) <========= sub))) (let ((r (rec (tree-root tree)))) (if (plug-p r) (seek-plugs r #'leaf-prev) r)))) I.e. there was some variation indeed -- CAR vs. CDR. -- regards, Samium Gromoff -- "Actually I made up the term 'object-oriented', and I can tell you I did not have C++ in mind." - Alan Kay (OOPSLA 1997 Keynote) ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list