Open larsbrinkhoff opened 10 years ago
@pipcet used the new metacompiler for the asm.js target. Maybe do something similar for C?
I think we'd have to use cell offsets into a global data space rather than pointers for this to work. Or somehow remember which cells need to be relocated and which ones don't, but that sounds hairy.
The present C metacompiler does remember relocation information. It's a little bit hairy, but not too bad. There is a ,
for data, and a a,
for relocatable addresses.
That said, I'm not sure I want to add that hair to the generic metacompiler unless there are more targets that can use it. (Actually, having a metacompiler for the C target isn't important because it's only used for bootstrapping and the Lisp metacompiler does that.)
The x86 target uses a new metacompiler written from scratch. The C target might adopt that.