3 ms·
Yes, but I thought that was a JIT compiler. For all practical purposes, still an interpreter model from the user perspective. Does it allow for ahead of time
by StevePerkins 6y ago
Yes, but I thought that was a JIT compiler. For all practical purposes, still an interpreter model from the user perspective.
Does it allow for ahead of time compilation to bytecode? With build-time reporting of errors in the source code?
- blacksqr 6y agoIf you mean the wikipedia definition of compiling source code to machine code at runtime, then no. The Tcl interpreter contains a bytecode virtual machine, more along the Java model. Source code is converted to bytecode on the procedure level, not the program level, so there's no program-wide checks for consistency. It's done at runtime. There are some officially unsupported tools built in to the interpreter that let you dump bytecode of compiled procedures and reload it. You'd have to roll your own dumping and loading scripts if you wanted to deliver an entire program using those tools.
- blacksqr 6y agoThere is an AOT Tcl-to LLVM IR compiler in development. https://wiki.tcl-lang.org/page/tclquadcode https://wiki.tcl-lang.org/page/tclquadcode