I tried some methods from TBehavior basicAddSelector:withMethod:
but for example Nautilus, directly modifies method dict
Where? we should fix it.
I hacked a simple experimental version.
But I don't yet understand the workflow for initialisation of the
Symbol class (with rehash, interned, and compacting).
If we hook into adding methods, then compactSymbolTable and rehash
could just reset the SelectorTable and fill it after by going over
all methods…
see attached changesets.
I will have a look.
I know that andres valloud implemented a better SymbolTable but he never
released it open-source.
load with:
DangerousClassNotifier disableDuring:[
String subclass: #Symbol
instanceVariableNames: ''
classVariableNames: 'NewSymbols OneCharacterSymbols SymbolTable
SelectorTable'
package: 'Collections-Strings'
].
DangerousClassNotifier disableDuring:[
'selectortable.1.cs'
asFileReference fileIn.
].
Symbol initSelectorTable.
'use_selector_table.cs' asFileReference fileIn.
what do you think ?
(selectortable.cs defines SelectorTable and some methods in Symbol and
String)
(use_selector_table adds selectors as internedSelectorSymbol if this
selector is set as a selector on CompiledMethod
and uses findInternedSelector .... in RubStyler visitMessageNode)
Marcus