-
Notifications
You must be signed in to change notification settings - Fork 99
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
Inconsistent result #164
Comments
This is interesting problem. It seems like MuJS doesn't assign function name as variable in scope, because if you create the |
MuJS treats the current function name "a" as a local variable. Assigning to "a" changes the local variable, instead of setting a global variable. Therefore the second and third calls to a() are still calling the original function, rather than the anonymous inner function. |
The core issue here is how the difference between function declarations (statements) and function expressions work with binding the function name. For expressions, the binding is a local immutable binding. For declarations, the binding is in the outer scope. MuJS gets both of these wrong... Example 1:
Example 2:
|
TODO: Make binding for function expression names immutable!
Hi there, the POC below outputs differently on mujs than on v8/jsc/chakracore.
This POC seems to represent the root cause of a larger program hanging on mujs but not on v8/jsc/chakracore.
Thanks.
The text was updated successfully, but these errors were encountered: