We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When comparing Null<Int> with Int, HL will allocate instead of doing two checks, one for null and one for the integer.
Null<Int>
Int
For example:
class Main { public var x : Null<Int>; static function main() { var m = new Main(); var b = m.x == 3; trace(b); } }
This produces:
.10 @1 call 1, Main.new(0) .11 @2 field 3,0[6] .11 @3 int 4,@7 .11 @4 todyn 5,4 .11 @5 jeq 3,5,2
Instead of
.10 @0 new 0 .10 @1 call 1, Main.new(0) .11 @2 field 3,0[6] .11 @3 jnull 3,6 .11 @5 safecast 4,3 .11 @6 int 5,@7 .11 @7 jnoteq 4,5,2
The text was updated successfully, but these errors were encountered:
Note that #8426 was never merged, and I don't remember if HL ever fully passed these tests (our conversation there suggests that it didn't).
Sorry, something went wrong.
Fixed by #11612
yuxiaomao
No branches or pull requests
When comparing
Null<Int>
withInt
, HL will allocate instead of doing two checks, one for null and one for the integer.For example:
This produces:
Instead of
The text was updated successfully, but these errors were encountered: