Releases: kengorab/abra-lang
Releases · kengorab/abra-lang
v0.0.23: Prelude: Map improvements (#523)
* Prelude: Map improvements Use `uninitialized` intrinsic to have "empty" `MapEntry` objects in the `Map`'s `_entries` field, rather than the previous approach of having an array of `MapEntry?` values. This approach adds a bit more logical overhead, but it significantly reduces the amount of allocations when working with `MapEntry` values, and also eliminates the need for `flattenOption`. * Updating process_callstack test, because the contents of prelude changed
v0.0.22: Add `uninitialized` intrinsic (#522)
This effectively just results in a null pointer, but it's cast to be whatever generic value `T` it's required to be. This can be dangerous of course and requires additional checks, but is useful in cases where performance is important (like with `MapEntry<K, V>[]` in the `Map` type); this approach can be leveraged instead of using `Option<T>`. It's much less ergonomic and type-safe, but it doesn't result in an extra layer of allocation and pointer-indirection.
v0.0.21: LSP: Handling the 'initialize' method (#519)
* LSP: Handling the 'initialize' method This adds a ton of code to the `json` std module to support json encoding/decoding of the `initialize` request and response json rpc messages as part of the LSP lifecycle. This can correctly receive an `initialize` request and decode it to a data structure, and respond with an `InitializeResult` object. This code currently fails when it is sent the next message type ( `textDocument/didOpen`) which is not yet implemented. * LSP: typecheck and emit diagnostics Refactor the language server to be a bit more organized. Also, handle the basic textDocument messages, for which the project is typechecked and any errors are emitted as Diagnostics.
v0.0.20: Json module (#517)
* LSP: Beginning a language server Right now all it does is listen to stdin, and write the messages it receives to a log file. But, quite a few standard library functions needed to be added to get to this point. * Adding json module to std * Removing commented-out code * Fixing test
v0.0.19: Adding escape sequences to char literals (#514)
This change also modifies the escape sequence parsing for unicode characters to use the logic in the `Char.fromInt` prelude method, now that it exists.
v0.0.18: More chars support (#513)
* More chars support Now that the compiler can support Char literals, more features can be added including a chars iterator for strings. * UTF-8 encoding/decoding The implementation of `CharsIterator` now also supports multi-byte UTF-8 decoding. I also added a `Char#bytes` method to convert the u32 representation of the character codepoint into the required number of bytes for proper UTF-8 encoding. * Renaming 'CharIterator' to 'CharsIterator'
v0.0.17: Char literals (#512)
Add lexing, parsing, typechecking, and compilation support for character literals. Right now they're fairly useless without actually being related to Strings at all, but that'll come in a future change once this groundwork is laid.
v0.0.16: Using qbe fork
Update release and selfhost build scripts to use my qbe fork, which updates the technique for swapping two registers on aarch64 to avoid the use of the `x18` register, which had introduced UB due to it being a reserved platform register.
v0.0.15: Refactoring how optional params work (#505)
Previously, functions with optional parameters would have an additional "mask" parameter at the end which would indicate to if-statements contained within the body of the function whether or not to reassign parameters to their default values if they were omitted. This resulted in a lot of bloated logic within the compiler, and also a performance cost since each time a function with optional parameters was called, those if-statements would run even if all values were passed. The new approach is to compile a separate function instance for each combination of optional parameters, which ultimately calls the base function and passes in the default values for the missing parameters. This allows all decisions to happen at compile-time rather than at runtime, and it's also a LOT simpler to reason about within the compiler itself. The change was also made for types with optional fields, and I also updated enum variants to be able to have optional fields as well. This also has the added benefit of being able to remove the `Pointer.null()` default field value for `String#_buf` (which is a relic of a previous version of the prelude).
v0.0.14
Fix abraw script to work for macos/linux