Open fourst4r opened 1 year ago
Yeahhh, reflaxe/C++ has its own custom DCE system (kind of like the JS target), but I completely forgot to account for @:keep
. Good find!! ^^
Hah, that explains why the DCE is so good, on the Lua target compiling function main() {}
with --dce=full
outputs about 700 lines of Lua.
Also FYI there's a @:dce
meta you can apply to types as well which
Forces dead code elimination even when
--dce full
is not specified.
@:keep
should be fixed if you update Reflaxe, but leaving this open since also need to resolve @:dce
👌
Aha now it make sense In my go target, I had too keep smartDCE off otherwise I was losing some importent classes, next time I will try to fine a common denominator.
Reflaxe does not honour the @:keep meta which says
https://haxe.org/manual/cr-dce.html
Other targets will always generate a class that has @:keep meta regardless of if it is used or not.