version 1.24, 2003/03/02 13:12:33
|
version 1.27, 2005/01/24 22:18:34
|
Line 10 This manual is for Vmgen
|
Line 10 This manual is for Vmgen
|
(version @value{VERSION}, @value{UPDATED}), |
(version @value{VERSION}, @value{UPDATED}), |
the virtual machine interpreter generator |
the virtual machine interpreter generator |
|
|
Copyright @copyright{} 2002, 03 Free Software Foundation, Inc. |
Copyright @copyright{} 2002,2003,2005 Free Software Foundation, Inc. |
|
|
@quotation |
@quotation |
Permission is granted to copy, distribute and/or modify this document |
Permission is granted to copy, distribute and/or modify this document |
Line 906 if (branch_condition) @{
|
Line 906 if (branch_condition) @{
|
SUPER_CONTINUE; |
SUPER_CONTINUE; |
@end example |
@end example |
|
|
|
@item VM_JUMP |
|
@findex VM_JUMP |
|
@code{VM_JUMP(target)} is equivalent to @code{goto *(target)}, but |
|
allows Vmgen to do dynamic superinstructions and replication. You |
|
still need to say @code{SUPER_END}. |
|
|
@end table |
@end table |
|
|
Note that Vmgen is not smart about C-level tokenization, comments, |
Note that Vmgen is not smart about C-level tokenization, comments, |
Line 1108 n++;
|
Line 1114 n++;
|
Instead, you have to use different names, i.e.: |
Instead, you have to use different names, i.e.: |
|
|
@example |
@example |
add1 ( n1 -- n1 ) |
add1 ( n1 -- n2 ) |
n2=n1+1; |
n2=n1+1; |
@end example |
@end example |
|
|
Line 1461 profiling.
|
Line 1467 profiling.
|
@item SUPER_CONTINUE |
@item SUPER_CONTINUE |
This is just a hint to Vmgen and does nothing at the C level. |
This is just a hint to Vmgen and does nothing at the C level. |
|
|
|
@findex MAYBE_UNUSED |
|
@item MAYBE_UNUSED |
|
This should be defined as @code{__attribute__((unused))} for gcc-2.7 and |
|
higher. It suppresses the warnings about unused variables in the code |
|
for superinstructions. You need to define this only if you are using |
|
superinstructions. |
|
|
@findex VM_DEBUG |
@findex VM_DEBUG |
@item VM_DEBUG |
@item VM_DEBUG |
If this is defined, the tracing code will be compiled in (slower |
If this is defined, the tracing code will be compiled in (slower |
Line 1638 instruction instead of laying down @code
|
Line 1651 instruction instead of laying down @code
|
|
|
The code for peephole optimization is in @file{vmgen-ex/peephole.c}. |
The code for peephole optimization is in @file{vmgen-ex/peephole.c}. |
You can use this file almost verbatim. Vmgen generates |
You can use this file almost verbatim. Vmgen generates |
@file{@var{file}-peephole.i} which contains data for the peephoile |
@file{@var{file}-peephole.i} which contains data for the peephole |
optimizer. |
optimizer. |
|
|
@findex init_peeptable |
@findex init_peeptable |