Skip to content

[hl] optimize closure null check - #13045

Open
yuxiaomao wants to merge 1 commit into
HaxeFoundation:developmentfrom
yuxiaomao:dev-hl-opt-closure
Open

yuxiaomao wants to merge 1 commit into
HaxeFoundation:developmentfrom
yuxiaomao:dev-hl-opt-closure

Conversation

@yuxiaomao

Copy link
Copy Markdown
Contributor

The goal was to remove some null check when we know that the closure is valid, when working on #13043:

.14    @5 staticclosure 2, fun$34
.14    @6 jnotnull 2,2                   ; <- not necessary
.14    @7 null 3
.14    @8 jalways 1
.14    @9 instanceclosure 3, fun$32(2)
.14    @A setfield 0[0],3

and becomes

.14    @5 staticclosure 2, fun$34
.14    @6 instanceclosure 3, fun$32(2)
.14    @7 setfield 0[0],3

I'll probably test it a little bit more and write some hlcode tests later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant