1 /* GDC -- D front-end for GCC
2 Copyright (C) 2004 David Friedman
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #include "d-gcc-tree.h"
40 // no clue about which can be used together..
79 extern TYPE * type_alloc(tym_t ty); // ty: combination of TypeType values
80 extern TYPE * type_fake(tym_t ty);
81 extern void type_setcv(TYPE ** pp_type, int ty);
82 extern void type_setmangle(TYPE ** pp_type, mangle_t mangle);
83 extern int/ *?* / type_paramsize(TYPE * t);
86 enum SymbolStorageClass
97 typedef enum SymbolStorageClass enum_SC
;
122 // not sure if this needs to inherit object..
123 // union tree_node; typedef union tree_node dt_t;
133 struct FuncFrameInfo
;
135 struct Symbol
: Object
140 //unused in GCC//TYPE *Stype; // maybe type/TYPE ?
141 SymbolStorageClass Sclass
;
146 //unused in GCC//int Ssymnum;
151 //unused in GCC//Symbol * Sstruct;
152 //unused in GCC//int Sstructalign;
154 // Specific to GNU backend
156 tree ScontextDecl
; // The DECL_CONTEXT to use for child declarations, but see IRState::declContext
157 unsigned Sunique
; // For conflicting symbol names
159 tree SclosureField
; // FIELD_DECL in closure frame struct that this variable is allocated in -- Eventually move back into Stree once everything works right
162 // For FuncDeclarations:
163 Array
* thunks
; // of struct Thunk
164 FuncDeclarations
* otherNestedFuncs
;
165 OutputStage outputStage
;
166 FuncFrameInfo
*frameInfo
;
171 target_ptrdiff_t offset
;
176 extern Symbol
* symbol_calloc(const char * string
);
177 extern Symbol
* symbol_name(const char * id
, int sclass
, TYPE
* t
);
178 extern Symbol
* struct_calloc();
179 extern Symbol
* symbol_generate(SymbolStorageClass sc
, TYPE
* type
);
180 extern void symbol_func(Symbol
* sym
);
181 extern void outdata(Symbol
* sym
);
182 inline void obj_export(Symbol
*, int) { }
183 extern void obj_moduleinfo(Symbol
*sym
);
185 extern Symbol
* symbol_tree(tree
);
186 extern Symbol
* static_sym();