- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.8k
 
[GR-70201] [GR-68576] Crema: Add support for invokedynamic. #12405
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
          
     Merged
      
      
    
      
        
          +1,669
        
        
          −198
        
        
          
        
      
    
  
Conversation
  
    
      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
    
  
  
    
    36bb03e    to
    983019a      
    Compare
  
    aecbdda    to
    6d8e85f      
    Compare
  
    In the `RuntimeInterpreterConstantPool`, INVOKEDYNAMIC entries are resolved to a `ResolvedInvokeDynamicConstant`. Those hold information about the bootstrap method and a list of call site links. Call site links can either be successful or failed. Successful call site links contain an invoker method as well as an appendix. The index of the call site link is patched into the 2 empty bytes of the 4 bytes CPI of invokedynamic bytecodes.
* Polymorphic signature method instantiations have an "intrinsic" field set denoting which kind of intrinsic type it is. * The interpreter can dispatch to `IntrinsicRoot.execute` for intrinsics. * Stack walking knows about this interpeter method * The special interpreter methods should be marked as `@NeverInline` and don't need to be added as root. * Add support in the interpreter for `invokeBasic`
In that mode re-enable a number of JDK code path that are usually substituted.
This helps avoid AssertionError in the interpreter.
When compiling with ECJ there are other methods in those classes.
6d8e85f    to
    32ae962      
    Compare
  
    
  
    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.
  
    
  
    
The main goal of this PR is to have java-source-level lambdas and string concatenation working in crema.
When crema is enabled, don't add digest to lambda names
Add resolution for INVOKEDYNAMIC entries
In the
RuntimeInterpreterConstantPool, INVOKEDYNAMIC entries are resolved to aResolvedInvokeDynamicConstant.Those hold information about the bootstrap method and a list of call site links. Call site links can either be successful or failed.
Successful call site links contain an invoker method as well as an appendix.
The index of the call site link is patched into the 2 empty bytes of the 4 bytes CPI of invokedynamic bytecodes.
Ignore parallel class loading
Resolve polymorphic signature methods
Setup the ability to interpret polymorphic signature intrinsics
IntrinsicRoot.executefor intrinsics.@NeverInlineand don't need to be added as root.invokeBasicAdd a quiet mode for
InterpreterToVM.dispatchInvocationWhen enabled, let crema handle
MethodHandle,MemberName, &LambdaFormIn that mode re-enable a number of JDK code path that are usually substituted.
Add
InterpreterUtil.assertionThis helps avoid
AssertionErrorin the interpreter.InterpreterResolvedJavaMethod: make sure some members can't be null.InterpreterResolvedJavaMethod: Store internal flags and modifiers in an intCrema: detect caller sensitive methods