X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=entity_t.h;h=c0142ea078c7a406cf68b041071d0ef4750a661c;hb=22d24ddd2209686fa723a62ccc19b7c2eea2d172;hp=374d28328ccf4c9bdc16cb48555e0adeaa32f5b9;hpb=27040b8042ae6b0ac7974f52abd95d7562da6d9a;p=cparser diff --git a/entity_t.h b/entity_t.h index 374d283..c0142ea 100644 --- a/entity_t.h +++ b/entity_t.h @@ -1,6 +1,6 @@ /* * This file is part of cparser. - * Copyright (C) 2007-2008 Matthias Braun + * Copyright (C) 2007-2009 Matthias Braun * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -33,6 +33,7 @@ typedef enum { ENTITY_PARAMETER, ENTITY_FUNCTION, ENTITY_TYPEDEF, + ENTITY_CLASS, ENTITY_STRUCT, ENTITY_UNION, ENTITY_ENUM, @@ -97,9 +98,9 @@ typedef enum decl_modifier_t { */ struct scope_t { entity_t *entities; - entity_t *last_entity; - unsigned depth; /**< while parsing, the depth of this scope in the - scope stack. */ + entity_t *last_entity; /**< pointer to last entity (so appending is fast) */ + unsigned depth; /**< while parsing, the depth of this scope in the + scope stack. */ }; /** @@ -125,9 +126,10 @@ struct compound_t { entity_t *alias; /* used for name mangling of anonymous types */ scope_t members; decl_modifiers_t modifiers; - bool complete : 1; - bool transparent_union : 1; - bool packed : 1; + bool layouted : 1; + bool complete : 1; + bool transparent_union : 1; + bool packed : 1; il_alignment_t alignment; il_size_t size; @@ -194,13 +196,14 @@ struct declaration_t { }; struct compound_member_t { - declaration_t base; - bool read : 1; - bool address_taken : 1; /**< Set if the address of this declaration was taken. */ + declaration_t base; + bool read : 1; + bool address_taken : 1; /**< Set if the address of this declaration was taken. */ + unsigned short offset; /**< the offset of this member in the compound */ + unsigned char bit_offset; /**< extra bit offset for bitfield members */ /* ast2firm info */ ir_entity *entity; - il_size_t offset; /**< The offset of this member inside a compound. */ }; struct variable_t { @@ -301,7 +304,7 @@ struct function_t { statement_t *statement; /* ast2firm info */ - ir_entity *entity; + ir_entity *irentity; ir_node *static_link; /**< if need_closure is set, the node representing the static link. */ };