Skip to content
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

8694-Instance-of-DoItVariable-did-not-understand-markRead #8774

Conversation

MarcusDenker
Copy link
Member

DoItVariable needs to forward the read/write usage messages as it can wrap a temporary variable.

fixes #8694

@MarcusDenker MarcusDenker added Status: Need more work The issue is nearly ready. Waiting some last bits. and removed Status: Tests passed please review! Status: Need more work The issue is nearly ready. Waiting some last bits. labels Mar 12, 2021
@MarcusDenker MarcusDenker merged commit 2ef8c38 into pharo-project:Pharo9.0 Mar 16, 2021
dionisiydk added a commit to dionisiydk/pharo that referenced this pull request Apr 20, 2021
… 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 pharo-project#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instance of DoItVariable did not understand #markRead
2 participants