RFR: 8355323: JShell LocalExecutionControl should add stopCheck() at method entry [v2]

Archie Cobbs acobbs at openjdk.org
Thu Apr 24 21:53:18 UTC 2025


On Thu, 24 Apr 2025 21:12:47 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Archie Cobbs has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Refactoring based on review.
>
> src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java line 102:
> 
>> 100:                             CodeTransform.ofStateful(() -> {
>> 101:                                 Set<Label> priorLabels = new HashSet<>();
>> 102:                                 AtomicBoolean methodEntry = new AtomicBoolean();
> 
> Instead of doing this hack, I think you should do so by overriding `CodeTransform.atStart` instead. Unfortunately we did not provide a utility for it like `endHandler`.

Makes sense - thanks. We'll have to delambdify but the result is easier to understand. Updated in 1eae6ac3ed2.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24859#discussion_r2059288430


More information about the kulla-dev mailing list