Skip to content

Commit

Permalink
This PR just renamed all the #isReferencedIn: to be isAccessedIn:
Browse files Browse the repository at this point in the history
We should really start to merge ClyVariable with Variable.... 

No deprecation as it was a private method of Calypso
  • Loading branch information
MarcusDenker committed Jul 17, 2020
1 parent de6c80c commit 03c4759
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
16 changes: 8 additions & 8 deletions src/Calypso-SystemQueries/ClyVariable.class.st
Expand Up @@ -115,6 +115,14 @@ ClyVariable >> hash [
^ definingClass hash bitXor: actualVariable hash
]

{ #category : #testing }
ClyVariable >> isAccessedIn: aMethod [

(self isAccessibleFrom: aMethod origin) ifFalse: [ ^false ].

^(actualVariable isReadIn: aMethod) or: [ actualVariable isWrittenIn: aMethod ]
]

{ #category : #testing }
ClyVariable >> isAccessibleFrom: aClass [
self subclassResponsibility
Expand All @@ -139,14 +147,6 @@ ClyVariable >> isReadIn: aMethod [
^actualVariable isReadIn: aMethod
]

{ #category : #testing }
ClyVariable >> isReferencedIn: aMethod [

(self isAccessibleFrom: aMethod origin) ifFalse: [ ^false ].

^(actualVariable isReadIn: aMethod) or: [ actualVariable isWrittenIn: aMethod ]
]

{ #category : #testing }
ClyVariable >> isWrittenIn: aMethod [

Expand Down
Expand Up @@ -106,7 +106,7 @@ ClyVariableReferencesQuery >> doesMethod: aMethod useAnyOf: vars [
{ #category : #testing }
ClyVariableReferencesQuery >> doesMethod: aMethod useVar: aVariable [

^aVariable isReferencedIn: aMethod
^aVariable isAccessedIn: aMethod
]

{ #category : #comparing }
Expand Down
12 changes: 6 additions & 6 deletions src/Kernel/LiteralVariable.class.st
Expand Up @@ -113,6 +113,12 @@ LiteralVariable >> installingIn: aClass [
"I am called by the class builder. This way a class variable can change the class it is installed in"
]

{ #category : #queries }
LiteralVariable >> isAccessedIn: aMethod [

^(self isReadIn: aMethod) or: [ self isWrittenIn: aMethod ]
]

{ #category : #testing }
LiteralVariable >> isGlobalClassNameBinding [
^ self value isClassOrTrait
Expand All @@ -137,12 +143,6 @@ LiteralVariable >> isReferenced [
behavior hasSelectorReferringTo: self ]
]

{ #category : #queries }
LiteralVariable >> isReferencedIn: aMethod [

^(self isReadIn: aMethod) or: [ self isWrittenIn: aMethod ]
]

{ #category : #testing }
LiteralVariable >> isSelfEvaluating [
^ self key isSelfEvaluating and: [self value isSelfEvaluating]
Expand Down
12 changes: 6 additions & 6 deletions src/Ring-Core/RGBehavior.class.st
Expand Up @@ -545,6 +545,12 @@ RGBehavior >> initializeUnresolved [

]

{ #category : #'queries - testing' }
RGBehavior >> isAccessedIn: anRGMethod [

^ (anRGMethod ast variableNodes select: #isGlobal) anySatisfy: [ :each | each name = self name ]
]

{ #category : #testing }
RGBehavior >> isBehavior [

Expand Down Expand Up @@ -593,12 +599,6 @@ RGBehavior >> isPointers [
^ self isBits not
]

{ #category : #'queries - testing' }
RGBehavior >> isReferencedIn: anRGMethod [

^ (anRGMethod ast variableNodes select: #isGlobal) anySatisfy: [ :each | each name = self name ]
]

{ #category : #'queries - testing' }
RGBehavior >> isRootInEnvironment [

Expand Down

0 comments on commit 03c4759

Please sign in to comment.