3 * File name: ir/tr/tpop_t.h
4 * Purpose: Opcode of types -- private header.
5 * Author: Goetz Lindenmaier
9 * Copyright: (c) 2001-2003 Universität Karlsruhe
10 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
22 * This file contains the datatypes hidden in tpop.h.
24 * @autor Goetz Lindenmaier
28 /** The type opcode */
36 * Returns a new type opcode.
38 * Allocates a new tp_op struct and initializes it's fields with
39 * the passed values. This function is only to be used during
40 * initialization of the library.
42 * @param code the enum for this type opcode.
43 * @param name an ident for the name of the type opcode.
44 * @param attr_size the size of the attributes necessary for a type with
46 * @return A new type opcode.
49 tp_op *new_tpop (tp_opcode code, ident *name, size_t attr_size);
52 * Free a tpop datastructure.
54 void free_tpop(tp_op* tpop);
57 * Initialize the tpop module.
59 * Must be called during the initizlization of the library. Allocates
60 * opcodes and sets the globals that are external visible as specified
62 * Allocates opcodes for classes, struct, method, union, array,
63 * enumeration, pointer and primitive and sets the according values.
65 void init_tpop (void);
68 * Finalize the topo module.
70 * Frees all type opcodes.
72 void finish_tpop(void);
75 * Returns the size of the attribute to this kind
80 * @param op The type opcode to get the size for.
81 * @return The size of the attribute of types with this opcode.
84 int get_tpop_attr_size (tp_op *op);
86 #endif /* _TPOP_T_H_ */