Hi Nicolai.Now your proposals in slice��17496.We change it a little bit: we make SelectorsTable lazy. And code completion uses it too.
2016-01-16 22:17 GMT+01:00 Nicolai Hess <nicolaihess@gmail.com>:2016-01-16 13:46 GMT+01:00 Marcus Denker <marcus.denker@inria.fr>:On 16 Jan 2016, at 13:26, Nicolai Hess <nicolaihess@gmail.com> wrote:2016-01-16 10:11 GMT+01:00 Marcus Denker <marcus.denker@inria.fr>:I'm trying to think.anyone an idea?
Looks like it would be good to be able to make a distinction between symbols and selectors (selectors installed
in method dictionaries)
yes, this would improve code completion a bit, too, as there are more symbols than symbols that are actually namesof methods.The data could be created per environment (Smalltalk globals) the first time and then cached till shutdown.(it would be an array of size 46451, pointing to existing symbols).The environment could cache sent selectors, too��� pablo did an experiment with that.Marcus��How about a new SymbolTable "SelectorTable" that gets new entries on every method compilation ?maybe better when a method is added to a Method Dictionary? This way even adding things the strangeway would work...I tried some methods from TBehavior basicAddSelector:withMethod:but for example Nautilus, directly modifies method dict��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.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 thisselector is set as a selector on CompiledMethodand uses findInternedSelector .... in RubStyler visitMessageNode)��Marcus