libFirm
Loading...
Searching...
No Matches
Traversing

Typedefs

typedef int compare_types_func_t(const void *tp1, const void *tp2)
 Type for a function that compares two types.
 
typedef void type_walk_func(ir_type *type, ir_entity *entity, void *env)
 Type of argument functions for type walkers.
 
typedef void class_walk_func(ir_type *clss, void *env)
 The class walk function.
 
typedef void entity_walk_func(ir_entity *ent, void *env)
 the entity walk function.
 

Functions

void type_walk (type_walk_func *pre, type_walk_func *post, void *env)
 Touches every type and entity in unspecified order.
 
void type_walk_irg (ir_graph *irg, type_walk_func *pre, type_walk_func *post, void *env)
 Walks over all type information reachable from an ir graph.
 
void type_walk_super2sub (type_walk_func *pre, type_walk_func *post, void *env)
 Touches every class in specified order:
 
void type_walk_super (type_walk_func *pre, type_walk_func *post, void *env)
 Walker for class types in inheritance order.
 
void class_walk_super2sub (class_walk_func *pre, class_walk_func *post, void *env)
 Same as type_walk_super2sub, but visits only class types.
 
void walk_types_entities (ir_type *tp, entity_walk_func *doit, void *env)
 Walks over all entities in the type.
 

Detailed Description

Typedef Documentation

◆ class_walk_func

typedef void class_walk_func(ir_type *clss, void *env)

The class walk function.

Parameters
clsspoints to the visited class
envfree environment pointer

Definition at line 1535 of file typerep.h.

◆ compare_types_func_t

typedef int compare_types_func_t(const void *tp1, const void *tp2)

Type for a function that compares two types.

Parameters
tp1The first type to compare.
tp2The second type to compare.

Definition at line 1520 of file typerep.h.

◆ entity_walk_func

typedef void entity_walk_func(ir_entity *ent, void *env)

the entity walk function.

A function type for entity walkers.

Parameters
entpoints to the visited entity
envfree environment pointer

Definition at line 1595 of file typerep.h.

◆ type_walk_func

typedef void type_walk_func(ir_type *type, ir_entity *entity, void *env)

Type of argument functions for type walkers.

Parameters
typepoints to the visited type, either this or entity is non-null
entitypoints to the visited entity, either this or type is non-null
envfree environment pointer

Definition at line 1528 of file typerep.h.

Function Documentation

◆ class_walk_super2sub()

void class_walk_super2sub ( class_walk_func * pre,
class_walk_func * post,
void * env )

Same as type_walk_super2sub, but visits only class types.

Executes pre for a class if all superclasses have been visited. Then iterates to subclasses. Executes post after return from subclass. Does not visit global type, frame types.

◆ type_walk()

void type_walk ( type_walk_func * pre,
type_walk_func * post,
void * env )

Touches every type and entity in unspecified order.

If new types/entities are created during the traversal these will be visited, too. Does not touch frame types or types for value params ...

◆ type_walk_irg()

void type_walk_irg ( ir_graph * irg,
type_walk_func * pre,
type_walk_func * post,
void * env )

Walks over all type information reachable from an ir graph.

Walks over all type information reachable from irg, i.e., starts a type walk at the irgs entity, the irgs frame type and all types and entities that are attributes to firm nodes.

◆ type_walk_super()

void type_walk_super ( type_walk_func * pre,
type_walk_func * post,
void * env )

Walker for class types in inheritance order.

Touches every class in specified order:

  • first the super class
  • second the class itself If new classes are created during the traversal these will be visited, too. Starts the walk at arbitrary classes. Executes pre when first visiting a class. Executes post after visiting all superclasses.

The arguments pre, post, env may be NULL.

◆ type_walk_super2sub()

void type_walk_super2sub ( type_walk_func * pre,
type_walk_func * post,
void * env )

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.

◆ walk_types_entities()

void walk_types_entities ( ir_type * tp,
entity_walk_func * doit,
void * env )

Walks over all entities in the type.

Parameters
tpthe type
doitthe entity walker function
envenvironment, will be passed to the walker function