logoalt Hacker News

mananaysiempreyesterday at 10:55 AM1 replyview on HN

What about your older patch where -fno-trampolines meant a function pointer could either be a code pointer or a closure (descriptor) pointer, distinguished by a tag?


Replies

ueckeryesterday at 11:40 AM

My old patch from 2018? This was not accepted to GCC because it relied on function pointers being aligned and there were concerns with this.

But I prefer this approach anyhow, as it does not impose any run-time cost for checking the tag, and is easier to optimize.