On Tue, 1 Oct 2024 07:53:23 GMT, Ioi Lam <ik...@openjdk.org> wrote: >> src/hotspot/share/cds/aotConstantPoolResolver.cpp line 476: >> >>> 474: if (bsm_klass->equals("java/lang/invoke/StringConcatFactory") && >>> 475: bsm_name->equals("makeConcatWithConstants")) { >>> 476: return true; >> >> I think all BSM entries in SCF are deterministic, really. So we can just >> check for the class? > > We haven't done much testing with the other SCF BSMs, so I think it's better > to do that in a follow-up REF.
`StringConcatFactory::makeConcat(…)` is definitely deterministic, as it simply delegates to `StringConcatFactory::makeConcatWithConstants(…)` with the recipe being based on the number of `MethodType` parameters: https://github.com/openjdk/jdk/blob/de90204b60c408ef258a2d2515ad252de4b23536/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java#L231-L240 And there is no other bootstrap method in `StringConcatFactory` at the moment. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21143#discussion_r1792745509