ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
MajorLag has joined #zig
<presiden>
ah, solved
<andrewrk>
presiden, did the above code work?
<diltsman>
andrewrk, I added the export to the variable holding the vector table. That did require the type of the vector table to conform to the C ABI.
<andrewrk>
presiden, ah I see the problem. I'm going to push a commit that makes your code work verbatim.
<andrewrk>
look at the new test case at the bottom
<presiden>
andrewrk: nice :)
<diltsman>
Looks like the last unexpected thing is that while(true){} generates a pair of consecutive unconditional branches that both branch to the second branch instruction.
<jjido>
Is it worth optimising empty brackets ?
<andrewrk>
diltsman, are you referring to debug mode assembly?
<diltsman>
Whatever the default output is when mode = b.standardReleaseOptions()
<andrewrk>
diltsman, I would make a case that the unnecessary branch instruction is harmless - debug mode favors fast compilation, not optimal machine code
<andrewrk>
the default mode is debug
<andrewrk>
does the unnecessary branch go away with -Drelease-fast ?
<andrewrk>
that said, at some point I will take a look and see if there's some simple fix to emit better debug mode code. I'm doing quite a bit of that in the copy-elision-2 branch
<diltsman>
andrewrk, I didn't realize that it was debug mode. Given what I understand about how loops tend to be transformed (naively) to assembly, the double branch wasn't too much of a surprise. However, I expected a few other inefficienies in debug mode, that is what threw me off.
<diltsman>
-Drelease-fast eliminates the double branch.
<andrewrk>
diltsman, I suspect you may be interested in the work I've been doing in the copy-elision-2 branch. Here's an example: https://i.imgur.com/keMRJ3r.png
<andrewrk>
it's showing the LLVM IR, not assembly, but you can see on the right there are fewer alloca and memcpy instructions
<andrewrk>
I'm hoping to get this merged within the next couple weeks
<andrewrk>
this will significantly improve debug builds
jjido has quit [Remote host closed the connection]
<diltsman>
Took some stupid manipulation of file locations, but I finally got the Zig program on the Arduino Due and paused the debugger. Appears that the debug locations line up as expected.
_whitelogger has joined #zig
<hryx>
Can the weekly Twitch stream be advertised on ziglang.org and the GitHub wiki?
<hryx>
I'm surprised I only found out about it yesterday while reviewing some chat logs
jjido has joined #zig
wilsonk has quit [Read error: No route to host]
wilsonk has joined #zig
jjido has quit [Read error: Connection reset by peer]
dec05eba_ has joined #zig
<dec05eba_>
I noticed that if you have a public struct in a file and then a non-public function in the struct scope you can call the non-public function from another file that uses @import. Is this expected behavior?
jjido has joined #zig
davr0s has joined #zig
_whitelogger has joined #zig
dec05eba_ has quit [Remote host closed the connection]
jjido has quit [Read error: No route to host]
porky11 has joined #zig
m4ge123 has quit [Read error: Connection reset by peer]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]