This is the mail archive of the kawa@sources.redhat.com 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]

Re: Problem with define-private


"Nic Ferrier" <nferrier@tapsellferrier.co.uk> writes:

> But modules aren't interpreted so that doesn't make sense. Remember
> that Kawa is a toolset, not just one tool. There's a scheme compiler,
> various different interpreter environments, an Emacs implementation
> and some utilities. 
> Unfortunately there is little seperate "marketing" of these so they
> all kinda merge together... but they are seperate; particularly the
> compiler and the interpreter.

Not really - the interpreter is just an optimization.  Anything
the interpreter doesn't understand is handled by the compiler.
The compiler is the "truth".

If you load a .scm file, there is a good chance most of it will
get compiled - whether it is compiled or interpreted is an implementation
detail.  The essential differences are:
(a) whether the compiled class is written out as a .class file
or whether it is immediately loaded by a ClassLoader; and
(b) whether loading a file should evaluate each top-level form
one-by-one or if it should read and process (compile) them all
before evaluating them, like the compiler does.  I.e. loosely
whether load such act is if there was a (begin ...) wrapping
the contents of the file.

If you go to the loadSource (InPort port, Environment env)
method in kawa/standard/load.java, you can change the 'if (true)'
to 'if (false)'.  That will cause a file to be loaded as a unit,
and things should behave closer to how the compiler works.
If 'if (false)' should probably be controlled by a command-line
argument, but in any case the goal is to make '(false)' the default.
Most things should work, but a few things (like defmacro defined
and used in the same file) will break - but they are things that
will also break when compiling.  I hope to fix those.

In any case, feel free to experiment with 'if (false)'.

> Since we don't have a debugger for Kawa yet, Per's dump 
> class is a  pretty valuable debugging tool.

Well, it's a valuable tool, but it's a little too low-level
for most use(r)s!
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

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