This is a small but significant release of DreamLisp v1.2. This release brings performance enhancement to the interpreter. That is being able to build in release mode with Fastest, smallest [-Os]
compiler flag enabled. Previously it was possible to build only in debug mode which does not have any optimization level because of the use of objc_msgSend
. This was used to invoke methods dynamically which fails to build in release mode due to strict type checking requirements. I replaced this usage with NSInvocation
which works similarly dynamically at the Objective-C level instead of at the runtime C level which doesn't have this drawback. With this change all usage of objc_msgSend
has been removed which I used in arithmetic and comparison operations and now we can build in release mode with all compiler optimizations enabled. Test cases run in debug mode because of the use of XCTAssertThrow
. In release mode this will result in segmentation fault instead of the XCTest being able to catch the exception. I am still not that happy with the interpereter performance but I can't expect too much from a tree walking interpreter.
jsloop
{musings}