David Rubin

Results 46 comments of David Rubin

I don't want likely as it implies an unlikely. Note that the only real purpose of this builtin *is* the unlikely version, and unlikely is a bit ugly imo. I...

Thought about that yesterday, but I think making `@expect` take a second "expected" bool supports both `likely` and `unlikely` without a wrapper.

> What about a nice sugary @expect(operand: anytype, expected: anytype) and add a check for @typeOf(operand) == @typeOf(expected)? No, this will defeat the purpose of this builtin.

It should be noted that the syscall values exist for this, and you could call it with `std.os.linux.syscall3(.sched_setscheduler, ...)` without linking libc. But I agree that they are missing and...

A small change I propose is to instead of requiring them to have the same `@bitSizeOf`, which could lead to some weird behaviour and error messages like in cases such...

> Also, do you see the same behaviour with clang? ``` All other compilers including Clang doesn't have this bug and produce valid Ring executable ```

Thank you for the comments. I have no strong opinions on any of the methods I used, so I would be happy to move this to AstGen (will do shortly)....

Note that the current bug isn't around error unions but with catching `noreturn`. See: ```zig fn foo() noreturn { while (true) {} } pub fn main() !void { foo() catch...

doesn't happen on x86 backend: `0.12.0-dev.3391+19b699593` ``` Test [1/1] empty.test.example... thread 665906 panic: fail Unwind error at address `exe:0x8035207` (error.MissingFDE), trace may be incomplete /home/dr/zig/build/empty.zig:2:5: 0x8000045 in test.example (test_runner.zig) @panic("fail");...

so, `printLineFromFileAnyOs` is failing with `FileNotFound` (specifically on that first print) for some reason. will investigate further.