Skip to content

Commit

Permalink
fixed StringConcatFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
asotona committed May 2, 2024
1 parent dc9afff commit 4b901d9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ public void accept(CodeBuilder cb) {
}
}
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.
Expand All @@ -1137,7 +1137,7 @@ public void accept(CodeBuilder cb) {
}
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);
Expand Down

0 comments on commit 4b901d9

Please sign in to comment.