Skip to content

Releases: Lambda-Mountain-Compiler-Backend/lambda-mountain

1.24.2

18 Sep 02:39
f0971ef

Choose a tag to compare

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

15 Sep 02:42
bb6691b

Choose a tag to compare

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

10 Sep 21:55
2c3b3eb

Choose a tag to compare

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

29 Aug 22:26
ca10421

Choose a tag to compare

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

28 Aug 02:54
f4cfd1d

Choose a tag to compare

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

10 Aug 00:38
5b0c60c

Choose a tag to compare

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

07 Aug 21:03
f1119b0

Choose a tag to compare

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

05 Aug 20:48
828efd3

Choose a tag to compare

Features:

  • most linear features seem to be working
  • with the exception of del hooks

1.23.5

30 Jul 23:51
86c48ae

Choose a tag to compare

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

29 Jul 07:35
53b4473

Choose a tag to compare

Features:

  • all necessary syntax for phi and linear types
  • some basic validation of type well-formedness (using correct parameters for correct types etc.)