Method references to user functions#18828
Merged
rmuir merged 13 commits intoelastic:masterfrom Jun 12, 2016
Merged
Conversation
…eparately from each other, no nesting
…), add some utility methods around the "handle$" fields
Contributor
|
I also cleaned up the MethodWriter stuff to no longer nest. The code was ununderstandable! :-) |
Contributor
|
+1 to merge current state to master! Next is real lambdas! |
18 tasks
Contributor
|
Thanks @rmuir and @uschindler! This all looks great to me. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows stuff like:
It is like a manual transmission lambda. The main idea here is allowing pointers to functions in our own class (whether user explicitly wrote them or we wrote them on their behalf).
So a few cleanups were needed:
These are initialized in
<clinit>withldc(they are simply constants).We can lookup from this by name and arity exactly, and we have what we need.
3. general cleanup of functions in our ASM code (thanks @uschindler).