1: Vmgen supports the construction of interpretive systems by generating
2: the code for executing and dealing with virtual machine (VM)
3: instructions from simple descriptions of the VM instructions.
5: This file is about Vmgen-specific issues. Issues affecting both
6: Gforth and Vmgen (e.g., platform compatibility) are discussed in
9: Vmgen generates code for executing VM instructions (with optional
10: tracing), for generating VM code, for disassembling VM code, and for
11: profiling VM instruction sequences. A VM instruction description
12: looks like this:
14: add ( i1 i2 -- i )
15: i = i1+i2;
17: Vmgen supports several techniques for writing efficient interpreters:
18: virtual machine interpreters, threaded code, combining VM instructions
19: into superinstructions, keeping the top-of-stack in a register,
20: scheduling the dispatch of the next VM instruction, and a couple of
21: minor optimizations. Interpreters created with vmgen usually are
22: faster than competing interpreters and are typically only a factor of
23: 2-10 slower than the code generateed by native-code compilers.
25: Vmgen has special support for stack-based VMs (but it can also be
26: used to advantage when implementing a register-based VM).
28: Changes in Vmgen from earlier releases are explained in NEWS.vmgen.
30: After installation the documentation is available in info form and in
31: printable form (doc/vmgen.ps).
33: There is a simple usage example in vmgen-ex (and a variation on that
34: in vmgen-ex2). See the documentation for more information on that.
36: To report a bug, use
37: <https://savannah.gnu.org/bugs/?func=addbug&group_id=2672>. For
38: discussion on Vmgen (e.g., how to use it), use the
39: email@example.com mailing list (use
40: <http://mail.gnu.org/mailman/listinfo/help-vmgen> to subscribe).
42: You can find vmgen at http://www.complang.tuwien.ac.at/anton/vmgen/.
44: Vmgen is currently distributed with Gforth (because it needs Gforth to
45: run, and Gforth needs it to build), and is installed together with
46: Gforth (read INSTALL for instructions).
48: Note that future versions of vmgen may require small changes in
49: programs written for the present version (e.g., requiring a few
50: additional macro definitions).
53: Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
55: This file is part of Gforth.
57: Gforth is free software; you can redistribute it and/or
58: modify it under the terms of the GNU General Public License
59: as published by the Free Software Foundation; either version 2
60: of the License, or (at your option) any later version.
62: This program is distributed in the hope that it will be useful,
63: but WITHOUT ANY WARRANTY; without even the implied warranty of
64: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.#See the
65: GNU General Public License for more details.
67: You should have received a copy of the GNU General Public License
68: along with this program; if not, write to the Free Software
69: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.