mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8323058: Revisit j.l.classfile.CodeBuilder API surface
Reviewed-by: briangoetz, psandoz
This commit is contained in:
parent
286cbf831c
commit
ae82405ff7
53 changed files with 725 additions and 876 deletions
|
@ -1124,7 +1124,7 @@ public final class StringConcatFactory {
|
|||
}
|
||||
}
|
||||
len += args.parameterCount() * ARGUMENT_SIZE_FACTOR;
|
||||
cb.constantInstruction(len);
|
||||
cb.loadConstant(len);
|
||||
cb.invokespecial(STRING_BUILDER, "<init>", INT_CONSTRUCTOR_TYPE);
|
||||
|
||||
// At this point, we have a blank StringBuilder on stack, fill it in with .append calls.
|
||||
|
@ -1137,7 +1137,7 @@ public final class StringConcatFactory {
|
|||
}
|
||||
Class<?> cl = args.parameterType(c);
|
||||
TypeKind kind = TypeKind.from(cl);
|
||||
cb.loadInstruction(kind, off);
|
||||
cb.loadLocal(kind, off);
|
||||
off += kind.slotSize();
|
||||
MethodTypeDesc desc = getSBAppendDesc(cl);
|
||||
cb.invokevirtual(STRING_BUILDER, "append", desc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue