| author | |
| committer | |
| log | e2fe1907ecac075e4d4a37776359144318b6055a |
| tree | fa8289bc558540dfe7fcfdc0d06eb99f0e189396 |
| parent | 856a9c2e3120d9ffa1166eed13641600230946da |
closes #87511 files changed, 62 insertions(+), 2 deletions(-)
lib/std/start.zig+2-2| ... | ... | @@ -512,7 +512,7 @@ fn callMainWithArgs(argc: usize, argv: [*][*:0]u8, envp: [][*:0]u8) u8 { |
| 512 | 512 | return initEventLoopAndCallMain(); |
| 513 | 513 | } |
| 514 | 514 | |
| 515 | fn main(c_argc: c_int, c_argv: [*][*:0]u8, c_envp: [*:null]?[*:0]u8) callconv(.C) c_int { | |
| 515 | fn main(c_argc: c_int, c_argv: [*][*:0]c_char, c_envp: [*:null]?[*:0]c_char) callconv(.C) c_int { | |
| 516 | 516 | var env_count: usize = 0; |
| 517 | 517 | while (c_envp[env_count] != null) : (env_count += 1) {} |
| 518 | 518 | const envp = @ptrCast([*][*:0]u8, c_envp)[0..env_count]; |
| ... | ... | @@ -527,7 +527,7 @@ fn main(c_argc: c_int, c_argv: [*][*:0]u8, c_envp: [*:null]?[*:0]u8) callconv(.C |
| 527 | 527 | return @call(.always_inline, callMainWithArgs, .{ @intCast(usize, c_argc), @ptrCast([*][*:0]u8, c_argv), envp }); |
| 528 | 528 | } |
| 529 | 529 | |
| 530 | fn mainWithoutEnv(c_argc: c_int, c_argv: [*][*:0]u8) callconv(.C) c_int { | |
| 530 | fn mainWithoutEnv(c_argc: c_int, c_argv: [*][*:0]c_char) callconv(.C) c_int { | |
| 531 | 531 | std.os.argv = @ptrCast([*][*:0]u8, c_argv)[0..@intCast(usize, c_argc)]; |
| 532 | 532 | return @call(.always_inline, callMain, .{}); |
| 533 | 533 | } |
lib/std/target.zig+20| ... | ... | @@ -1905,6 +1905,7 @@ pub const Target = struct { |
| 1905 | 1905 | } |
| 1906 | 1906 | |
| 1907 | 1907 | pub const CType = enum { |
| 1908 | char, | |
| 1908 | 1909 | short, |
| 1909 | 1910 | ushort, |
| 1910 | 1911 | int, |
| ... | ... | @@ -1920,6 +1921,7 @@ pub const Target = struct { |
| 1920 | 1921 | |
| 1921 | 1922 | pub fn c_type_byte_size(t: Target, c_type: CType) u16 { |
| 1922 | 1923 | return switch (c_type) { |
| 1924 | .char, | |
| 1923 | 1925 | .short, |
| 1924 | 1926 | .ushort, |
| 1925 | 1927 | .int, |
| ... | ... | @@ -1948,21 +1950,25 @@ pub const Target = struct { |
| 1948 | 1950 | switch (target.os.tag) { |
| 1949 | 1951 | .freestanding, .other => switch (target.cpu.arch) { |
| 1950 | 1952 | .msp430 => switch (c_type) { |
| 1953 | .char => return 8, | |
| 1951 | 1954 | .short, .ushort, .int, .uint => return 16, |
| 1952 | 1955 | .float, .long, .ulong => return 32, |
| 1953 | 1956 | .longlong, .ulonglong, .double, .longdouble => return 64, |
| 1954 | 1957 | }, |
| 1955 | 1958 | .avr => switch (c_type) { |
| 1959 | .char => return 8, | |
| 1956 | 1960 | .short, .ushort, .int, .uint => return 16, |
| 1957 | 1961 | .long, .ulong, .float, .double, .longdouble => return 32, |
| 1958 | 1962 | .longlong, .ulonglong => return 64, |
| 1959 | 1963 | }, |
| 1960 | 1964 | .tce, .tcele => switch (c_type) { |
| 1965 | .char => return 8, | |
| 1961 | 1966 | .short, .ushort => return 16, |
| 1962 | 1967 | .int, .uint, .long, .ulong, .longlong, .ulonglong => return 32, |
| 1963 | 1968 | .float, .double, .longdouble => return 32, |
| 1964 | 1969 | }, |
| 1965 | 1970 | .mips64, .mips64el => switch (c_type) { |
| 1971 | .char => return 8, | |
| 1966 | 1972 | .short, .ushort => return 16, |
| 1967 | 1973 | .int, .uint, .float => return 32, |
| 1968 | 1974 | .long, .ulong => return if (target.abi != .gnuabin32) 64 else 32, |
| ... | ... | @@ -1970,6 +1976,7 @@ pub const Target = struct { |
| 1970 | 1976 | .longdouble => return 128, |
| 1971 | 1977 | }, |
| 1972 | 1978 | .x86_64 => switch (c_type) { |
| 1979 | .char => return 8, | |
| 1973 | 1980 | .short, .ushort => return 16, |
| 1974 | 1981 | .int, .uint, .float => return 32, |
| 1975 | 1982 | .long, .ulong => switch (target.abi) { |
| ... | ... | @@ -1980,6 +1987,7 @@ pub const Target = struct { |
| 1980 | 1987 | .longdouble => return 80, |
| 1981 | 1988 | }, |
| 1982 | 1989 | else => switch (c_type) { |
| 1990 | .char => return 8, | |
| 1983 | 1991 | .short, .ushort => return 16, |
| 1984 | 1992 | .int, .uint, .float => return 32, |
| 1985 | 1993 | .long, .ulong => return target.cpu.arch.ptrBitWidth(), |
| ... | ... | @@ -2036,21 +2044,25 @@ pub const Target = struct { |
| 2036 | 2044 | .minix, |
| 2037 | 2045 | => switch (target.cpu.arch) { |
| 2038 | 2046 | .msp430 => switch (c_type) { |
| 2047 | .char => return 8, | |
| 2039 | 2048 | .short, .ushort, .int, .uint => return 16, |
| 2040 | 2049 | .long, .ulong, .float => return 32, |
| 2041 | 2050 | .longlong, .ulonglong, .double, .longdouble => return 64, |
| 2042 | 2051 | }, |
| 2043 | 2052 | .avr => switch (c_type) { |
| 2053 | .char => return 8, | |
| 2044 | 2054 | .short, .ushort, .int, .uint => return 16, |
| 2045 | 2055 | .long, .ulong, .float, .double, .longdouble => return 32, |
| 2046 | 2056 | .longlong, .ulonglong => return 64, |
| 2047 | 2057 | }, |
| 2048 | 2058 | .tce, .tcele => switch (c_type) { |
| 2059 | .char => return 8, | |
| 2049 | 2060 | .short, .ushort => return 16, |
| 2050 | 2061 | .int, .uint, .long, .ulong, .longlong, .ulonglong => return 32, |
| 2051 | 2062 | .float, .double, .longdouble => return 32, |
| 2052 | 2063 | }, |
| 2053 | 2064 | .mips64, .mips64el => switch (c_type) { |
| 2065 | .char => return 8, | |
| 2054 | 2066 | .short, .ushort => return 16, |
| 2055 | 2067 | .int, .uint, .float => return 32, |
| 2056 | 2068 | .long, .ulong => return if (target.abi != .gnuabin32) 64 else 32, |
| ... | ... | @@ -2058,6 +2070,7 @@ pub const Target = struct { |
| 2058 | 2070 | .longdouble => if (target.os.tag == .freebsd) return 64 else return 128, |
| 2059 | 2071 | }, |
| 2060 | 2072 | .x86_64 => switch (c_type) { |
| 2073 | .char => return 8, | |
| 2061 | 2074 | .short, .ushort => return 16, |
| 2062 | 2075 | .int, .uint, .float => return 32, |
| 2063 | 2076 | .long, .ulong => switch (target.abi) { |
| ... | ... | @@ -2068,6 +2081,7 @@ pub const Target = struct { |
| 2068 | 2081 | .longdouble => return 80, |
| 2069 | 2082 | }, |
| 2070 | 2083 | else => switch (c_type) { |
| 2084 | .char => return 8, | |
| 2071 | 2085 | .short, .ushort => return 16, |
| 2072 | 2086 | .int, .uint, .float => return 32, |
| 2073 | 2087 | .long, .ulong => return target.cpu.arch.ptrBitWidth(), |
| ... | ... | @@ -2128,6 +2142,7 @@ pub const Target = struct { |
| 2128 | 2142 | |
| 2129 | 2143 | .windows, .uefi => switch (target.cpu.arch) { |
| 2130 | 2144 | .x86 => switch (c_type) { |
| 2145 | .char => return 8, | |
| 2131 | 2146 | .short, .ushort => return 16, |
| 2132 | 2147 | .int, .uint, .float => return 32, |
| 2133 | 2148 | .long, .ulong => return 32, |
| ... | ... | @@ -2138,6 +2153,7 @@ pub const Target = struct { |
| 2138 | 2153 | }, |
| 2139 | 2154 | }, |
| 2140 | 2155 | .x86_64 => switch (c_type) { |
| 2156 | .char => return 8, | |
| 2141 | 2157 | .short, .ushort => return 16, |
| 2142 | 2158 | .int, .uint, .float => return 32, |
| 2143 | 2159 | .long, .ulong => switch (target.abi) { |
| ... | ... | @@ -2151,6 +2167,7 @@ pub const Target = struct { |
| 2151 | 2167 | }, |
| 2152 | 2168 | }, |
| 2153 | 2169 | else => switch (c_type) { |
| 2170 | .char => return 8, | |
| 2154 | 2171 | .short, .ushort => return 16, |
| 2155 | 2172 | .int, .uint, .float => return 32, |
| 2156 | 2173 | .long, .ulong => return 32, |
| ... | ... | @@ -2160,6 +2177,7 @@ pub const Target = struct { |
| 2160 | 2177 | }, |
| 2161 | 2178 | |
| 2162 | 2179 | .macos, .ios, .tvos, .watchos => switch (c_type) { |
| 2180 | .char => return 8, | |
| 2163 | 2181 | .short, .ushort => return 16, |
| 2164 | 2182 | .int, .uint, .float => return 32, |
| 2165 | 2183 | .long, .ulong => switch (target.cpu.arch) { |
| ... | ... | @@ -2182,6 +2200,7 @@ pub const Target = struct { |
| 2182 | 2200 | }, |
| 2183 | 2201 | |
| 2184 | 2202 | .nvcl, .cuda => switch (c_type) { |
| 2203 | .char => return 8, | |
| 2185 | 2204 | .short, .ushort => return 16, |
| 2186 | 2205 | .int, .uint, .float => return 32, |
| 2187 | 2206 | .long, .ulong => switch (target.cpu.arch) { |
| ... | ... | @@ -2194,6 +2213,7 @@ pub const Target = struct { |
| 2194 | 2213 | }, |
| 2195 | 2214 | |
| 2196 | 2215 | .amdhsa, .amdpal => switch (c_type) { |
| 2216 | .char => return 8, | |
| 2197 | 2217 | .short, .ushort => return 16, |
| 2198 | 2218 | .int, .uint, .float => return 32, |
| 2199 | 2219 | .long, .ulong, .longlong, .ulonglong, .double => return 64, |
lib/std/zig/primitives.zig+1| ... | ... | @@ -11,6 +11,7 @@ pub const names = std.ComptimeStringMap(void, .{ |
| 11 | 11 | .{"c_long"}, |
| 12 | 12 | .{"c_longdouble"}, |
| 13 | 13 | .{"c_longlong"}, |
| 14 | .{"c_char"}, | |
| 14 | 15 | .{"c_short"}, |
| 15 | 16 | .{"c_uint"}, |
| 16 | 17 | .{"c_ulong"}, |
src/AstGen.zig+4| ... | ... | @@ -9054,6 +9054,7 @@ const primitive_instrs = std.ComptimeStringMap(Zir.Inst.Ref, .{ |
| 9054 | 9054 | .{ "c_long", .c_long_type }, |
| 9055 | 9055 | .{ "c_longdouble", .c_longdouble_type }, |
| 9056 | 9056 | .{ "c_longlong", .c_longlong_type }, |
| 9057 | .{ "c_char", .c_char_type }, | |
| 9057 | 9058 | .{ "c_short", .c_short_type }, |
| 9058 | 9059 | .{ "c_uint", .c_uint_type }, |
| 9059 | 9060 | .{ "c_ulong", .c_ulong_type }, |
| ... | ... | @@ -9802,6 +9803,7 @@ fn nodeImpliesMoreThanOnePossibleValue(tree: *const Ast, start_node: Ast.Node.In |
| 9802 | 9803 | .c_long_type, |
| 9803 | 9804 | .c_longdouble_type, |
| 9804 | 9805 | .c_longlong_type, |
| 9806 | .c_char_type, | |
| 9805 | 9807 | .c_short_type, |
| 9806 | 9808 | .c_uint_type, |
| 9807 | 9809 | .c_ulong_type, |
| ... | ... | @@ -10047,6 +10049,7 @@ fn nodeImpliesComptimeOnly(tree: *const Ast, start_node: Ast.Node.Index) bool { |
| 10047 | 10049 | .c_long_type, |
| 10048 | 10050 | .c_longdouble_type, |
| 10049 | 10051 | .c_longlong_type, |
| 10052 | .c_char_type, | |
| 10050 | 10053 | .c_short_type, |
| 10051 | 10054 | .c_uint_type, |
| 10052 | 10055 | .c_ulong_type, |
| ... | ... | @@ -10187,6 +10190,7 @@ fn rvalue( |
| 10187 | 10190 | as_ty | @enumToInt(Zir.Inst.Ref.i64_type), |
| 10188 | 10191 | as_ty | @enumToInt(Zir.Inst.Ref.usize_type), |
| 10189 | 10192 | as_ty | @enumToInt(Zir.Inst.Ref.isize_type), |
| 10193 | as_ty | @enumToInt(Zir.Inst.Ref.c_char_type), | |
| 10190 | 10194 | as_ty | @enumToInt(Zir.Inst.Ref.c_short_type), |
| 10191 | 10195 | as_ty | @enumToInt(Zir.Inst.Ref.c_ushort_type), |
| 10192 | 10196 | as_ty | @enumToInt(Zir.Inst.Ref.c_int_type), |
src/Sema.zig+3| ... | ... | @@ -30622,6 +30622,7 @@ pub fn resolveTypeRequiresComptime(sema: *Sema, ty: Type) CompileError!bool { |
| 30622 | 30622 | .i128, |
| 30623 | 30623 | .usize, |
| 30624 | 30624 | .isize, |
| 30625 | .c_char, | |
| 30625 | 30626 | .c_short, |
| 30626 | 30627 | .c_ushort, |
| 30627 | 30628 | .c_int, |
| ... | ... | @@ -32010,6 +32011,7 @@ pub fn typeHasOnePossibleValue(sema: *Sema, ty: Type) CompileError!?Value { |
| 32010 | 32011 | .i128, |
| 32011 | 32012 | .usize, |
| 32012 | 32013 | .isize, |
| 32014 | .c_char, | |
| 32013 | 32015 | .c_short, |
| 32014 | 32016 | .c_ushort, |
| 32015 | 32017 | .c_int, |
| ... | ... | @@ -32640,6 +32642,7 @@ pub fn typeRequiresComptime(sema: *Sema, ty: Type) CompileError!bool { |
| 32640 | 32642 | .i128, |
| 32641 | 32643 | .usize, |
| 32642 | 32644 | .isize, |
| 32645 | .c_char, | |
| 32643 | 32646 | .c_short, |
| 32644 | 32647 | .c_ushort, |
| 32645 | 32648 | .c_int, |
src/TypedValue.zig+1| ... | ... | @@ -92,6 +92,7 @@ pub fn print( |
| 92 | 92 | .i128_type => return writer.writeAll("i128"), |
| 93 | 93 | .isize_type => return writer.writeAll("isize"), |
| 94 | 94 | .usize_type => return writer.writeAll("usize"), |
| 95 | .c_char_type => return writer.writeAll("c_char"), | |
| 95 | 96 | .c_short_type => return writer.writeAll("c_short"), |
| 96 | 97 | .c_ushort_type => return writer.writeAll("c_ushort"), |
| 97 | 98 | .c_int_type => return writer.writeAll("c_int"), |
src/Zir.zig+5| ... | ... | @@ -2062,6 +2062,7 @@ pub const Inst = struct { |
| 2062 | 2062 | i128_type, |
| 2063 | 2063 | usize_type, |
| 2064 | 2064 | isize_type, |
| 2065 | c_char_type, | |
| 2065 | 2066 | c_short_type, |
| 2066 | 2067 | c_ushort_type, |
| 2067 | 2068 | c_int_type, |
| ... | ... | @@ -2201,6 +2202,10 @@ pub const Inst = struct { |
| 2201 | 2202 | .ty = Type.initTag(.type), |
| 2202 | 2203 | .val = Value.initTag(.isize_type), |
| 2203 | 2204 | }, |
| 2205 | .c_char_type = .{ | |
| 2206 | .ty = Type.initTag(.type), | |
| 2207 | .val = Value.initTag(.c_char_type), | |
| 2208 | }, | |
| 2204 | 2209 | .c_short_type = .{ |
| 2205 | 2210 | .ty = Type.initTag(.type), |
| 2206 | 2211 | .val = Value.initTag(.c_short_type), |
src/codegen/c/type.zig+1| ... | ... | @@ -1358,6 +1358,7 @@ pub const CType = extern union { |
| 1358 | 1358 | else if (ty.isAbiInt()) switch (ty.tag()) { |
| 1359 | 1359 | .usize => self.init(.uintptr_t), |
| 1360 | 1360 | .isize => self.init(.intptr_t), |
| 1361 | .c_char => self.init(.char), | |
| 1361 | 1362 | .c_short => self.init(.short), |
| 1362 | 1363 | .c_ushort => self.init(.@"unsigned short"), |
| 1363 | 1364 | .c_int => self.init(.int), |
src/type.zig+20| ... | ... | @@ -47,6 +47,7 @@ pub const Type = extern union { |
| 47 | 47 | .i128, |
| 48 | 48 | .usize, |
| 49 | 49 | .isize, |
| 50 | .c_char, | |
| 50 | 51 | .c_short, |
| 51 | 52 | .c_ushort, |
| 52 | 53 | .c_int, |
| ... | ... | @@ -546,6 +547,7 @@ pub const Type = extern union { |
| 546 | 547 | // Detect that e.g. u64 != usize, even if the bits match on a particular target. |
| 547 | 548 | .usize, |
| 548 | 549 | .isize, |
| 550 | .c_char, | |
| 549 | 551 | .c_short, |
| 550 | 552 | .c_ushort, |
| 551 | 553 | .c_int, |
| ... | ... | @@ -946,6 +948,7 @@ pub const Type = extern union { |
| 946 | 948 | |
| 947 | 949 | .usize, |
| 948 | 950 | .isize, |
| 951 | .c_char, | |
| 949 | 952 | .c_short, |
| 950 | 953 | .c_ushort, |
| 951 | 954 | .c_int, |
| ... | ... | @@ -1292,6 +1295,7 @@ pub const Type = extern union { |
| 1292 | 1295 | .i128, |
| 1293 | 1296 | .usize, |
| 1294 | 1297 | .isize, |
| 1298 | .c_char, | |
| 1295 | 1299 | .c_short, |
| 1296 | 1300 | .c_ushort, |
| 1297 | 1301 | .c_int, |
| ... | ... | @@ -1584,6 +1588,7 @@ pub const Type = extern union { |
| 1584 | 1588 | .i128, |
| 1585 | 1589 | .usize, |
| 1586 | 1590 | .isize, |
| 1591 | .c_char, | |
| 1587 | 1592 | .c_short, |
| 1588 | 1593 | .c_ushort, |
| 1589 | 1594 | .c_int, |
| ... | ... | @@ -1974,6 +1979,7 @@ pub const Type = extern union { |
| 1974 | 1979 | .i128, |
| 1975 | 1980 | .usize, |
| 1976 | 1981 | .isize, |
| 1982 | .c_char, | |
| 1977 | 1983 | .c_short, |
| 1978 | 1984 | .c_ushort, |
| 1979 | 1985 | .c_int, |
| ... | ... | @@ -2290,6 +2296,7 @@ pub const Type = extern union { |
| 2290 | 2296 | .i64 => return Value.initTag(.i64_type), |
| 2291 | 2297 | .usize => return Value.initTag(.usize_type), |
| 2292 | 2298 | .isize => return Value.initTag(.isize_type), |
| 2299 | .c_char => return Value.initTag(.c_char_type), | |
| 2293 | 2300 | .c_short => return Value.initTag(.c_short_type), |
| 2294 | 2301 | .c_ushort => return Value.initTag(.c_ushort_type), |
| 2295 | 2302 | .c_int => return Value.initTag(.c_int_type), |
| ... | ... | @@ -2376,6 +2383,7 @@ pub const Type = extern union { |
| 2376 | 2383 | .i128, |
| 2377 | 2384 | .usize, |
| 2378 | 2385 | .isize, |
| 2386 | .c_char, | |
| 2379 | 2387 | .c_short, |
| 2380 | 2388 | .c_ushort, |
| 2381 | 2389 | .c_int, |
| ... | ... | @@ -2603,6 +2611,7 @@ pub const Type = extern union { |
| 2603 | 2611 | .i128, |
| 2604 | 2612 | .usize, |
| 2605 | 2613 | .isize, |
| 2614 | .c_char, | |
| 2606 | 2615 | .c_short, |
| 2607 | 2616 | .c_ushort, |
| 2608 | 2617 | .c_int, |
| ... | ... | @@ -2938,6 +2947,7 @@ pub const Type = extern union { |
| 2938 | 2947 | .anyframe_T, |
| 2939 | 2948 | => return AbiAlignmentAdvanced{ .scalar = @divExact(target.cpu.arch.ptrBitWidth(), 8) }, |
| 2940 | 2949 | |
| 2950 | .c_char => return AbiAlignmentAdvanced{ .scalar = target.c_type_alignment(.char) }, | |
| 2941 | 2951 | .c_short => return AbiAlignmentAdvanced{ .scalar = target.c_type_alignment(.short) }, |
| 2942 | 2952 | .c_ushort => return AbiAlignmentAdvanced{ .scalar = target.c_type_alignment(.ushort) }, |
| 2943 | 2953 | .c_int => return AbiAlignmentAdvanced{ .scalar = target.c_type_alignment(.int) }, |
| ... | ... | @@ -3435,6 +3445,7 @@ pub const Type = extern union { |
| 3435 | 3445 | else => return AbiSizeAdvanced{ .scalar = @divExact(target.cpu.arch.ptrBitWidth(), 8) }, |
| 3436 | 3446 | }, |
| 3437 | 3447 | |
| 3448 | .c_char => return AbiSizeAdvanced{ .scalar = target.c_type_byte_size(.char) }, | |
| 3438 | 3449 | .c_short => return AbiSizeAdvanced{ .scalar = target.c_type_byte_size(.short) }, |
| 3439 | 3450 | .c_ushort => return AbiSizeAdvanced{ .scalar = target.c_type_byte_size(.ushort) }, |
| 3440 | 3451 | .c_int => return AbiSizeAdvanced{ .scalar = target.c_type_byte_size(.int) }, |
| ... | ... | @@ -3742,6 +3753,7 @@ pub const Type = extern union { |
| 3742 | 3753 | .manyptr_const_u8_sentinel_0, |
| 3743 | 3754 | => return target.cpu.arch.ptrBitWidth(), |
| 3744 | 3755 | |
| 3756 | .c_char => return target.c_type_bit_size(.char), | |
| 3745 | 3757 | .c_short => return target.c_type_bit_size(.short), |
| 3746 | 3758 | .c_ushort => return target.c_type_bit_size(.ushort), |
| 3747 | 3759 | .c_int => return target.c_type_bit_size(.int), |
| ... | ... | @@ -4553,6 +4565,7 @@ pub const Type = extern union { |
| 4553 | 4565 | .int_signed, |
| 4554 | 4566 | .i8, |
| 4555 | 4567 | .isize, |
| 4568 | .c_char, | |
| 4556 | 4569 | .c_short, |
| 4557 | 4570 | .c_int, |
| 4558 | 4571 | .c_long, |
| ... | ... | @@ -4625,6 +4638,7 @@ pub const Type = extern union { |
| 4625 | 4638 | .i128 => return .{ .signedness = .signed, .bits = 128 }, |
| 4626 | 4639 | .usize => return .{ .signedness = .unsigned, .bits = target.cpu.arch.ptrBitWidth() }, |
| 4627 | 4640 | .isize => return .{ .signedness = .signed, .bits = target.cpu.arch.ptrBitWidth() }, |
| 4641 | .c_char => return .{ .signedness = .signed, .bits = target.c_type_bit_size(.char) }, | |
| 4628 | 4642 | .c_short => return .{ .signedness = .signed, .bits = target.c_type_bit_size(.short) }, |
| 4629 | 4643 | .c_ushort => return .{ .signedness = .unsigned, .bits = target.c_type_bit_size(.ushort) }, |
| 4630 | 4644 | .c_int => return .{ .signedness = .signed, .bits = target.c_type_bit_size(.int) }, |
| ... | ... | @@ -4664,6 +4678,7 @@ pub const Type = extern union { |
| 4664 | 4678 | return switch (self.tag()) { |
| 4665 | 4679 | .usize, |
| 4666 | 4680 | .isize, |
| 4681 | .c_char, | |
| 4667 | 4682 | .c_short, |
| 4668 | 4683 | .c_ushort, |
| 4669 | 4684 | .c_int, |
| ... | ... | @@ -4921,6 +4936,7 @@ pub const Type = extern union { |
| 4921 | 4936 | .i128, |
| 4922 | 4937 | .usize, |
| 4923 | 4938 | .isize, |
| 4939 | .c_char, | |
| 4924 | 4940 | .c_short, |
| 4925 | 4941 | .c_ushort, |
| 4926 | 4942 | .c_int, |
| ... | ... | @@ -4964,6 +4980,7 @@ pub const Type = extern union { |
| 4964 | 4980 | .i128, |
| 4965 | 4981 | .usize, |
| 4966 | 4982 | .isize, |
| 4983 | .c_char, | |
| 4967 | 4984 | .c_short, |
| 4968 | 4985 | .c_ushort, |
| 4969 | 4986 | .c_int, |
| ... | ... | @@ -5155,6 +5172,7 @@ pub const Type = extern union { |
| 5155 | 5172 | .i128, |
| 5156 | 5173 | .usize, |
| 5157 | 5174 | .isize, |
| 5175 | .c_char, | |
| 5158 | 5176 | .c_short, |
| 5159 | 5177 | .c_ushort, |
| 5160 | 5178 | .c_int, |
| ... | ... | @@ -5993,6 +6011,7 @@ pub const Type = extern union { |
| 5993 | 6011 | i128, |
| 5994 | 6012 | usize, |
| 5995 | 6013 | isize, |
| 6014 | c_char, | |
| 5996 | 6015 | c_short, |
| 5997 | 6016 | c_ushort, |
| 5998 | 6017 | c_int, |
| ... | ... | @@ -6118,6 +6137,7 @@ pub const Type = extern union { |
| 6118 | 6137 | .i128, |
| 6119 | 6138 | .usize, |
| 6120 | 6139 | .isize, |
| 6140 | .c_char, | |
| 6121 | 6141 | .c_short, |
| 6122 | 6142 | .c_ushort, |
| 6123 | 6143 | .c_int, |
src/value.zig+5| ... | ... | @@ -40,6 +40,7 @@ pub const Value = extern union { |
| 40 | 40 | i128_type, |
| 41 | 41 | usize_type, |
| 42 | 42 | isize_type, |
| 43 | c_char_type, | |
| 43 | 44 | c_short_type, |
| 44 | 45 | c_ushort_type, |
| 45 | 46 | c_int_type, |
| ... | ... | @@ -210,6 +211,7 @@ pub const Value = extern union { |
| 210 | 211 | .i128_type, |
| 211 | 212 | .usize_type, |
| 212 | 213 | .isize_type, |
| 214 | .c_char_type, | |
| 213 | 215 | .c_short_type, |
| 214 | 216 | .c_ushort_type, |
| 215 | 217 | .c_int_type, |
| ... | ... | @@ -413,6 +415,7 @@ pub const Value = extern union { |
| 413 | 415 | .i128_type, |
| 414 | 416 | .usize_type, |
| 415 | 417 | .isize_type, |
| 418 | .c_char_type, | |
| 416 | 419 | .c_short_type, |
| 417 | 420 | .c_ushort_type, |
| 418 | 421 | .c_int_type, |
| ... | ... | @@ -679,6 +682,7 @@ pub const Value = extern union { |
| 679 | 682 | .i128_type => return out_stream.writeAll("i128"), |
| 680 | 683 | .isize_type => return out_stream.writeAll("isize"), |
| 681 | 684 | .usize_type => return out_stream.writeAll("usize"), |
| 685 | .c_char_type => return out_stream.writeAll("c_char"), | |
| 682 | 686 | .c_short_type => return out_stream.writeAll("c_short"), |
| 683 | 687 | .c_ushort_type => return out_stream.writeAll("c_ushort"), |
| 684 | 688 | .c_int_type => return out_stream.writeAll("c_int"), |
| ... | ... | @@ -919,6 +923,7 @@ pub const Value = extern union { |
| 919 | 923 | .i128_type => Type.initTag(.i128), |
| 920 | 924 | .usize_type => Type.initTag(.usize), |
| 921 | 925 | .isize_type => Type.initTag(.isize), |
| 926 | .c_char_type => Type.initTag(.c_char), | |
| 922 | 927 | .c_short_type => Type.initTag(.c_short), |
| 923 | 928 | .c_ushort_type => Type.initTag(.c_ushort), |
| 924 | 929 | .c_int_type => Type.initTag(.c_int), |
stage1/zig1.wasm| Binary files a/stage1/zig1.wasm and b/stage1/zig1.wasm differ |