On 4/19/17, 3:25 PM, "Harbs" <harbs.li...@gmail.com> wrote:
>Currently as code which looks like this. >var myThingy:Vector.<Thingy> = new Vector.<Thingy>(), it is cross >compiled in JS to this: > >var myThingy = org.apache.flex.utils.Language.Vector(); > >Considering that this simple returns an empty array, a compiler >optimization could be: > >var myThingy = []; > >Besides being shorter and more efficient to run, it also eliminates a >dependency on org.apache.flex.utils.Language.Vector. This dependency just >tripped me up in a const (considering that I’m having issues with the >order of file loading when initializing constants in classes). > >Thoughts? I don't know if there are other places where the compiler checks a set of tokens like that, but the code paths it currently goes down don't. So, we could try some special case code, I suppose. FWIW, I think this is one of the things the BURM is supposed to be good at. -Alex