[nem-en] Integration issues

vc vc at rsdn.ru
Wed Aug 30 12:28:28 CEST 2006


   > They are, actually the field "loc" in the Located class is mutable, so
   > you assign new location whenever you wish (just create a new location
   > object, which doesn't cost anything anyway). Maybe adding some
   > SetLocation method wouldn't hurt.
   
   In compiler exists many places contained readonly (in .net terms)
Location instance. Readonly objects in .net cannot be changed.
   
   We need convert all locations in TypeBuilder and so on to mutable form.
   
   
   > Locations are structs, therefore making the Location.token field
   > mutable doesn't seem like a good idea (there are always problems with
   > mutable structs).
   
   It's no problem if location fields will be mutable.
   
    
   > How precise do you need this information to be?
   
   For the period of parsing and typing of a single method (in completion
mode).
   
   >  I could think of using
   > something similar to Location stack (or maybe turning this Location
   > stack into Located-object stack and saving a reference to a Located in
   > TExpr). I'm affraid about performance (no GC-ing PExprs) but maybe I
   > shouldn't...
   
   Probably, the stack good approach. It's necessary only for Intelisense.




More information about the devel-en mailing list