Symbol allSymbols asBag occurrencesOf: #a
allSymbols returns an array of all symbols. The reason it contains #a twice: There is OneCharacterSymbols.
the #asSymbol puts the OneCharacterSymbols in the main symbol table already.
Then OneCharacterSymbols is just used by #allSymbols and #selectorsContaining:, with the latter having no users.
https://github.com/pharo-project/pharo/pull/11241
Besides the bugfix, it removes some one Character symbols that never got used and speeds up #allSymbols a little.
And it simplifies the code related to the symbol table a little, which will make it easier to improve it later.
Marcus
Symbol allSymbols asBag occurrencesOf: #a
allSymbols returns an array of all symbols. The reason it contains #a twice: There is OneCharacterSymbols.
- it is initialized with:
OneCharacterSymbols := (1 to: 256) collect: [ :i | (i - 1) asCharacter asSymbol].
the #asSymbol puts the OneCharacterSymbols in the main symbol table already.
Then OneCharacterSymbols is just used by #allSymbols and #selectorsContaining:, with the latter having no users.
https://github.com/pharo-project/pharo/pull/11241
Besides the bugfix, it removes some one Character symbols that never got used and speeds up #allSymbols a little.
And it simplifies the code related to the symbol table a little, which will make it easier to improve it later.
Marcus