Open pecheny opened 1 year ago
One more curious effect, this sample fails to compile on last release with no dce enabled, but works on nightly.
Yeah, that hl bug has been fix on development and the fix will be included in 4.3.3
@kLabz, BTW would 4.3.3 include https://github.com/HaxeFoundation/haxe/issues/11293 fix ? I'm curious about testing Armory on a phone, and this one breaks compilation. And when the release planned?
@kLabz, BTW would 4.3.3 include #11293 fix ? I'm curious about testing Armory on a phone, and this one breaks compilation. And when the release planned?
Yep, just released 4.3.3 and that fix is included https://github.com/HaxeFoundation/haxe/releases/tag/4.3.3
Regarding your issue, it might be related to hlopt. Can you try disabling it with -D hl-no-opt
?
(replacing the loop with a lambda call works, whichever function is inline; sounds like the look is getting a wrong optimization https://try.haxe.org/#d885c2df)
I discovered that simple signal implementation i've always used, passes garbage instead of numbers to callback on hl target. In the original implementation i have macro dispatch() function for listeners call. Trying to minimize reproduction of the bug i've found that inline function may work the same.
if both
listen()
anddispatch()
are inline, the code works fine. Ifdispatch()
only is inline, the code fails in runtime withUncaught exception: Access violation
(Hl only again).Minimal example with macro function works fine, bun on my codebase passes garbage as well.
https://try.haxe.org/#6Bfb676e
One more curious effect, this sample fails to compile on last release with no dce enabled, but works on nightly.