8184777: Factor out species generation logic from BoundMethodHandle

Co-authored-by: John Rose <john.r.rose@oracle.com>
Reviewed-by: vlivanov
This commit is contained in:
Claes Redestad 2017-11-16 00:58:50 +01:00
parent cc59ccb7d4
commit 433bf8ab65
13 changed files with 1550 additions and 655 deletions

View file

@ -183,8 +183,7 @@ class InvokerBytecodeGenerator {
new java.security.PrivilegedAction<>() {
public Void run() {
try {
String dumpName = className;
//dumpName = dumpName.replace('/', '-');
String dumpName = className.replace('.','/');
File dumpFile = new File(DUMP_CLASS_FILES_DIR, dumpName+".class");
System.out.println("dump: " + dumpFile);
dumpFile.getParentFile().mkdirs();
@ -630,7 +629,7 @@ class InvokerBytecodeGenerator {
String name = form.kind.methodName;
switch (form.kind) {
case BOUND_REINVOKER: {
name = name + "_" + BoundMethodHandle.speciesData(form).fieldSignature();
name = name + "_" + BoundMethodHandle.speciesDataFor(form).key();
return resolveFrom(name, invokerType, DelegatingMethodHandle.Holder.class);
}
case DELEGATE: return resolveFrom(name, invokerType, DelegatingMethodHandle.Holder.class);