Skip to content
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

Compiler Bug regarding Function Hoisting #488

Open
TobiasWienand opened this issue Dec 30, 2024 · 1 comment
Open

Compiler Bug regarding Function Hoisting #488

TobiasWienand opened this issue Dec 30, 2024 · 1 comment

Comments

@TobiasWienand
Copy link
Contributor

Here is a before and after after compiling before.js to after.js

// before.js

console.log(two);
function two() {
}
// after.js

console.log(two);
function f3() {
}
@saelo
Copy link
Collaborator

saelo commented Dec 31, 2024

Right, hoisting doesn't currently work as it's somewhat fundamentally related to variable names, which we loose during compilation. But I think we're pretty close to supporting this: #486 should be the first part and I have a local patch set that adds a .functionName property to FuzzIL functions. These two taken together should allow us to properly support function hoisting :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants