Page 1 of 1

Generating machine code at runtime with MicroPython (sometimes called JIT)

Posted: Sun Oct 21, 2018 8:03 pm
by pfalcon
Here's some code I wrote as an Xmas project 2014/2015 (celebrating MicroPython's first year), exploring/learning about Tracing JIT. It's just very simple class to generate and execute machine code with MicroPython. Roughly speaking, it's prototype of what MicroPython does using @micropython.native/@micropython.viper decorators do, except those are implemented in C, so nobody besides @dbpeorge now how they work and how to extend/improve them. This implementation is on the other hand in Python, so would be easy to hack on.

All this time it sat in my working dir, so I decided to brush it up a bit and push on github, to serve as yet another example of what/how can be done with MicroPython.

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

Re: Generating machine code at runtime with MicroPython (sometimes called JIT)

Posted: Sun Oct 21, 2018 11:28 pm
by jickster
Is Tracing JIT the same thing that Java does?

And is it the same thing @dpgeorge talked about here?

https://github.com/micropython/micropython/issues/4085


Sent from my iPhone using Tapatalk Pro

Re: Generating machine code at runtime with MicroPython (sometimes called JIT)

Posted: Wed Oct 24, 2018 8:07 am
by pfalcon
Yes, that's it.

Re: Generating machine code at runtime with MicroPython (sometimes called JIT)

Posted: Fri Feb 22, 2019 10:31 pm
by pfalcon
Further development along those lines includes LLVM bindings for MicroPython: viewtopic.php?f=15&t=5994