You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write now como_compiler.c is really sloppy and includes the ast construction stage, compiling stage, and execution stage. What needs to happen is that the como_compiler.c needs to only do compiling onto a new struct which is just an array of ComoByteCode blocks.
After that, the executor can be cleaner by implementing it as a series of function pointers.
The text was updated successfully, but these errors were encountered:
The design of the executor, the executor will have an array of ComoOpCode structs embedded in the main ExecutionEnvironment structure. The ExecutionEnvrionment structure will contain the program counter, and the stack.
The ExecutionEnvironment structure will also contain the symbol tables for each frame. A frame is a ComoByteCode struct.
The ExecutionEnvrionment structure implements the Virtual Machine for this language.
Write now como_compiler.c is really sloppy and includes the ast construction stage, compiling stage, and execution stage. What needs to happen is that the como_compiler.c needs to only do compiling onto a new struct which is just an array of
ComoByteCode
blocks.After that, the executor can be cleaner by implementing it as a series of function pointers.
The text was updated successfully, but these errors were encountered: