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:
@@ -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]
|
||||
|
||||
; ---------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user