drewrip / bytor

https://crates.io/crates/bytor
1 stars 0 forks source link

Start compilation from Intermediate Code #11

Closed drewrip closed 3 months ago

drewrip commented 3 months ago

You could call this "Emitting IR Code Part 2: Electric Boogaloo". Basically we want to be able to take the out.ir file we can now generate and pass it to the compiler like a source .ras file. Basically we want to deserialize the out.ir file and use it as the build_stack.

I'm thinking we could do something similar to how gcc processes various file extensions by default, then attempts to process them based off of file extension. So for instance:

rascalc out.ir -o fib

will work to generate the final fib binary. And similarly:

rascalc fib.ras -o fib

So if we have the .ir file we can still get the same binary back!

THE-COB commented 3 months ago

Should rascalc fib.ras -o fib use the already generated .ir or .c? What if the user changes source code?

drewrip commented 3 months ago

Working with #13