marekjm / viuavm

Parallel virtual machine designed to reliably run massively concurrent programs
https://viuavm.org/
GNU General Public License v3.0
71 stars 11 forks source link

Switch to token-driven code generation #149

Closed marekjm closed 8 years ago

marekjm commented 8 years ago

Switch from current line-oriented parsing and code generation method to token-driven one. This is a requirement for dynamic operand types support (i.e. call calling by either atoms or function objects).

This change will make it impossible to calculate bytecode size based just on the names of instructions; the assembler will also have to look at instruction operands (disassembler will also have to be reworked).

marekjm commented 8 years ago

The switch is partially done.

Code generator is not yet token-driven, but assembler uses lexed source to perform static analysis, and switch es to line-oriented processing for older verification functions and actual code generation. Bytecode size calculation is token-oriented. Signature gathering is token-oriented. Block bodies gathering is token-oriented.

Closed by commit c84aec262796ddcccac85b72de146c8d83a0ccc6.