-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix multiple nested function substitutions #2458
Conversation
That's surprising to me. Clearly my understanding of closures is wrong. What heuristic do you now use to replace AST_Defun with AST_Function? (In words rather than code). |
This subtle difference from the example above could be substituted without issue: function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) {
// ...
return directives.sort(byPriority);
function byPriority(a, b) {
// ...
}
} The reason should be clear when you consider multiple invocations of
(function Common criteria:
In addition, if function to reference crosses any scope boundaries:
|
Wow. I have to do some reading on closures. How confident are you with the current state of this function symbol substitution logic? |
That's not immediately obvious and certainly worthy of a comment in the code. Could you point to the place in the code where that is now determined? |
Fairly so.
That would be |
That's an interesting place for it. So a constant lambda is one that does not have any out of scope references. That makes sense. Could the fuzzer technically generate test cases for this in its present form? Are there any implications for harmony block scopes within functions? I guess it'd just have |
I'd think so, seeing that we are getting
We utilise |
Any idea when this will be published? This is affecting me as well |
workaround until next release: |
Can you release a new version with this fix? When it will be released? |
fixes #2449