Releases: Lambda-Mountain-Compiler-Backend/lambda-mountain
1.24.2
Features:
- GC-enabled Vector
- GC-enabled 2/3/4-Tuples
- GC-enabled Type constructors
Now when something is wrong, it usually isn't GC-related. In order to get here there have been a lot of tricky bugs to mill through.
Fixed a major dumb bug with OwnedData where release would free owned elements always, not just when reference-count hit 0. I have no idea how this was not crashing before...
Phi typing is messy and inconsistent, but hopefully we can do workarounds until we reach V3.
1.24.1
Features:
- retain / release works for complex types such as tagged unions
- retain / release works with match
Now GC-enabled code looks exactly like original code.
let cmp(left: Type, right: Type): Ord = (
match left {
TAny{} => (match right {
TAny{} => Equal;
...
});
...
}
};
1.24.0
Garbage collection seems to be working.
let cmp(l: String, r: String): Ord = (
let l_size = l.end-offset - l.start-offset;
let r_size = r.end-offset - r.start-offset;
let c = memcmp(
(l.data.data + l.start-offset) as C<"void">[],
(r.data.data + r.start-offset) as C<"void">[],
min(l_size, r_size)
) as I64;
if c < 0 then LessThan
else if c > 0 then GreaterThan
else if l_size < r_size then LessThan
else if l_size > r_size then GreaterThan
else Equal
);
This code is garbage collected. Can you tell?
1.23.10
Features:
- basics of retain/release are mostly working
- local variables in return position that need a retain/release will drop both 1 retain and 1 release to instead do nothing
- this optimization allows for natural definitions of
.retain
without infinite recursion
# this just works without any unnatural annotations
let .retain(x: Resource): Resource = (
x.reference-count = x.reference-count + 1;
x
);
1.23.9
Features:
- about 50% done with retain/release based garbage collection
- match is now an atomic expression, so it can be used in more places syntactically
1.23.8
Features:
- parameterization and specialization now accepts phi types
- the compiler internals definitely need the V3 rewrite
- hopefully there won't be too many new features needed before the new fast/safe/correct compiler starts working
1.23.7
Features:
- outgoing phi types are checked against the function return type, then they are moved
- linear types are probably sound enough now to catch the most common errors without requiring too much explicit annotations
This is the last major rule for linear typing. Hopefully this will be enough to get started with actually using linear types without too much problems.
1.23.6
Features:
- most linear features seem to be working
- with the exception of
del
hooks
1.23.5
Features:
- PhiContext now tracks blame
- not using a linear type results in a hard error
- phi transitions no longer automatically establish phi state inside of the function that they are declared on
1.23.4
Features:
- all necessary syntax for phi and linear types
- some basic validation of type well-formedness (using correct parameters for correct types etc.)