Skip to content
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

Version 2.x.*: investigate the use of invokedynamic #12

Open
fge opened this issue May 20, 2014 · 0 comments
Open

Version 2.x.*: investigate the use of invokedynamic #12

fge opened this issue May 20, 2014 · 0 comments

Comments

@fge
Copy link
Owner

fge commented May 20, 2014

This opcode, new since Java 7, is among other things what is used by lambdas in Java 8 (see this video by Mr Goetz himself) but also all "dynamically typed" languages on the JVM, for instance JRuby (see this video by @headius, the author of JRuby).

From what I understood of this opcode so far (nicknamed "indy", which I'll use from now on), and this may not be accurate, it works as such:

  • you, the "indy client", create a bootstrap method; the API to do this in the JDK is MethodHandle;
  • indy asks this method where the bytecode is;
  • it inlines the bytecode and execution continues.

What I believe can be done here, but I'm not sure, is to replace ProxyMatcher with indy.

@fge fge added question and removed question labels May 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant