Releases: HallofFamer/Lox2
Lox2 v2.2.0
Lox2 version 2.2.0, it introduces the following new features on the last version 2.1.0:
- Enhanced type system with basic support for generics/parametric polymorphism.
typekeyword used as declaration of type alias, useful for complex callable or generic types.- Capability of serializing compiled bytecodes into disk as .loxo files, skipping compilation for faster startup time.
- Refactor classes in the existing standard library to use generics(in
clox.stdparent package), such asArray<E>andPromise<T>.
Lox2 v2.1.3
Lox2 version 2.1.3, it makes the following minor fixes/improvements over the last version 2.1.2:
- Add type checking to immediate function calls with anonymous functions and lambda expressions as parameters.
- Modify parser to allow callable type annotations without parameters such as
Int fun()andvoid fun(). - Fix incorrect type annotations for enumeration methods on class
Dictionaryin packageclox.std.collection.
Lox2 v2.1.2
Lox2 version 2.1.2, it makes the following minor fixes/improvements over the last version 2.1.1:
- Establish
Objectas top type for all types including function and metaclass types. - Update type.c to print function parameters properly if the first parameter has dynamic type.
- Fix a minor bug in lexer which used to display incorrect line number when generating lexer error.
Lox2 v2.1.1
Lox2 version 2.1.1, it makes the following minor fixes/improvements over the last version 2.1.0:
- Modify typechecker to infer function/lambda parameter types for immediate function calls.
- Update native callable type creation to display informative names when type error occurs.
- Fix async methods in package clox.std.io and clox.std.net to use the asynchronous version of assertion macros.
Lox2 v2.0.4
Lox2 version 2.0.4, it makes the following minor fixes/improvements over the last version 2.0.3:
- Add name resolution table in order to be able to typecheck invoke expressions like namespace.className(..args)
- Modify typechecker to check if provided object is an instance of
TEnumerableorStringin for statement. - Fix async methods in package
clox.std.ioandclox.std.netto use the asynchronous version of assertion macros.
Lox2 v2.1.0
Lox2 version 2.1.0, it introduces the following new features on the last version 2.0.0:
- Extend parser with infinite lookahead and backtrack, allowing parsing context sensitive grammar for Lox2.
- Dedicated syntax for declaring function types and metaclass types, enabling anonymous functions/lambda to be type inferred.
- Allow declaration of object instance/class fields outside of class initializer, which also enables optional static typing and default values.
- Redesign of Iterator/Enumerator API for ease of use and implementation of iterable types, add new object type ObjIterator.
Lox2 v2.0.3
Lox2 version 2.0.3, it makes the following minor fixes/improvements over the last version 2.0.2:
- Add instance field length to class Range in package clox.std.collection, it now behaves correctly like a collection subclass.
- Fix potential memory leak issue that AST is not properly freed when parser, resolver or typechecker fails with error.
- Fix incorrect param types for initializer methods of Behavior, Namespace and Trait, as well as return types for methods in Comparable trait and Number class.
Lox2 v2.0.2
Lox2 version 2.0.2, it makes the following minor fixes/improvements over the last version 2.0.1:
- Fix buffer.h to include header for <stdlib.h>, which used to prevent Lox2 from compiling on certain platforms.
- Fix CMakeLists.txt to find package libuv correctly on windows with vcpkg installation.
- Modify docker files to fetch latest stable version of Lox2 instead of from main branch directly.
Lox2 v2.0.1
Lox2 version 2.0.1, it makes the following minor fixes/improvements over the last version 2.0.0:
- Fix incorrect return types for some Int and String methods.
- Add optimization for string interpolation to not emit OP_INVOKE instructions for toString method if expression is confirmed to have type String.
- Disallow 'yield' keyword in async functions/methods.
Lox2 v2.0.0
Lox2 version 2.0.0, it introduces the following new features on the last version 1.9.0:
- Multi-pass compiler with abstract syntax tree, semantic analyzer(resolver), symbol table, type checker, and generation of bytecode by walking AST.
- Optional static typing support for function/method parameters and return values, types only exist at compile time and are erased at runtime.
- Semicolon inference as well as basic type inference for immutable local/global variables.
- Replace the old mark and sweep GC with a generational GC which has multiple regions for objects of various generations.