Eliminate unused Haxe code in final SWF

82 views
Skip to first unread message

Harsh Gupta

unread,
Feb 26, 2014, 10:54:27 AM2/26/14
to haxe...@googlegroups.com
I'm compiling the test AIR app with FD4 and Haxe 3.0.1, with the "-dce full" flag set. It still creates an SWF with lots of classes like Boot and Lib, and Boot has a lot of unused functions like log and trace. Can these unused functions be removed?

postite

unread,
Feb 26, 2014, 11:10:15 AM2/26/14
to haxe...@googlegroups.com
try to compile with --no-traces in your hxml
remove -debug flag also.


Harsh Gupta

unread,
Feb 26, 2014, 3:28:39 PM2/26/14
to haxe...@googlegroups.com
I've done that but I still get the "_string_rec", "_trace",
"__clear_trace", "enum_to_string" functions under the flash.Boot class,
among others.

Any way to exclude these from building in? Why does haxe keep these
functions even though they are not used?

I've submitted an issue, I hope its ok :
https://github.com/HaxeFoundation/haxe/issues/2674

Chris D

unread,
Feb 26, 2014, 4:07:21 PM2/26/14
to haxe...@googlegroups.com
I thought dce was a js only feature?

Peter Stefcek

unread,
Feb 26, 2014, 6:43:45 PM2/26/14
to haxe...@googlegroups.com
I had similar problems https://groups.google.com/forum/#!topic/haxelang/iiAFuFOF2jk

Anyway I discovered there is no way to remove Boot, Dynamic and Lib dependency. Although most of it can be removed.
Reply all
Reply to author
Forward
0 new messages