Refactor Record and List to use TupleData

The `Value::List` and `Value::Record` variants have been consolidated
into a single `Value::Tuple` variant. This new variant uses a
`TupleData` struct to store values and an optional `Rc<Vec<Keyword>>`
for keys, allowing it to represent both ordered lists/tuples and
key-value records.

This change simplifies the internal representation and improves
performance by allowing schema sharing for records. It also includes
updates to the compiler, runtime, and tests to reflect the new
structure.
This commit is contained in:
Michael Schimmel
2026-02-20 16:13:38 +01:00
parent ca2c85a8a4
commit 87259584ee
6 changed files with 148 additions and 96 deletions
+1
View File
@@ -1,5 +1,6 @@
;; Record to Tuple Mapping Test
;; Output: 30
;; Benchmark: 700ns
(do
(def rec {:x 10 :y 20})