Hi, On Sat, 22 Jan 2011, Nathan Froyd wrote:
> - Similarly to the work I did for s/TREE_CHAIN/DECL_CHAIN/, I'd like to > replace TREE_TYPE for things like {POINTER,FUNCTION,ARRAY}_TYPE, etc. > This work would be a good step towards both staticizing trees and > tuplification of types. While I'm sympathetic with most other things I don't see the need for the above. Almost all program entities described by trees that aren't collections themself have a type. I don't see the advantage in the accessors to that type be named differently according to context compared to simply TREE_TYPE. If your goal is to make tree_common smaller, introduce a tree_typed structure (consisting of tree_base + type member), and use that instead of tree_common in all tree structures needing to have a type. In fact, if you reach the goal of getting rid of tree_common.chain then tree_common _is_ tree_typed. You then merely need to check the current includers of tree_common if they make sense (tree_block, tree_statement_list and tree_optimization_option for instance presumably include tree_common only for the .chain member) and if not replace tree_common by tree_base. Ciao, Michael.