8298590: Refactor LambdaForm constructors

Reviewed-by: redestad
This commit is contained in:
Jorn Vernee 2023-01-02 12:06:26 +00:00
parent d812022890
commit 0532045edb
8 changed files with 88 additions and 69 deletions

View file

@ -297,7 +297,7 @@ sealed class DirectMethodHandle extends MethodHandle {
result = NEW_OBJ;
}
names[LINKER_CALL] = new Name(linker, outArgs);
LambdaForm lform = new LambdaForm(ARG_LIMIT, names, result, kind);
LambdaForm lform = LambdaForm.create(ARG_LIMIT, names, result, kind);
// This is a tricky bit of code. Don't send it through the LF interpreter.
lform.compileToBytecode();
@ -814,9 +814,9 @@ sealed class DirectMethodHandle extends MethodHandle {
LambdaForm form;
if (needsCast || needsInit) {
// can't use the pre-generated form when casting and/or initializing
form = new LambdaForm(ARG_LIMIT, names, RESULT);
form = LambdaForm.create(ARG_LIMIT, names, RESULT);
} else {
form = new LambdaForm(ARG_LIMIT, names, RESULT, kind);
form = LambdaForm.create(ARG_LIMIT, names, RESULT, kind);
}
if (LambdaForm.debugNames()) {