Dictu icon indicating copy to clipboard operation
Dictu copied to clipboard

Intermediate File Serialization and Execution

Open 10d9e opened this issue 5 years ago • 1 comments

It would be really cool if Dictu had the ability to compile programs into their IR bytecode, serialize it to file and then execute said bytecode in a separate step, akin to the JVM.

This will save parsing overhead when executing dictu programs.

ie.

# compile dictu source file into executable bytecode
dictuc SomeClass.du -o SomeClass.bin
# execute bytecode directly
dictu -b SomeClass.bin

10d9e avatar Nov 11 '20 23:11 10d9e

Yeah this is a similar proposition to #226, but there would be a bit of work involved (not to say it won't happen eventually). Things like constants for example are generated at compile time and stored within the given function chunk, so we'd need some way of storing these runtime values within the file that is produced. Definitely something to look into eventually however!

Jason2605 avatar Nov 11 '20 23:11 Jason2605