UnstableChanges

Summary

  1. The classes modeling self, super and thisContext reference the global environment directly (via SystemNavigation new). (details)
Commit 94f62f38edd561433f6ed847988bd6b332ec4f34 by marcus.denker
The classes modeling self, super and thisContext reference the global environment directly (via SystemNavigation new).

This PR instead adds the environment as state. This will allow us to later have different instances for different environments. For now the envrionment remains hardcodes, but just in #initialize instead of all #usingMethods implementations.

(The idea is that all subclasses of Variable should implement #scope. They should know the scope that will return them when looking up by name using #lookupVar:. The scope for self, super and thisContext will be the global environment)

The PR in addition adds a missing visitor methid to the completion builder.
The file was modifiedsrc/OpalCompiler-Core/ReservedVariable.class.st (diff)
The file was modifiedsrc/HeuristicCompletion-Model/CoASTResultSetBuilder.class.st (diff)
The file was modifiedsrc/OpalCompiler-Core/ThisContextVariable.class.st (diff)
The file was modifiedsrc/OpalCompiler-Core/SuperVariable.class.st (diff)
The file was modifiedsrc/OpalCompiler-Core/SelfVariable.class.st (diff)