diff --git a/lib/rivet/src/ast/Table.ri b/lib/rivet/src/ast/Table.ri index 2cd8a3e40..8a2790926 100644 --- a/lib/rivet/src/ast/Table.ri +++ b/lib/rivet/src/ast/Table.ri @@ -268,7 +268,7 @@ public struct Table { int_info.size } else if type_sym.info is .SizedUint as uint_info { uint_info.size - } else if type_sym.info is .Isize or type_sym.info is .Usize { + } else if type_sym.info is .Int or type_sym.info is .Uint { if self.prefs.target_is_64bit { 64 } else { 32 } } else { 75 @@ -311,7 +311,7 @@ public struct Table { .Func -> (self.pointer_size, self.pointer_size), .Alias as alias_info -> self.type_size(alias_info.parent), .Bool -> (1, 1), - .Usize, .Isize -> (self.pointer_size, self.pointer_size), + .Uint, .Int -> (self.pointer_size, self.pointer_size), .SizedInt as int -> match int.size { 8 -> (1, 1), 16 -> (2, 2), @@ -500,12 +500,12 @@ public func universe() -> Module { TypeSym(name: "int16", info: .SizedInt(16)), TypeSym(name: "int32", info: .SizedInt(32)), TypeSym(name: "int64", info: .SizedInt(64)), - TypeSym(name: "int", info: .Isize()), + TypeSym(name: "int", info: .Int()), TypeSym(name: "uint8", info: .SizedUint(8)), TypeSym(name: "uint16", info: .SizedUint(16)), TypeSym(name: "uint32", info: .SizedUint(32)), TypeSym(name: "uint64", info: .SizedUint(64)), - TypeSym(name: "uint", info: .Usize()), + TypeSym(name: "uint", info: .Uint()), TypeSym(name: "comptime_int", info: .ComptimeInt()), TypeSym(name: "comptime_float", info: .ComptimeFloat()), TypeSym(name: "float32", info: .Float(32)), diff --git a/lib/rivet/src/ast/TypeInfo.ri b/lib/rivet/src/ast/TypeInfo.ri index 24210ed01..e53805aeb 100644 --- a/lib/rivet/src/ast/TypeInfo.ri +++ b/lib/rivet/src/ast/TypeInfo.ri @@ -16,8 +16,8 @@ public enum TypeInfo < traits.Stringable { SizedUint { size: uint; }, - Isize, - Usize, + Int, + Uint, ComptimeInt, ComptimeFloat, Float { @@ -151,7 +151,7 @@ public enum TypeInfo < traits.Stringable { #[inline] public func is_primitive(self) -> bool { return self is .Bool or self is .Rune or self is .SizedInt or self is .SizedUint - or self is .Usize or self is .Isize or self is .ComptimeInt + or self is .Uint or self is .Int or self is .ComptimeInt or self is .ComptimeFloat or self is .ComptimeFloat or self is .Float; } @@ -169,9 +169,9 @@ public enum TypeInfo < traits.Stringable { .Bool -> "bool", .Rune -> "rune", .SizedInt as int_info -> "int{}".fmt(int_info.size), - .Isize -> "int", + .Int -> "int", .SizedUint as uint_info -> "uint{}".fmt(uint_info.size), - .Usize -> "uint", + .Uint -> "uint", .ComptimeInt -> "comptime_int", .ComptimeFloat -> "comptime_float", .Float as float_info -> "float{}".fmt(float_info.size), diff --git a/lib/rivet/src/checker/match_expr.ri b/lib/rivet/src/checker/match_expr.ri index 9a74e5ef1..3b87e495e 100644 --- a/lib/rivet/src/checker/match_expr.ri +++ b/lib/rivet/src/checker/match_expr.ri @@ -74,7 +74,7 @@ extend Checker { } } - mut branch_exprs := maps.MapStringUsize(); + mut branch_exprs := maps.MapStringUint(); match_expr.expected_type = self.expected_type; for ib, branch in match_expr.branches { if !branch.is_else { diff --git a/lib/rivet/src/utils/maps/mod.ri b/lib/rivet/src/utils/maps/mod.ri index ed0576397..ff35b3658 100644 --- a/lib/rivet/src/utils/maps/mod.ri +++ b/lib/rivet/src/utils/maps/mod.ri @@ -5,14 +5,14 @@ // TODO: remove file, use Map![K, V] instead #[boxed] -struct StringUsize { +struct StringUint { public key: string; public mut value: uint; } #[boxed] -public struct MapStringUsize { - mut pairs: []mut StringUsize; +public struct MapStringUint { + mut pairs: []mut StringUint; public func set(mut self, key: string, value: uint) { for pair in self.pairs { @@ -22,7 +22,7 @@ public struct MapStringUsize { } } // new value - self.pairs.push(StringUsize(key, value)); + self.pairs.push(StringUint(key, value)); } public func get(self, key: string) -> ?uint {