tclquadcode

File List
Login

Files of check-in [90e908dae3] in the top-level directory


TclQuadcode

This is a project to develop a compiler for Tcl that produces native code. It does this by translating Tcl code into bytecode, then into quadcode (hence the project's name). That quadcode is analysed and optimized, then translated into LLVM Intermediate Representation, from which native code is issued.

Dependencies

This requires Tcl 8.6, and llvmtcl.

Usage

Write some procedures. Load the code in quadcode.tcl and codegen.tcl in this directory (note that this is not yet a proper package). Now you have the LLVM command:

If you want to just test-drive the code, check out the demo.tcl script in this directory. It's our current driver and exercises most of the currently-implemented features. There's also a smalldemo.tcl that is a cut-down version.