<div dir="ltr">Hi all,<div><br></div><div>I've been lurking on the list for a bit, and I'm excited to finally talk about what I'm working on: <a href="https://tech.dropbox.com/2014/04/introducing-pyston-an-upcoming-jit-based-python-implementation/" target="_blank">Pyston, a JIT for Python</a>. It's still extremely early on, but I'm happy that I can <a href="https://github.com/dropbox/pyston" target="_blank">open source the code</a> for viewing and discussion.</div>
<div><br></div><div>It contains experimental but working implementations of a few things that I thought might be interesting to the community; they are certainly not production-quality implementations, but I hope they can be at least a data point for people interested in the functionality:</div>
<div>- It contains a working <a href="https://github.com/dropbox/pyston/blob/master/src/codegen/opt/inliner.cpp" target="_blank">cross-module inliner</a>, which can be necessary for doing inlining with MCJIT.</div><div>- It has a build system that allows compiling a runtime file both into the JIT itself, as well as into the stdlib bitcode file for inlining into JIT'd code.</div>
<div>- It contains a working inline cache system that uses the llvm.experimental.patchpoint() intrinsic. It also has some new support for using the PreserveAll calling convention so that the inline cache fastpaths can often avoid spilling registers.</div>
<div>- It has a few optimization passes that are optimized for Pyston, but could be applicable to other dynamic languages; in particular it has an <a href="https://github.com/dropbox/pyston/blob/master/src/codegen/opt/escape_analysis.cpp" target="_blank">escape analysis for GC'd memory</a> that helps lower GC'd memory to registers if the variable is local (something that is probably rare in static languages, but very common in Python).</div>
<div>- Some perf debugging tools, ex for getting instruction-level profiles of JIT'd code.</div><div><br></div><div><br></div><div>There's still a very, very long way to go for Pyston, but it couldn't have even started without LLVM, so I hope I can give something back!</div>
<div><br></div><div>kmod</div></div>