Skip to content

Releases: kengorab/abra-lang

v0.0.23: Prelude: Map improvements (#523)

19 Dec 02:17
fa5702b
Compare
Choose a tag to compare
* 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)

19 Dec 02:01
fddda54
Compare
Choose a tag to compare
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)

17 Dec 01:59
c629605
Compare
Choose a tag to compare
* 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)

10 Dec 03:06
93454ad
Compare
Choose a tag to compare
* 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)

01 Dec 00:21
4e21e04
Compare
Choose a tag to compare
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)

29 Nov 01:47
5043b18
Compare
Choose a tag to compare
* 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)

28 Nov 00:50
1601beb
Compare
Choose a tag to compare
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

25 Nov 01:56
Compare
Choose a tag to compare
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)

20 Nov 02:47
cbeb86b
Compare
Choose a tag to compare
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

19 Nov 01:45
Compare
Choose a tag to compare
Fix abraw script to work for macos/linux