Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Pietro Braione pietrobraione

💭
I may be slow to respond.
View GitHub Profile
View interp_jit.c
/* This gist shows how to build an almost zero-assembly template compiler from a threaded
* interpreter.
* See http://eli.thegreenplace.net/2012/07/12/computed-goto-for-efficient-dispatch-tables
* for the original threaded code interpreter. To illustrate compilation of jumps I added
* a couple of jump bytecodes. Works under macOS High Sierra (clang) and Ubuntu 18.04 (gcc),
* versions:
*
* $ clang --version
* Apple LLVM version 10.0.0 (clang-1000.11.45.5)
* Target: x86_64-apple-darwin17.7.0
You can’t perform that action at this time.