8178480: Wrong exception being thrown on an invalid MethodType
Reviewed-by: psandoz
This commit is contained in:
parent
864cf0d5ca
commit
3b47209a32
@ -673,9 +673,7 @@ class InvokerBytecodeGenerator {
|
||||
/**
|
||||
* Generate customized bytecode for a given LambdaForm.
|
||||
*/
|
||||
static MemberName generateCustomizedCode(LambdaForm form) {
|
||||
final MethodType invokerType = form.methodType();
|
||||
|
||||
static MemberName generateCustomizedCode(LambdaForm form, MethodType invokerType) {
|
||||
MemberName pregenerated = lookupPregenerated(form, invokerType);
|
||||
if (pregenerated != null) return pregenerated; // pre-generated bytecode
|
||||
|
||||
|
@ -847,9 +847,14 @@ class LambdaForm {
|
||||
if (vmentry != null && isCompiled) {
|
||||
return; // already compiled somehow
|
||||
}
|
||||
assert(vmentry == null || vmentry.getMethodType().basicType().equals(methodType()));
|
||||
|
||||
// Obtain the invoker MethodType outside of the following try block.
|
||||
// This ensures that an IllegalArgumentException is directly thrown if the
|
||||
// type would have 256 or more parameters
|
||||
MethodType invokerType = methodType();
|
||||
assert(vmentry == null || vmentry.getMethodType().basicType().equals(invokerType));
|
||||
try {
|
||||
vmentry = InvokerBytecodeGenerator.generateCustomizedCode(this);
|
||||
vmentry = InvokerBytecodeGenerator.generateCustomizedCode(this, invokerType);
|
||||
if (TRACE_INTERPRETER)
|
||||
traceInterpreter("compileToBytecode", this);
|
||||
isCompiled = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user