You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2019/02/06 16:41:45 UTC

[GitHub] joshtynjala edited a comment on issue #76: Named local functions inside method in MXML not emitted in JS

joshtynjala edited a comment on issue #76: Named local functions inside method in MXML not emitted in JS
URL: https://github.com/apache/royale-compiler/issues/76#issuecomment-461093470
 
 
   Confirmed that a new FunctionNode is created for each function in an MXML script twice, and only once in AS3.
   
   For a local function in AS3, the `EnumSet<PostProcessStep>` passed to `analyze()` contains `[CALCULATE_OFFSETS, POPULATE_SCOPE, RECONNECT_DEFINITIONS]`.
   
   In MXML, the first time a local function is created, the call to `analyze()` contains `[CALCULATE_OFFSETS, POPULATE_SCOPE]` and the second time it's `[CALCULATE_OFFSETS, RECONNECT_DEFINITIONS]`.
   
   Our call to `rememberLocalFunction()` happened only when the set contained `POPULATE_SCOPE`, so `rememberLocalFunction()` wasn't being called the second time, causing the local function to be... well, forgotten.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services