Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#383 Loading a new definition of functions doesn't reset the FUNC

closed-fixed
Sam Steingold
clisp (525)
5
2006-11-28
2006-11-26
No

Loading a new definition of functions doesn't reset the
FUNCTION-LAMBDA-EXPRESSION: it still returns the old value.

C/USER1[3]> (print-bug-report-info)

LISP-IMPLEMENTATION-TYPE "CLISP"
LISP-IMPLEMENTATION-VERSION "2.41 (2006-10-13) (built 3372383352) (memory 3372383937)"
SOFTWARE-TYPE
"gcc -g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -O2 -fexpensive-optimizations -falign-functions=4 -DUNICODE -DDYNAMIC_FFI -I. -x none libcharset.a libavcall.a libcallback.a -lreadline -lncurses -ldl -liconv -lsigsegv -L/usr/X11R6/lib
SAFETY=0 HEAPCODES LINUX_NOEXEC_HEAPCODES GENERATIONAL_GC SPVW_BLOCKS SPVW_MIXED TRIVIALMAP_MEMORY
libsigsegv 2.4
libiconv 1.11
libreadline 5.2"
SOFTWARE-VERSION "GNU C 3.3 20030226 (prerelease) (SuSE Linux)"
MACHINE-INSTANCE "thalassa.informatimago.com [62.93.174.79]"
MACHINE-TYPE "I686"
MACHINE-VERSION "I686"
*FEATURES*
(:COM.INFORMATIMAGO.PJB :ASDF-INSTALL :SPLIT-SEQUENCE :ASDF :WILDCARD :RAWSOCK :PCRE
:CLX-ANSI-COMMON-LISP :CLX :ZLIB :READLINE :REGEXP :SYSCALLS :I18N :LOOP :COMPILER :CLOS :MOP :CLISP
:ANSI-CL :COMMON-LISP :LISP=CL :INTERPRETER :SOCKETS :GENERIC-STREAMS :LOGICAL-PATHNAMES :SCREEN :FFI
:GETTEXT :UNICODE :BASE-CHAR=CHARACTER :PC386 :UNIX)

;;; uname -a
Linux thalassa 2.6.15-c3 #3 Mon Apr 10 20:56:51 CEST 2006 i686 unknown unknown GNU/Linux
;;; (EXT:ARGV)
#("/usr/local/languages/clisp-2.41/lib/clisp/full/lisp.run" "-B"
"/usr/local/languages/clisp-2.41/lib/clisp" "-M"
"/usr/local/languages/clisp-2.41/lib/clisp/full/lispinit.mem" "-N"
"/usr/local/languages/clisp-2.41/share/locale" "-ansi" "-q" "-K" "full" "-m" "32M" "-I" "-Efile"
"ISO-8859-15" "-Epathname" "ISO-8859-1" "-Eterminal" "UTF-8" "-Emisc" "UTF-8" "-Eforeign"
"ISO-8859-1")
;;; /usr/local/languages/clisp-2.41/bin/clisp --version
GNU CLISP 2.41 (2006-10-13) (built 3372383352) (memory 3372383930)
Software: GNU C 3.3 20030226 (prerelease) (SuSE Linux)
gcc -g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -O2 -fexpensive-optimizations -falign-functions=4 -DUNICODE -DDYNAMIC_FFI -I. -x none libcharset.a libavcall.a libcallback.a -lreadline -lncurses -ldl -liconv -lsigsegv -L/usr/X11R6/lib
SAFETY=0 HEAPCODES LINUX_NOEXEC_HEAPCODES GENERATIONAL_GC SPVW_BLOCKS SPVW_MIXED TRIVIALMAP_MEMORY
libsigsegv 2.4
libiconv 1.11
libreadline 5.2
Features:
(READLINE REGEXP SYSCALLS I18N LOOP COMPILER CLOS MOP CLISP ANSI-CL COMMON-LISP
LISP=CL INTERPRETER SOCKETS GENERIC-STREAMS LOGICAL-PATHNAMES SCREEN FFI
GETTEXT UNICODE BASE-CHAR=CHARACTER PC386 UNIX)
C Modules: (clisp i18n syscalls regexp readline)
Installation directory: /usr/local/languages/clisp-2.41/lib/clisp/
User language: ENGLISH
Machine: I686 (I686) thalassa.informatimago.com [62.93.174.79]

C/USER1[4]> (defun f () "INITIAL BODY")
F
C/USER1[5]> (compile 'f)
F ;
NIL ;
NIL
C/USER1[6]> (function-lambda-expression 'f)
(LAMBDA NIL "INITIAL BODY") ;
T ;
F
C/USER1[7]> (com.informatimago.common-lisp.interactive:cat "/tmp/f.lisp")
(defun f () "NEW BODY")

C/USER1[8]> (load(compile-file "/tmp/f.lisp"))
;; Compiling file /tmp/f.lisp ...
;; Wrote file /tmp/f.fas
0 errors, 0 warnings
;; Loading file /tmp/f.fas ...
WARNING: DEFUN/DEFMACRO: redefining function F in /tmp/f.fas, was defined in top-level
;; Loaded file /tmp/f.fas
T
C/USER1[9]> (function-lambda-expression 'f)
(LAMBDA NIL "INITIAL BODY") ;
T ;
F
C/USER1[10]> (f)
"NEW BODY"
C/USER1[11]>

Discussion

  • Sam Steingold
    Sam Steingold
    2006-11-28

    • assigned_to: haible --> sds
    • status: open --> closed-fixed
     
  • Sam Steingold
    Sam Steingold
    2006-11-28

    Logged In: YES
    user_id=5735
    Originator: NO

    thank you for your bug report.
    the bug has been fixed in the CVS tree.
    you can either wait for the next release (recommended)
    or check out the current CVS tree (see http://clisp.cons.org\)
    and build CLISP from the sources (be advised that between
    releases the CVS tree is very unstable and may not even build
    on your platform).