lbForth icon indicating copy to clipboard operation
lbForth copied to clipboard

Clean up C target metacompiler.

Open larsbrinkhoff opened this issue 12 years ago • 4 comments

larsbrinkhoff avatar Nov 02 '13 08:11 larsbrinkhoff

The x86 target uses a new metacompiler written from scratch. The C target might adopt that.

larsbrinkhoff avatar Dec 29 '15 07:12 larsbrinkhoff

@pipcet used the new metacompiler for the asm.js target. Maybe do something similar for C?

larsbrinkhoff avatar Apr 19 '17 11:04 larsbrinkhoff

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.

pipcet avatar Apr 19 '17 16:04 pipcet

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.)

larsbrinkhoff avatar Apr 19 '17 17:04 larsbrinkhoff