Bytecode specification

2 views
Skip to first unread message

manu...@gmail.com

unread,
Oct 7, 2008, 6:05:08 PM10/7/08
to gazelle-users
Is there any draft about the bytecode generated by Gazelle.
I would like to interpret it in Java and I would like to know if I
have to hack the C interpreter, or if I can rely on a more abstract
description of how to interpret it.

Or if you're short in time, just the big picture of how it works. The
C code is somewhat clear, and Eclipse CDT is there...


Note : I still need to dig deeper, however I've found the sample
grammars bundled with gazelle both very short and very clear. It is
not cluttered by AST productions.

Joshua Haberman

unread,
Oct 7, 2008, 8:39:07 PM10/7/08
to gazelle-users
Thanks for your interest! The bit-level format of the byte-code is
called "BitCode." It was created for the LLVM project, and is
documented here:

http://llvm.org/docs/BitCodeFormat.html

In Gazelle, that's implemented in runtime/bc_read_stream.{c,h}. If
you're interested in interpreting Gazelle bytecode in Java (which is
something I'd love to see), I'd start by implementing BitCode.

The Gazelle-specific semantics that are layered on top of BitCode are
described very tersely in docs/FILEFORMAT. The meanings of those
structures are described in the last section of the manual ("The
Gazelle Algorithm"). The manual isn't a full specification, but it
should be a good start.

Josh
Reply all
Reply to author
Forward
0 new messages