ROYALE_CLASS_INFO is something which is output for every class and not optimized away by the Google Closure Compiler. I’m trying to understand why and whether there’s some way this can be optimized.
1. What prevents the compiler from removing this property? It’s not @exported. 2. Why is it being prevented from being optimized away? I see it’s used in 10 different files. It’s obviously being assumed to exist for various reflection tasks. Is part of the problem that the compiler might not be able to infer the type of an instance? 3. Why is “names” an array? ActionScript does not support multiple inheritance. 4. Would it be less code to use some kind of ClassInfo object or utility function rather than use object literals for every single class? It feels like yes. Harbs
