From 5b7b5c48e50d377b794dbbfc1c270ec6fd387e4b Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Mon, 19 Oct 2026 13:18:21 +0200 Subject: zilch: remove uninit value kind --- src/zilch/App/object-store.js | 32 +++++++++++++++----------------- src/zilch/Env/value.zig | 14 +++++++------- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/src/zilch/App/object-store.js b/src/zilch/App/object-store.js index 33879c6..6699c41 100644 --- a/src/zilch/App/object-store.js +++ b/src/zilch/App/object-store.js @@ -1,22 +1,20 @@ class ObjectStore { static types = Object.freeze({ - 0: "uninit", - 1: "object", - 2: "string", - 3: "int", - 4: "uint", - 5: "float", - 6: "undefined", - 7: "future", - - "uninit": 0, - "object": 1, - "string": 2, - "int": 3, - "uint": 4, - "float": 5, - "undefined": 6, - "future": 7, + 0: "object", + 1: "string", + 2: "int", + 3: "uint", + 4: "float", + 5: "undefined", + 6: "future", + + "object": 0, + "string": 1, + "int": 2, + "uint": 3, + "float": 4, + "undefined": 5, + "future": 6, }); static store = { 0: null }; diff --git a/src/zilch/Env/value.zig b/src/zilch/Env/value.zig index b135366..ea54ff2 100644 --- a/src/zilch/Env/value.zig +++ b/src/zilch/Env/value.zig @@ -137,13 +137,13 @@ pub const Value = extern struct { } pub const Kind = enum(u8) { - object = 1, - string = 2, - int = 3, - uint = 4, - float = 5, - undefined = 6, - future = 7, + object = 0, + string = 1, + int = 2, + uint = 3, + float = 4, + undefined = 5, + future = 6, pub fn asType(comptime self: Kind) type { return switch (self) { -- cgit v1.2.3-70-g09d2