X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Ftypewalk.h;h=9968375edb5ede1fe78f98c808b82003a64c822c;hb=328ae18da3e796f4f9fda2aba629cc34e2849ed7;hp=2fb7ad53c42ccb5d4c1541cc63d428e63118e4cd;hpb=6d36abf323fc5c7fba7ed2f1f6939a84b3e4a932;p=libfirm diff --git a/ir/tr/typewalk.h b/ir/tr/typewalk.h index 2fb7ad53c..9968375ed 100644 --- a/ir/tr/typewalk.h +++ b/ir/tr/typewalk.h @@ -10,15 +10,40 @@ ** - execute the post function after recursion */ +/* $Id$ */ -/* walk over all type information reachable from the ir graph. */ +/* walk over all type information reachable from the ir graph. */ +#ifndef _TYPEWALK_H_ +#define _TYPEWALK_H_ # include "type_or_entity.h" -/** dumps all type information reachable from irg **/ -void type_walk(ir_graph *irg, - void (pre)(type_or_ent*, void*), void (post)(type_or_ent*, void*), - void *env); +/** Walks over all type information reachable from global roots. + Touches every type and entity in unspecified order. If new + types/entities are created during the traversal these will + be visited, too. **/ +void type_walk(void (pre)(type_or_ent*, void*), + void (post)(type_or_ent*, void*), + void *env); + +/** walks over all type information reachable from irg **/ +void type_walk_irg(ir_graph *irg, + void (pre)(type_or_ent*, void*), + void (post)(type_or_ent*, void*), + void *env); + +/** Walks over all classes information reachable from global roots. + Touches every class in specified order: + - first the super class + - second the class itself + - third the sub classes. If new classes are created + during the traversal these will be visited, too. **/ +/** @@@ shoulc be named class-walk **/ +void type_walk_super2sub(void (pre)(type_or_ent*, void*), + void (post)(type_or_ent*, void*), + void *env); + +#endif /* _TYPEWALK_H_ */