Refactor Record's internal representation

This commit refactors the internal representation of `BoundKind::Record`
to store a `RecordLayout` and a `Vec` of values, rather than a `Vec` of
key-value pairs. This change simplifies the representation and improves
efficiency by decoupling the record's structure from its specific values
during compilation and analysis.

The `RecordLayout` now defines the structure of the record, and the
values are stored in a separate vector, ordered according to the layout.
This allows for better optimization and type checking, as the record's
shape is explicitly defined and immutable once created.
This commit is contained in:
Michael Schimmel
2026-02-28 16:47:23 +01:00
parent 096f166153
commit eab3e02199
15 changed files with 88 additions and 103 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 1.9us
;; Benchmark-Repeat: 1211
;; Benchmark: 1.3us
;; Benchmark-Repeat: 1599
;; Output: ["Alice" 101 :admin "Zürich" ["Alice" "Bob"] true]
; ---------------------------------------------------------