modularize revision file updating and include cparser
[cparser] / entity_t.h
index 76ce5e6..bf061b7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This file is part of cparser.
- * Copyright (C) 2007-2008 Matthias Braun <matze@braunis.de>
+ * Copyright (C) 2007-2009 Matthias Braun <matze@braunis.de>
  *
  * 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,
@@ -90,6 +91,7 @@ typedef enum decl_modifier_t {
        DM_DEPRECATED        = 1 << 24,
        DM_RETURNS_TWICE     = 1 << 25,
        DM_MALLOC            = 1 << 26,
+       DM_WEAK              = 1 << 27,
 } decl_modifier_t;
 
 /**
@@ -97,9 +99,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. */
 };
 
 /**
@@ -113,6 +115,7 @@ struct entity_base_t {
        source_position_t   source_position;
        scope_t            *parent_scope;    /**< The scope where this entity
                                                                                      is contained in */
+       entity_t           *parent_entity;
 
        /** next declaration in a scope */
        entity_t           *next;
@@ -125,6 +128,7 @@ struct compound_t {
        entity_t         *alias; /* used for name mangling of anonymous types */
        scope_t           members;
        decl_modifiers_t  modifiers;
+       bool              layouted          : 1;
        bool              complete          : 1;
        bool              transparent_union : 1;
        bool              packed            : 1;
@@ -243,6 +247,8 @@ typedef enum builtin_kind_t {
        bk_none = 0,                   /**< no builtin */
        bk_gnu_builtin_alloca,         /**< GNU __builtin_alloca */
        bk_gnu_builtin_huge_val,       /**< GNU __builtin_huge_val */
+       bk_gnu_builtin_huge_valf,      /**< GNU __builtin_huge_valf */
+       bk_gnu_builtin_huge_vall,      /**< GNU __builtin_huge_vall */
        bk_gnu_builtin_inf,            /**< GNU __builtin_inf */
        bk_gnu_builtin_inff,           /**< GNU __builtin_inff */
        bk_gnu_builtin_infl,           /**< GNU __builtin_infl */
@@ -302,9 +308,9 @@ struct function_t {
        statement_t   *statement;
 
        /* ast2firm info */
-       ir_entity     *entity;
-       ir_node       *static_link;        /**< if need_closure is set, the node representing
-                                                                                   the static link. */
+       ir_entity     *irentity;
+       ir_node       *static_link;        /**< if need_closure is set, the node
+                                               representing the static link. */
 };
 
 union entity_t {