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

@ -776,11 +776,11 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
if (PROFILE_GWT) {
int[] counts = new int[2];
mh = (BoundMethodHandle)
BoundMethodHandle.speciesData_LLLL().constructor().invokeBasic(type, form,
BoundMethodHandle.speciesData_LLLL().factory().invokeBasic(type, form,
(Object) test, (Object) profile(target), (Object) profile(fallback), counts);
} else {
mh = (BoundMethodHandle)
BoundMethodHandle.speciesData_LLL().constructor().invokeBasic(type, form,
BoundMethodHandle.speciesData_LLL().factory().invokeBasic(type, form,
(Object) test, (Object) profile(target), (Object) profile(fallback));
}
} catch (Throwable ex) {
@ -1089,7 +1089,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
BoundMethodHandle.SpeciesData data = BoundMethodHandle.speciesData_LLLLL();
BoundMethodHandle mh;
try {
mh = (BoundMethodHandle) data.constructor().invokeBasic(type, form, (Object) target, (Object) exType,
mh = (BoundMethodHandle) data.factory().invokeBasic(type, form, (Object) target, (Object) exType,
(Object) catcher, (Object) collectArgs, (Object) unboxResult);
} catch (Throwable ex) {
throw uncaughtException(ex);
@ -1885,7 +1885,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
BoundMethodHandle.SpeciesData data = BoundMethodHandle.speciesData_LLL();
BoundMethodHandle mh;
try {
mh = (BoundMethodHandle) data.constructor().invokeBasic(type, form, (Object) clauseData,
mh = (BoundMethodHandle) data.factory().invokeBasic(type, form, (Object) clauseData,
(Object) collectArgs, (Object) unboxResult);
} catch (Throwable ex) {
throw uncaughtException(ex);
@ -2128,7 +2128,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
BoundMethodHandle.SpeciesData data = BoundMethodHandle.speciesData_LLLL();
BoundMethodHandle mh;
try {
mh = (BoundMethodHandle) data.constructor().invokeBasic(type, form, (Object) target, (Object) cleanup,
mh = (BoundMethodHandle) data.factory().invokeBasic(type, form, (Object) target, (Object) cleanup,
(Object) collectArgs, (Object) unboxResult);
} catch (Throwable ex) {
throw uncaughtException(ex);