Java Forth — Change Log

Version 0 – Initial test development.

Revision: 1, 2, 3, 4, 5.

Revision 1

Initial development at a stage where it can be released into the wild.

Revision 2

  1. Replaced the stack with a more efficient implementation.
  2. Rewritten a large part of the code to remove the static constraint, you can now have multiple instances of the Forth class.
  3. Improved/extended the error/exception handling.
Tidied up the Forth class interface.
  1. Added setReturnStackSize and setDataStackSize methods.
  2. Added addArgument method and next-arg word.
  3. Revised bye so the Forth interpreter now returns to the calling java method.
  1. Fixed bug in j so that it now throws a Syntax Error when used outside of an inner loop.
  2. Added run-time checks to loop words (i, j, loop, +loop and unloop) so they throw a Loop Parameters Unavailable when the loop parameter is not on the top of the return stack.
Improved speed of word list search.
  1. Now throws a Compilation word list changed when the compilation wordlist is changed mid-definition.
  2. Throws an Invalid Address when an attempt is made to access beyond the end of the input buffer.

Revision 3

  1. Renamed setReturnStackSize and setDataStackSize methods to setReturnStackCells and setDataStackCells respectively so as to reflect the related environment queries.
  2. The word name is now stored with the XT rather than in a separate data structure.
  3. Revise the inner interpreter, nesting is now preformed by the inner interpreter rather Java VM.
  4. As the use of the return stack has been revised, we now push addresses onto the stack rather than XTs, the display of the stack (on error) has been significantly revised. Where a value could be an address the enclosing definition is identified and the offset from the definition is given. This is intended to assist in debugging the fault.
  5. The JavaDoc has been significantly revised enhanced. In particular the VM and WordSet classes.

Revision 4

Tidied up the provision of extension word sets into a single class file. The provision of additional files for high-level Forth definitions and environment queries has now been integrated into the WordSet class via the addition of three new Java annotations.

  1. Introduced the @Forth annotation to embed high-level Forth: @Forth("<forth text>")
    The @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.
    This means that the optional .forth file with high level definitions is no longer required.
  2. As the annotation system does not allow multiple instances of an annotation at a single point in the Java file, the @Interpret annotation has been introduced to allow a collection of @Forth annotations:
        @Forth("32 CONSTANT BL")
  3. Introduced the @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.
  4. The 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.
Added ? and DUMP from the Tools Wordset.

Revision 5

Removed the rather horrible inheritance hierarchy of the virtual machine. The Constants and VMInputOuput classes have been merged into the VM class. The VMMemory, VMDataStack and VMCallStack classes have been replaced with the Memory and TypedStack classes which have been aggregated into the VM class. Thus two new fields (memory and data) provide access to the user memory and data stack. Thus what was:
has now become:
This has been made easier in the word set classes with the addition of the data and mem fields. So this is now:
Character literals now require both opening and closing single quote marks.

Added the 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).

Valid HTML5   Valid CSS   AA Accessibility
Peter J Knaggs