4 ms·
Piumarta's papers are totally underrated! There is only one thing I didn't understand from that paper (as a barely-used-c programmer), which is what does it mea
by scroot 5y ago
Piumarta's papers are totally underrated! There is only one thing I didn't understand from that paper (as a barely-used-c programmer), which is what does it mean to access some_array[-1]?
His COLAs paper seems like it's really interesting as well, but I can only understand maybe 30% of it.
- nielsbot 5y agoHe proposes placing a value's vtable pointer in the memory word before the value's base address. Now you can pass the value around to APIs that expect, say, a C-struct. But the vtable is "secretly" attached to it so you can call methods on it from your language implementation.
- scroot 5y agoI guess I just don't know C well enough. How can it be legal to put anything at a memory address before a given array? Does the compiler magically manage this? (Also if you know of any posts about this technique I would really appreciate it)
- nielsbot 5y agoIt took me a lot of readings to really get what he's saying in this paper...