On Fri Jun 16 14:55:24 2023 +0000, Gabriel Ivăncescu wrote:
What about functions in inner scopes exposed back to the base scope? (the last jsdisp_propput_name in detach_scope). Won't we still need variable obj for them, since they can be names not found in the base scope's locals at all? And if we still need it then I think special casing those two isn't worth it. Unless you have an idea how to handle it in acceptable way?
Unless I'm missing something, we currently need function-named property in variable object only because `identifier_eval` can't handle it otherwise for detached scopes. But if we make `identifier_eval` able to handle it for detached cases, there is no need to involve variable object.
BTW, I know that it's quite a large side quest for what you intended to fix and it's fine if you'd limit the scope only to arguments. I'm mentioning it because, due to above, the patch using scope object as variable object looks questionable to me, but you don't really need that part for the original bug.