5 ms·
Very cool. If I could port your G compiler to my VM that would basically get me where I wanted to be. I'll take a look at it!
by mmastrac 8y ago
Very cool. If I could port your G compiler to my VM that would basically get me where I wanted to be. I'll take a look at it!
- giomasce 8y agoIn theory yes, but at the moment my C compiler is very tied to the x86 platform (there is no separated code generation module, emit calls are directly in the code). Since the compiler is very simple, though, it should not be difficult factor out the handful of machine code gadgets that need to be implemented and add support for other back ends, I think. Or you might also other consider other ways, like using the toolchain in OP's repository. If you want to have some brainstorming on #bootstrappable at freenode, there are often interesting discussions on these things.
- akkartik 8y agoWow, great to meet both of you. I've been chasing bootstrapping as well. My approach has been to make programming in raw machine code more ergonomic with some simple text-based tools (that should in principle be easy to write in machine code) My repo is at https://github.com/akkartik/mu/tree/master/subx#readme https://github.com/akkartik/mu/tree/master/subx#readme
- akavel 8y agoDid you consider Oberon?
- lboasso 8y agoas mentioned in another comment, an example of bootstrapping compiler for Oberon on the JVM is: https://github.com/lboasso/oberonc https://github.com/lboasso/oberonc