2016-01-24 21:38 GMT+01:00 stepharo <[email protected]>:

> I did not forget just running against time and busy
>
> Le 16/1/16 22:17, Nicolai Hess a écrit :
>
>>
>>
Another possible solution, don't convert strings to symbols in
RBMethod/RBMessagenodes
selectorParts
    ^ self keywords collect: #asSymbol.
selector: aSelector
    keywordsPositions := nil.
    selector := aSelector asSymbol.

this of course needs some changes for the compiler to actually  create
methoddictionary keys and literals for message send by conferting them
explicit to symobls.

There are suprisingly few places to modify.
But the same has to be done for accesses in RBRefactoring classes too. And
this is not as
easy to change as for the compiler :(



> 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 this
>> selector is set as a selector on CompiledMethod
>> and uses findInternedSelector .... in RubStyler visitMessageNode)
>>
>
>
>

Reply via email to