Changes between Version 3 and Version 4 of KeysRefactor

Show
Ignore:
Timestamp:
08/03/09 09:39:37 (12 years ago)
Author:
bacek
Comment:

Unscratch KeysRefactor idea

Legend:

Unmodified
Added
Removed
Modified
  • KeysRefactor

    v3 v4  
    1 === Update === 
    2  
    3 Good idea. Will not work. Consider next PIR code: 
    4 {{{ 
    5   $S0 = "foo"() 
    6   $P1 = $P0[$S0] 
    7 }}} 
    8  
    9 In this case {{{[$S0]}}} will have type {{{KEY_string_FLAG | KEY_integer_FLAG}}} but store integer value of used register. I need something different. Or not to touch Keys at all and treat them as "unavoidable evil"... 
    10  
    11  
    121=== Idea of refactoring Key PMC === 
    132 
     
    1981. Add {{{KeyItem}}} interface class to represent single abstract step. 
    209 
    21 2. Implement {{{StringKeyItem}}}, {{{IntegerKeyItem}}} and {{{PMCKeyItem}}} to store concrete value for each step. 
     102. Implement {{{StringKeyItem}}}, {{{IntegerKeyItem}}}, {{{PMCKeyItem}}} and {{{RegisterKeyItem}}} to store concrete value for each step. 
    2211Such {{{FooKeyItem}}} will implement {{{get_foo}}} vtable methods, freeze/thaw and nothing else. We don't need FloatKeyItem because float keys are meaningless. 
     12{{{RegisterKeyItem}}} will store tuple {{{register_type, register_number}}} to reference particular register. 
    2313 
    24 3. {{{FooKeyItem}}} will not be directly constructable by throwing exceptions from {{{init}}} and {{{init_pmc}}}  
     143. {{{FooKeyItem}}} will not be directly constructable by throwing exceptions from {{{init}}} and {{{init_pmc}}} 
    2515 
    26 4. Re-implement Key as: 
     164. {{{RegisterKeyItem}}} will be directly constructable and implement {{{set_integer_keyed_int}}} method to set {{{register_type}}} and {{{register_number}}}.  
     17 
     185. Re-implement Key as: 
    2719 
    2820  a. RPA for storing *KeyItem.