static
constraint,
you can now have multiple instances of the Forth class.Forth
class interface.
setReturnStackSize
and setDataStackSize
methods.addArgument
method and next-arg word.setReturnStackSize
and setDataStackSize
methods to setReturnStackCells
and setDataStackCells
respectively so as to reflect the related environment queries.VM
and WordSet
classes.@Forth
annotation to embed high-level Forth:
@Forth("
<forth text>")
@Forth
annotations are processed after the class has been
loaded. Therefore the forth text may use any word defined by the class.
The annotations are processed in the order given in the file, thus an
annotation may assume previous annotations have been processed.
.forth
file with high level
definitions is no longer required.
@Interpret
annotation
has been introduced to allow a collection of @Forth
annotations:
@Interpret({ @Forth("DECIMAL"), @Forth("32 CONSTANT BL") })
@Environment
annotation to work in the same
manner as the @Primitive
annotation, except the primitive
is added to the list of environment queries rather than the
current word list.
Thus the optional Environment.class
file is no longer
required.WordList.load
method has been replaced with two new
methods, loadJava
to load a Java primitive class file,
and loadForth
to interpret a Forth source file.?
and DUMP
from the Tools Wordset.
memory
and data
)
provide access to the user memory and data stack.
Thus what was:
vm.addCell(vm.popInt());
has now become:
vm.memory.addCell(vm.data.popInt());
This has been made easier in the word set classes with the addition of the
data
and mem
fields. So this is now:
mem.addCell(data.popInt());
JavaForth
identification word.
This can be used by a program to detect it is running on the JavaForth
system. It will return a value indicating the version number of the current
system. This is a single number with the version, revision and release
numbers encoded into a single value. Thus the value 10203 (decimal)
corresponds to version 1.2.3 (version 1, revision 2, release 3).