Email or username:

Password:

Forgot your password?
notgull

Sorry for the lack of updates for the past few weeks. It's been a little weird for me.

Anyways, function calls now work in dozer.

Some Rust code that uses function calls
1 comment
notgull

Some weirdness with this: the way I do expressions is that every expression gets a variable slot. So I first encounter the function pointer (add_two_numbers), put that into a QBE temporary, then call it with the later arguments.

I was worried that this would cause issues, but it looks like QBE is able to optimize it down to just calling the global. Which is nice!

The function "do_something" from the previous post. It copies the function pointer and all involved arguments into temporaries, then does "call" on the function pointer.
The resulting assembly. It directly goes to call "add_two_numbers".
Go Up