On Tue, 7 Mar 2023 08:35:34 GMT, Adam Sotona <asot...@openjdk.org> wrote:

>> 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".
>
> I'm sorry my answer was inaccurate, what I'm proposing is 
> `transformBlock(Consumer<BlockCodeBuilder>, CodeTransform)` or 
> `transformedBlock(Consumer<BlockCodeBuilder>, CodeTransform)`. 
> `BlockCodeBuilder` is just an extension of `CodeBuilder` with ability to 
> break block execution.
> Block is a sub-unit of code, so I expect it would be a logical extension of 
> the actual `block(Consumer<BlockCodeBuilder>`.
> I'll move this discussion to the mailing list to make common decision about 
> API change.
> Thanks.

This topic is now tracked as RFE

-------------

PR: https://git.openjdk.org/jdk/pull/10982

Reply via email to