On Mon, 6 Mar 2023 17:34:35 GMT, Adam Sotona <asot...@openjdk.org> wrote:
>> The use-case seems fine to me (and that it only makes sense for building >> code). I still think it's a "transform", but with a different source. Subtly >> changing the name makes it seem different and fundamentally it is not >> AFAICT. If there is a separate name I think it should reflect the difference >> in source input to the transformation, rather than differentiate via the >> present participle. > > I see what you mean. `transforming` was selected to represent the > continuation of the code building process, similar to `trying` and > `catching`. While `transform` may imply that the actual code builder gets > transformed into something else. For example `MethodModel::transformCode` > takes `CodeModel`, applies `CodeTransform` and after that the code of the > actual method is finished. > What about `transformBlock(BlockCodeBuilder, CodeTransform)`? I am unsure how you might use `BlockCodeBuilder`. If the current signature is not changed then `transformFromHandler` seems reasonable (since its the handler that pushes elements into its given builder). The other `transform` is implicitly "transform model". ------------- PR: https://git.openjdk.org/jdk/pull/10982