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] separation between isTemp from the compiler/AST pov #6013
Conversation
…ne (which is the VM view of temp) with isArgOrTemp
failures are unrelated, see 6023 |
Maybe we can keep isTemp for all kind of temps. But in addition we can add isArgument. |
#isArgument is already there (AST point of view) Also, isTemp from the compiler POV is arg + temp, |
Oh, It looks really messy. The binding object is always there whatever we do with semantic analysis. |
I assume it's because they both got developed concurrently, so some stuff got intertwined. "The binding object is always there whatever we do with semantic analysis." And when I move a node to be temporary from argument for example, I loose the binding (which I don't care about). This prevents me to use those selectors without custom overrides. |
See my comment in another PR on idea to rely only on bindings. I think it will allow to simplify such operations.
Here it could be something like: RBVariableNode>>beTempVariable
binding := OCTempVariable inScope: binding scope. I see that now #parseTree does not add any binding to variable nodes. But we can have something as default (OCUnresolvedVariable). Now I also wonder why we use a #binding name here instead of #variable (all OC hierarchy is about variables). |
But I understand now we have what we have. So what I wrote is just ideas |
isTemp from the compiler pov == isArgOrTemp (because the VM treats them the same way)
We now have 2 different perspective for isTemp.
Compiler tests passing, we'll see with the CI for the others.