An open API service indexing awesome lists of open source software.

https://github.com/pfalcon/pycopy-jitgen

Generating machine code at runtime (aka JIT) using Pycopy (small Python dialect)
https://github.com/pfalcon/pycopy-jitgen

code-generation jit pycopy

Last synced: about 1 year ago
JSON representation

Generating machine code at runtime (aka JIT) using Pycopy (small Python dialect)

Awesome Lists containing this project

README

          

jitgen
======

jitgen is a (very bare) demo of generating machine code at runtime using
Pycopy (https://github.com/pfalcon/pycopy) and executing it.

Current, only x86 (32-bit) is supported. While demo is very bare (and set
of supported instructions is very limited), it tries to show something more
interesting than "a + b", namely, being able to do something about Python
objects. For this, the code generated calls back into Pycopy for
various API functions. For that to work, the executable should export
symbols for functions using -rdynamic linker flag.

Summing up, to try this demo, build Pycopy's Unix version with:

make MICROPY_FORCE_32BIT=1 LDFLAGS_EXTRA=-rdynamic

License
-------

jitgen is written by Paul Sokolovsky and released under the MIT license.