This page describes the AST copy mechanism in ROSE.
Design of the AST Copy Mechanism
The ROSE AST copy mechanism is supported by a member function on each IR nodes called
"copy". A parameter to the copy member function permits the user to tailor the copy
mechanism to do deep or shallow copies within selected portions of the AST.
- Todo:
- Most types are shared, but named types are copied, and the copies need to have there declarations reset to the new AST.
- Todo:
- base class modifiers are shared and this should be fixed.
- Todo:
- Friend function in classes are not represented by symbols in the global scope. Not that this is always the rule, it is the default for ROSE and it is setup inconsistantly in the generated AST copy. See copytest2007_39.C.
- Todo:
- copytest2007_46.C is too difficult to figure out (likely because the SgTemplateArguments are shared).
- Todo:
- copytest2007_47.C is too complex and likely demonstrates an error.
- Todo:
- copytest2007_49.C is too complex and likely demonstrates an error.