quintenbons / zpp-compiler

1 stars 0 forks source link

Codegen class #12

Open quintenbons opened 6 days ago

quintenbons commented 6 days ago

Start writing a class to generate code. A datastructure that would be able to create different sections, manage literals, manage stack, maybe available registers... This structure would need to be able to "link" the different assembly strings together after building the blocks to make inlining easier for example

quintenbons commented 6 days ago

I'll try to be a bit more verbose here of what I have in mind:

the class could be called "AssemblyGenerator" and should be able to manage text section differently than data section for example:

These two last points would greatly help with #19