Judging by the comments in the file, Mike meant to get rid of this class. I'm guessing it was added as a temporary hack to get things up and running as quickly as possible, which was a very important thing earlier in the life of FalconJX. Sometimes, things that we know are "super-duper-ultra-bad" are worth their cost in order to get momentum going.
Indeed, though, now that the project is maturing, it may be a good time to consider refactoring this part to clean things up a bit. - Josh On Sat, May 7, 2016 at 9:33 AM, Christofer Dutz <christofer.d...@c-ware.de> wrote: > Ok ... in a final struggle to at least have something to show at my talk > at ApacheCon I dug really deep into the compiler and noticed one thing: > > > There's a class called: JSSharedData, which contains a set of public > static variables for containing the state of a compilation (I guess). The > problem is that the values inside are set by the constructors of the > compilers ... well actually just MXMLJSC but as COMPJSC extends from that > also from that. In the FlexJSToolGroup I create an instance of any tool the > group has. First one of COMPJSC and then MXMLJSC. So when creating the > MXMLJSC instance all the static global variables correctly initialized by > COMPJSC are overwritten by those of MXMLJSC. The reason I didn't notice > this, was that in my last attempt I only used MXMLJSC in my examples from > Flexmojos. > > > This "one state that's shared between compiler instances" is really bad as > the VM isn't destroyed during the build, this means that eventually > settings from one module could leak to another module. I guess it would be > absolutely impossible to track down problems like this. "public > static"-Variables for maintaining the State of an instance of anything is > super-duper-ultra-bad ... we have to change this. > > > Chris >