llvm-py

Call Python code from LLVM JIT

爱⌒轻易说出口 提交于 2019-12-01 05:14:29
I write a language lexer/parser/compiler in python, that should run in the LLVM JIT-VM (using llvm-py ) later. The first two steps are quite straightforward for now, but (even if I didn't start the compile-task yet) I see a problem, when my code wants to call Python-Code (in general), or interact with the Python lexer/parser/compiler (in special) respectively. My main concern is, that the code should be able to dynamically load additional code into the VM at runtime and thus it must trigger the whole lexer/parser/compiler-chain in Python from within the VM. First of all: Is this even possible,

Call Python code from LLVM JIT

岁酱吖の 提交于 2019-12-01 02:09:41
问题 I write a language lexer/parser/compiler in python, that should run in the LLVM JIT-VM (using llvm-py ) later. The first two steps are quite straightforward for now, but (even if I didn't start the compile-task yet) I see a problem, when my code wants to call Python-Code (in general), or interact with the Python lexer/parser/compiler (in special) respectively. My main concern is, that the code should be able to dynamically load additional code into the VM at runtime and thus it must trigger