This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: supporting dynamic/interactive procedure re-definition


I (re-)fixed the issue reported below.

It would be good to have a test-case, but it's a bit tedious:
I.e. the test case has to modify an existing file - which
probably means it is best to generate both versions using
Scheme code.  A sleep might be nesssary, too - see the
lastModifiedCacheTime variable in ModuleManager.

On 10/03/2010 11:10 PM, Helmut Eller wrote:
Let's assume we have a file /tmp/foo.scm containing:

(module-export foo)
(module-static #t)
(module-compile-options
  warn-invoke-unknown-method: #t
  warn-undefined-variable: #t)

(define (foo) (bar))
(define (bar) (format #t "version 1\n"))

Then start the interpreter with kawa --no-inline
and do this:

#|kawa:1|# (require "/tmp/foo.scm")
/tmp/foo.scm:9:15: warning - no declaration seen for format
#|kawa:2|# (define baz foo)
#|kawa:3|# (foo)
version 1
#|kawa:4|# (baz)
version 1

So far so good. Now let's change the function bar in the file to:

(define (bar) (format #t "version 2\n"))

and continue with this

#|kawa:5|# (require "/tmp/foo.scm")
/tmp/foo.scm:9:15: warning - no declaration seen for format
#|kawa:6|# (foo)
version 2
#|kawa:7|# (baz)
version 1
#|kawa:8|#

Isn't baz supposed to call version 2?
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]