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

8283237: CallSite should be a sealed class #7840

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions test/hotspot/jtreg/vmTestbase/vm/mlvm/cp/share/GenFullCP.java
Original file line number Diff line number Diff line change
@@ -62,9 +62,6 @@ protected static String fd(String className) {

protected static final String VOID_NO_ARG_METHOD_SIGNATURE = "()V";

protected static final String NEW_INVOKE_SPECIAL_CLASS_NAME = "java/lang/invoke/NewInvokeSpecialCallSite";
protected static final String NEW_INVOKE_SPECIAL_BOOTSTRAP_METHOD_SIGNATURE = "(" + fd(JLI_METHODHANDLES_LOOKUP) + fd(JL_STRING) + fd(JLI_METHODTYPE) + ")V";

protected static final String INIT_METHOD_NAME = "<init>";
protected static final String STATIC_INIT_METHOD_NAME = "<clinit>";

Original file line number Diff line number Diff line change
@@ -44,36 +44,6 @@ public static void main(String[] args) {
ClassfileGenerator.main(args);
}

/**
* Creates static init method, which constructs a call site object, which refers to the target method
* and invokes Dummy.setMH() on this call site
* @param cw Class writer object
*/
@Override
protected void createClassInitMethod(ClassWriter cw) {
MethodVisitor mw = cw.visitMethod(
Opcodes.ACC_PUBLIC + Opcodes.ACC_STATIC,
STATIC_INIT_METHOD_NAME, INIT_METHOD_SIGNATURE,
null,
new String[0]);

mw.visitMethodInsn(Opcodes.INVOKESTATIC, JLI_METHODHANDLES, "lookup", "()" + fd(JLI_METHODHANDLES_LOOKUP));
mw.visitLdcInsn(Type.getObjectType(fullClassName));
mw.visitLdcInsn(TARGET_METHOD_NAME);
mw.visitLdcInsn(TARGET_METHOD_SIGNATURE);
mw.visitLdcInsn(Type.getObjectType(fullClassName));
mw.visitMethodInsn(Opcodes.INVOKEVIRTUAL, JL_CLASS,
"getClassLoader", "()" + fd(JL_CLASSLOADER));
mw.visitMethodInsn(Opcodes.INVOKESTATIC, JLI_METHODTYPE,
"fromMethodDescriptorString", "(" + fd(JL_STRING) + fd(JL_CLASSLOADER) + ")" + fd(JLI_METHODTYPE));
mw.visitMethodInsn(Opcodes.INVOKEVIRTUAL, JLI_METHODHANDLES_LOOKUP,
"findStatic", "(" + fd(JL_CLASS) + fd(JL_STRING) + fd(JLI_METHODTYPE) + ")" + fd(JLI_METHODHANDLE));
mw.visitMethodInsn(Opcodes.INVOKESTATIC, NEW_INVOKE_SPECIAL_CLASS_NAME,
"setMH", "(" + fd(JLI_METHODHANDLE) + ")V");

finishMethodCode(mw);
}

/**
* Disables invoke dynamic CP entry caching and generate default common data
* @param cw Class writer object
@@ -92,20 +62,14 @@ protected void generateCommonData(ClassWriterExt cw) {
*/
@Override
protected void generateCPEntryData(ClassWriter cw, MethodVisitor mw) {
Handle bsm;
if (Env.getRNG().nextBoolean()) {
bsm = new Handle(Opcodes.H_NEWINVOKESPECIAL,
NEW_INVOKE_SPECIAL_CLASS_NAME,
INIT_METHOD_NAME,
NEW_INVOKE_SPECIAL_BOOTSTRAP_METHOD_SIGNATURE);
} else {
bsm = new Handle(Opcodes.H_INVOKESTATIC,
this.fullClassName,
BOOTSTRAP_METHOD_NAME,
BOOTSTRAP_METHOD_SIGNATURE);
}
Handle bsm = new Handle(Opcodes.H_INVOKESTATIC,
this.fullClassName,
BOOTSTRAP_METHOD_NAME,
BOOTSTRAP_METHOD_SIGNATURE);
mw.visitInvokeDynamicInsn(TARGET_METHOD_NAME,
TARGET_METHOD_SIGNATURE,
bsm);
}


}

This file was deleted.