The compiler that translates Python bytecode to our IR handles globals, resolving them to the appropriate function calls eventually. To do this the globals are pushed on the parser-stack, but no code is emitted. This means that if we "leak" such a global, the stack of the IR is corrupt. This could happen when e.g. using a variable name that does not exist, resulting in really unfriendly error messages. This PR fixes that by tracking such globals much better.
The compiler that translates Python bytecode to our IR handles globals, resolving them to the appropriate function calls eventually. To do this the globals are pushed on the parser-stack, but no code is emitted. This means that if we "leak" such a global, the stack of the IR is corrupt. This could happen when e.g. using a variable name that does not exist, resulting in really unfriendly error messages. This PR fixes that by tracking such globals much better.