On Wed, 24 May 2000, Bruce Johnson wrote:

> Any hope that there will ever be a byte-code compiler for Jacl?
> 
> Bruce

I am sure someone could port the C version of the Tcl Bytecode
compiler over to Jacl, but I was not planning on working it :)

There are a couple of ways one could do Byte compiling in Jacl.

1. Just port what the C version that Tcl uses.
2. Port the C bytecode compile, but make it use Java bytecodes.
3. Compile Tcl source and write out Java source code, then
   compile the Java source. This has the added benefit that
   a Java -> Native compiler like gcj could be use to generate
   native code for a Tcl proc.

Of course, the other option is to just not use byte compiling at all.
Byte compiling is faster in many cases, but I am not sure that really 
matters. Jacl and Java in general are not all that fast, but they are
"fast enough" for most things you want to do. The big problem with
Tcl extensions written in C is that the C code makes your extension
almost impossible to use on some other system. If your TclJava code is
too slow, you can always code 1% of it directly in Java to work
around the problem.

A byte code interp would also make Jacl more complex and harder
to embed. I like the fact that Jacl commands are all off in a
class and can be loaded at runtime. Is should make it really
easy to trim Jacl down to the bare min needed to run in an
embedded context.

Mo Dejong
Red Hat Inc.

----------------------------------------------------------------
The TclJava mailing list is sponsored by Scriptics Corporation.
To subscribe:    send mail to [EMAIL PROTECTED]  
                 with the word SUBSCRIBE as the subject.
To unsubscribe:  send mail to [EMAIL PROTECTED] 
                 with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'. 
An archive is available at http://www.mail-archive.com/tcljava@scriptics.com

Reply via email to