Changes

Summary

  1. 1. It refactor the semantics analyzer to not rely on #isLocalVariable message and use a dispatch to the variable instead: #analyzeRead:by: and analyzeWrite:by: (details)
  2. Missing #analyze methods in RGVariable (details)
Commit 65c21d33d04e0df09247d83cd7a87347def215d0 by dionisiydk
1. It refactor the semantics analyzer to not rely on #isLocalVariable message and use a dispatch to the variable instead: #analyzeRead:by: and analyzeWrite:by:
The changes are based on recently introduced visit~ConcreteTypeOf~Variable: methods in AST visitors. 
Related to this idea several renames are introduced: #analyseEscapingRead: and #analyseEscapingWrite:  are replaced by #analyzeLocalVariableRead: and #analyzeLocalVariableWrite: accordingly
The driver for this refactoring is DoItVariable issue (recently fixed #8774) when it represents the external temp during a compilation. Compiler is trying to call some locals specific code during doIt compilation and it was failing because DoItVariable is not a local for newly compiled doIt methods. The Marcus fix introduced missing methods. But this PR allows to avoid it completely.
2. It optimizes how variables are represented in doIt expressions. The idea is that only variables which can't be used directly in doIts needs to be converted. And it is only local variables.
Therefore Variable>>#asDoItVariable will returns self as default behaviour. And local variables will be converted to DoItVariable instances.
The file was modifiedsrc/Kernel/Variable.class.st (diff)
The file was modifiedsrc/OpalCompiler-Core/OCASTSemanticAnalyzer.class.st (diff)
The file was modifiedsrc/Slot-Tests/DoItVariableTest.class.st (diff)
The file was modifiedsrc/Kernel/DoItVariable.class.st (diff)
The file was modifiedsrc/OpalCompiler-Core/OCASTClosureAnalyzer.class.st (diff)
The file was addedsrc/OpalCompiler-Core/Variable.extension.st
The file was modifiedsrc/OpalCompiler-Core/LocalVariable.class.st (diff)
Commit 27a90bc82996115612e8ab4ac8eed93cc836bcc3 by dionisiydk
Missing #analyze methods in RGVariable
The file was modifiedsrc/Ring-Core/RGVariable.class.st (diff)