Open nadako opened 4 years ago
This is difficult because inlining can put bad things in value places. I doubt the current analyzer architecture could support this.
Not sure what you mean by bad things here :)
All of the stuff that used to cause $this
on JS and at this point probably causes crashes and fireworks on various other targets.
I guess I need an example. I quickly tried adding Optimizer.reduce_expression tctx
call after the analyzer run and it seems to fix the code in the original post, but I guess you're talking about something more complicated?
Check the JS unit test output and look for $this
.
Oh, I see, it indeed added a couple of them (while optimizing a lot of other stuff though).
This is because IIFE optimization is done before the analyzer optimization, but maybe it should be done both before and after it.