Releases: gmpalter/cl-forth
CL-Forth 1.5.2
Release 1.5.2 of CL-Forth
This release includes several small bug fixes:
-
The type declaration in
EXTRACT-CHARwas too strict (FIXNUMvs.INTEGER) causing memory corruption errors in SBCL 2.4.9 and later on ARM platforms. -
Call
FORCE-OUTPUTafter displaying the initial greeting. -
Add a definition for the
:MISSING-ENDCODEexception code.
CL-Forth 1.5.1
Release 1.5.1 of CL-Forth
This release updates ACCEPT to use Lisp replace when copying data into the user's buffer if the buffer is in Forth data space. ACCEPT still uses memcpy if the user's buffer is in foreign memory.
CL-Forth 1.5
Release of CL-Forth 1.5
Supported Platforms
-
CL-Forth now supports LispWorks 8.0.1 or later. However, at present, the word RESIZE-FILE will always return an error indication, resulting in 7 failures in the File-Access word set tests.
-
Added preliminary support for ECL 24.5.10. (My thanks to Daniel Kochmanski.) However, an ECL compiler bug causes the Forth test suite to crash.
-
The Forth test suite now passes without errors under SBCL.
Other Changes
-
CL-Forth now allocates its data spaces using MAKE-HEAP-IVECTOR on CCL. This change guarantees that pointers to Forth data passed through the FFI will not be invalidated by subsequent garbage collections.
-
CL-Forth now closes any open foreign libraries when saving a template. Loading the template will reload the foreign libraries.
-
Made several improvements to the optimization of under-the-hood functions.
CL-Forth 1.4.1
Release 1.4.1 of CL-Forth
Optimization
CL-Forth now includes an experimental optimizer which tries to simplify the code generated by CL-Forth by eliminating as much use of the data stack as possible. There are additional optimizations applied to eliminate unnecessary validity checks when those checks can be shown to be redundant. (E.g, checking that the character count given to TYPE is not negative.)
The optimizer is controlled by a boolean flag whose address is stored in the OPTIMIZER variable. You change the value of this flag using the words ON and OFF.
To turn the optimizer on, execute OPTIMIZER ON and to turn it off, execute OPTIMIZER OFF.
Under SBCL, the Forth test suite runs approximately 33% faster and generates approximately 25% less object code.
By default, the optimizer is off.
Other Changes
- When using the
:forth-source-fileASDF module type, if a Forth exception occurs while loading a Forth source file, display the exception phrase, Forth backtrace, data stack, and the source line that generated the error. (asdf:test-system '#:cl-forth)now runs the Forth test suite twice, first with the optimizer off and then with the optimizer on. If an error occurs during the test suite, CL-Forth displays the Forth backtrace and data stack.- Increase the maximum number of locals in a definition from 16 to 32.
- Add
SETINLINEABLEto enable or disable the inlining of an existing word. (E.g.,FALSE SETINLINEABLE U.) - Add
P.to display the top of the stack as a pointer (i.e., 16 hex digits). - Inline foreign function calls
- Inline references to variables defined by
VALUE,2VALUE, andFVALUE. - Save the state of backtrace-on-error (
SHOW-BACKTRACES) and the optimizer (OPTIMIZER) in templates.
CL-Forth 1.3.5
Release 1.3.5 of CL-Forth
Performance Improvements
- Change the FORTH-SYSTEM class to a structure. Update WITH-FORTH-SYSTEM to arrange for inlined slot access
- Change the WORDS, DICTIONARY, and WORD-LISTS classes to structures to get inlined slot access
- Change how parameters are saved in words to use a structure, eliminating the use of APPLY in FORTH-CALL
- Optimize the implementation of ACCEPT
- Optimize the character "primitives" EXTRACT-CHAR, FORTH-CHAR, NATIVE-CHAR
- Optimize the functions that convert between Forth strings and native strings
- Use EQL instead of CHAR-EQUAL in places where the overhead of CHAR-EQUAL is superfluous
Bug Fixes
- Fixes issue #1
CL-Forth 1.3
Release 1.3 of CL-Forth
FFI improvements:
- Support
[OPTIONAL]withLIBRARY - Change
XLIBRARYto understand that, on Linux, library names frequently end with a version number (e.g., "libc.so.6", "libcurl.so.4.6.0") instead of the ".so" suffix. - In CCL and SBCL, CFFI ignores the
:libraryargument tocffi:foreign-funcallandcffi:foreign-symbol-pointer. Define a "libDefault" library soFUNCTION:andGLOBAL:can be used on those platforms without first loading a library. - Improve the error messages when a foreign function or global is not found.
- In CCL and SBCL, omit the library name from the output of
.IMPORTSas it's not accurate. - In LispWorkds, suppress CFFI's created foreign funcallable announcement.
- FFI callbacks now save and restore the data and floating-point stacks locally to allow nested and/or concurrent callbacks.
- Add FFI.md
- Add an example of using the FFI
Other Highlights:
- Add
BEGIN-NAMED-STRUCTUREto create a structure whose field names will include the structure's name. - Add
LFIELD:andWFIELD:to create longword (32-bit) and word (16-bit) structure fields, respectively. - Add longword (nee, 32-bit) access words
L@,UL@,L!, andL,. - Add word (nee, 16-bit) access words
W@,UW@,W!, andW,. - Add pointer access words
P@andP!. - Save the docstring in
define-wordand display it as part of the output ofSEE. - Allow building standalone applications with SBCL in addition to CCL.
- Catch Ctrl-C and abort to CL-Forth top level
- Add
STATISTICSto report some usage statistics. Also, display the statistics when exiting CL-Forth. - Updated README.md
Full Changelog: v1.2...v1.3
CL-Forth 1.2
Release 1.2 of CL-Forth
CL-Forth 1.1.2
Release 1.1.2 of CL-Forth