-
-
Notifications
You must be signed in to change notification settings - Fork 666
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
feat: store local name in debug mode binary #2437
feat: store local name in debug mode binary #2437
Conversation
7cce427
to
b11dcef
Compare
One question that remains is whether local names should also be set when optimizing. From what I've seen, when optimizations are enabled and locals are merged or moved around, the names don't match anymore, which is not so much a problem in a binary, but is weird in optimized text format outputs which then don't make sense anymore. Could be prevented by only setting the names when |
Or rather look for |
I think it's better |
I don't find |
Ah, you are right, there is no parameter for debug info yet. I guess for now |
What this doesn't solve, btw, just to note, is that scoped variables are shared. Say in {
let a = 1;
}
{
let b = 2;
} there is only one concrete local since |
Is it possible to ignore free temp local in |
Currently there is an unfortunate cross-dependency I believe that is introduced by a few places where code is re-compiled. What happens there is:
Now, if locals weren't shared, re-compilation would produce garbage locals I think. I guess this would have to be tackled prior in order to guarantee proper names. Generally good to fix this eventually I think, and always use a dedicated local per name that isn't freed. |
Thanks! |
The goal of PR is to output local variant name into
wasm
custom section andwat
file for easier debug.