New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing Nesting #15
Commits on May 22, 2018
-
rework how nested values are accessed
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.
Configuration menu - View commit details
-
Copy full SHA for a40e0bc - Browse repository at this point
Copy the full SHA a40e0bcView commit details -
Fix some issues with importing values
The previous commit intrduced a couple of bugs. While importing values from the parent worked importing values from a higher ancestor or calling siblings was broken. This commit fixes these issues
Configuration menu - View commit details
-
Copy full SHA for 780b4b8 - Browse repository at this point
Copy the full SHA 780b4b8View commit details -
automatically find and pass parent frame pointers when calling nested…
… functions when calling a nested function the function needs a pointer to the parent frame to import values. With the new nested importing system the work of importing values was taken away from the backends, so this commit takes away setting up calls to nested functions from the backend. Instead this is done in jit-rules.c (and architecture specific versions of jit-rule.c).
Configuration menu - View commit details
-
Copy full SHA for 25c88f5 - Browse repository at this point
Copy the full SHA 25c88f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 87735cf - Browse repository at this point
Copy the full SHA 87735cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for ba1ebf2 - Browse repository at this point
Copy the full SHA ba1ebf2View commit details -
add an instruction for calling a nested function via a function and a…
… frame pointer currently nested functions can only be called using jit_insn_call. This requires the caller to have the jit_function_t object available. The new function jit_insn_call_nested_indirect is similar to jit_insn_call_indirect - allowing to call a function using a jit_value_t - but it has an additional parameter for passing a pointer to the parent frame of the callee. Using jit_insn_get_parent_frame_pointer_of and jit_function_to_closure one can now create both the closure and the parent frame and pass it around together as jit values, calling them does not require the caller to know the actual jit_function_t he is calling. This makes it possible to implement what C# calls delegates.
Configuration menu - View commit details
-
Copy full SHA for 13eaac6 - Browse repository at this point
Copy the full SHA 13eaac6View commit details
Commits on Aug 5, 2018
-
Configuration menu - View commit details
-
Copy full SHA for cffe11a - Browse repository at this point
Copy the full SHA cffe11aView commit details
Commits on Aug 16, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 217a496 - Browse repository at this point
Copy the full SHA 217a496View commit details
Commits on Aug 26, 2018
-
Add a special OP for retrieving the frame pointer
previousely this was handeled by incoming_reg however the register allocator doesn't allow to move registers from different reg classes. Nesting is tested on x86-86, x86 and the interpreter.
Configuration menu - View commit details
-
Copy full SHA for 00f8f12 - Browse repository at this point
Copy the full SHA 00f8f12View commit details
Commits on Aug 27, 2018
-
fix importing parameter in the interpreter as they reside in a custom…
… memory location this commit also makes sure that the frame offset of parameters is available when the function is built, so they dont get assigned a different offset when being imported.
Configuration menu - View commit details
-
Copy full SHA for ec02928 - Browse repository at this point
Copy the full SHA ec02928View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c5c925 - Browse repository at this point
Copy the full SHA 1c5c925View commit details
Commits on Oct 26, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 5281bae - Browse repository at this point
Copy the full SHA 5281baeView commit details
Commits on Dec 3, 2018
-
remove all calls to _jit_gen_fix_value from jit-insn.c, re-adding the…
… import opcode, which is transformed into an add_relative in jit-compile.c
Configuration menu - View commit details
-
Copy full SHA for e6dcb55 - Browse repository at this point
Copy the full SHA e6dcb55View commit details
Commits on Dec 29, 2018
-
make sure struct return pointer arguments are always before parent fr…
…ame pointer arguments
Configuration menu - View commit details
-
Copy full SHA for 4740b27 - Browse repository at this point
Copy the full SHA 4740b27View commit details
Commits on Dec 30, 2018
-
make sure values don't change their address
the current implementations of incoming_frame_posn and outgoing_frame_posn tend to break addressable variables, as they simply change a values frame_offset. For incoming_frame_posn this is fine, as it is only used at the start of a function. This commit changes the implementation of outgoing_frame_posn to store the value at the target frame offset.
Configuration menu - View commit details
-
Copy full SHA for d6c0eb9 - Browse repository at this point
Copy the full SHA d6c0eb9View commit details