Skip to content

Commit

Permalink
Improve ReGlobalVariablesUsageRule
Browse files Browse the repository at this point in the history
  - use #isGlobalVariable on the semantic info
  - introduce fast #hasClassOrTraitNamed:, we have already hasClassNamed: and use that
  • Loading branch information
MarcusDenker committed Jul 8, 2020
1 parent ce51228 commit ec07aec
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/System-Support/SystemDictionary.class.st
Expand Up @@ -265,6 +265,16 @@ SystemDictionary >> hasClassNamed: aString [
^ false
]

{ #category : #'classes and traits' }
SystemDictionary >> hasClassOrTraitNamed: aString [
"Answer whether there is a class of the given name, but don't intern aString if it's not alrady interned."

Symbol
hasInterned: aString
ifTrue: [:aSymbol | ^ (self at: aSymbol ifAbsent: [nil]) isClassOrTrait].
^ false
]

{ #category : #'system attributes' }
SystemDictionary >> maxIdentityHash [
"Answer the maximum identityHash value supported by the VM."
Expand Down

0 comments on commit ec07aec

Please sign in to comment.