Skip to content

Commit

Permalink
Merge pull request #11267 from babsingh/nativemethodhandle
Browse files Browse the repository at this point in the history
Add a stub for NativeMethodHandle in JDK16
  • Loading branch information
keithc-ca committed Nov 25, 2020
2 parents fea3bfb + 790c0ef commit a3d9657
Showing 1 changed file with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*[INCLUDE-IF Panama]*/
/*[INCLUDE-IF Panama | (JAVA_SPEC_VERSION >= 16)]*/
/*******************************************************************************
* Copyright (c) 2009, 2020 IBM Corp. and others
*
Expand All @@ -22,6 +22,7 @@
*******************************************************************************/
package java.lang.invoke;

/*[IF Panama]*/
import java.nicl.LibrarySymbol;

import jdk.internal.nicl.types.PointerTokenImpl;
Expand Down Expand Up @@ -112,3 +113,23 @@ void compareWithNative(NativeMethodHandle left, Comparator c) {
c.compareStructuralParameter(left.vmSlot, this.vmSlot);
}
}
/*[ELSE] Panama */
import java.util.List;
import jdk.internal.invoke.NativeEntryPoint;

class NativeMethodHandle extends MethodHandle {
public static MethodHandle make(NativeEntryPoint entryPoint, MethodHandle mh) {
throw OpenJDKCompileStub.OpenJDKCompileStubThrowError();
}

private NativeMethodHandle(MethodType mt, LambdaForm lf, MethodHandle mh, NativeEntryPoint entryPoint) {
super(mt, lf);
throw OpenJDKCompileStub.OpenJDKCompileStubThrowError();
}

@Override
boolean addRelatedMHs(List<MethodHandle> relatedMHs) {
throw OpenJDKCompileStub.OpenJDKCompileStubThrowError();
}
}
/*[ENDIF] Panama */

0 comments on commit a3d9657

Please sign in to comment.