This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Byte-code compilation - good for loading.
Please note that I'm new to this mailing list.
Jim Blandy <jimb@red-bean.com> wrote on 20 Dec 1999 18:49:03 -0500:
> * I believe a bytecode interpreter could improve Guile's
> maintainability, by relegating the analysis of the source forms to an
> entirely separate phase from execution. Each part of the process has
> simpler responsibilities, making it easier to write maintainable and
> efficient code. (This would also fix Guile's current problems with
> macro memoization in multi-threaded code. Marius and Mikael know what
> I'm referring to.)
I personally think that the division of code parsing and code execution would
definitely be a Good Thing. This would essentially split Guile into two
portions - a code parsing section, and a code execution section. It would be
easier to maintain them separately than have them intermeshed. Changes to the
parser would not have a significant effect over the code execution section, and
changes to the code execution section would not have a significant effect over
the code parser section.
> * I believe a bytecode interpreter could provide much higher code
> density than the current representation. If Guile is stretching the
> processor's data cache, this might improve speed, too.
I would personally assume that bytecode would be much denser than text code.
Also, the original code wouldn't have to be kept in memory during execution
with a bytecode interpreter.
> * I believe a bytecode could be a better target for multiple language
> support than Scheme. I think common target languages should be very
> low-level and concrete, since this leaves more implementation choices
> in the hands of language-specific code, where they can be decided
> appropriately.
A bytecode interpreter would make it quite easy to totally convert Guile into
interpreting a different language, as long as the bytecode instruction set is
flexible enough. One would just have to essentially put a different parser on
top of the bytecode interpreter, and small changes might have to be made to the
bytecode interpreter.
--
Travis Bemann