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)
- Host: GitHub
- URL: https://github.com/pfalcon/pycopy-jitgen
- Owner: pfalcon
- License: mit
- Created: 2018-10-21T19:30:52.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-20T10:20:24.000Z (about 4 years ago)
- Last Synced: 2025-02-28T20:46:40.579Z (over 1 year ago)
- Topics: code-generation, jit, pycopy
- Language: Python
- Homepage: https://github.com/pfalcon/pycopy
- Size: 28.3 KB
- Stars: 10
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.