Created
November 8, 2018 14:11
-
-
Save lschuetze/c97ff013a1a3b69c1cedecfdee7b688c to your computer and use it in GitHub Desktop.
generateBootstrapMethods adaptions
This file contains 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
if (contentsEntries + localContentsOffset >= this.contents.length) { | |
resizeContents(contentsEntries); | |
} | |
char[] SIGNATURE = "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;II)Ljava/lang/invoke/CallSite;".toCharArray(); //$NON-NLS-1$ | |
char[] NAME = "callNext".toCharArray(); //$NON-NLS-1$ | |
MethodBinding callNext = objectTeamsCallNextBootstrap.getMethod(this.referenceBinding.scope, NAME); | |
if(indexForCallNext == 0) { | |
indexForCallNext = this.constantPool.literalIndexForMethodHandle(ClassFileConstants.MethodHandleRefKindInvokeStatic, objectTeamsCallNextBootstrap, | |
NAME, SIGNATURE, false); | |
} | |
this.contents[localContentsOffset++] = (byte) (indexForCallNext >> 8); | |
this.contents[localContentsOffset++] = (byte) indexForCallNext; | |
// u2 num_bootstrap_arguments | |
this.contents[localContentsOffset++] = 0; | |
this.contents[localContentsOffset++] = (byte) 2; | |
int functionalDescriptorIndex = this.constantPool.literalIndexForType(TypeBinding.INT); | |
this.contents[localContentsOffset++] = (byte) (functionalDescriptorIndex >> 8); | |
this.contents[localContentsOffset++] = (byte) functionalDescriptorIndex; | |
this.contents[localContentsOffset++] = (byte) (functionalDescriptorIndex >> 8); | |
this.contents[localContentsOffset++] = (byte) functionalDescriptorIndex; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment