mirror of https://github.com/ademakov/libjit
Browse Source
The current way on how importing values from ancestors works mainly aims at hiding how it works from the outside. The main problem was that it required a complex implementation in each backend which only one of the backends (x86) implemented. This commit changes accessing nested values, making it completely frontend based. Furthermore it allows the library users to retrieve the frame pointer of a parent and pass it in any way they like instead of forcing them to use jit_insn_call. This means the new way allows implementing things such as lambdas as function pointer (closure) together with a pointer to the parent frame and then call this lambda using jit_insn_call_indirect.pull/15/head
Jakob Löw
7 years ago
6 changed files with 85 additions and 12 deletions
Loading…
Reference in new issue