Mercurial > projects > ldc
comparison dmd/module.h @ 1587:def7a1d494fd
Merge DMD 1.051
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Fri, 06 Nov 2009 23:58:01 +0100 |
parents | 61f12f4651b5 |
children | 44b145be2ef5 |
comparison
equal
deleted
inserted
replaced
1586:7f728c52e63c | 1587:def7a1d494fd |
---|---|
92 Identifier *searchCacheIdent; | 92 Identifier *searchCacheIdent; |
93 Dsymbol *searchCacheSymbol; // cached value of search | 93 Dsymbol *searchCacheSymbol; // cached value of search |
94 int searchCacheFlags; // cached flags | 94 int searchCacheFlags; // cached flags |
95 | 95 |
96 int semanticstarted; // has semantic() been started? | 96 int semanticstarted; // has semantic() been started? |
97 int semanticdone; // has semantic() been done? | 97 int semanticRun; // has semantic() been done? |
98 int root; // != 0 if this is a 'root' module, | 98 int root; // != 0 if this is a 'root' module, |
99 // i.e. a module that will be taken all the | 99 // i.e. a module that will be taken all the |
100 // way to an object file | 100 // way to an object file |
101 Module *importedFrom; // module from command line we're imported from, | 101 Module *importedFrom; // module from command line we're imported from, |
102 // i.e. a module that will be taken all the | 102 // i.e. a module that will be taken all the |
117 Array *versionidsNot; // forward referenced version identifiers | 117 Array *versionidsNot; // forward referenced version identifiers |
118 | 118 |
119 Macro *macrotable; // document comment macros | 119 Macro *macrotable; // document comment macros |
120 struct Escape *escapetable; // document comment escapes | 120 struct Escape *escapetable; // document comment escapes |
121 | 121 |
122 int doDocComment; // enable generating doc comments for this module | 122 int doDocComment; // enable generating doc comments for this module |
123 int doHdrGen; // enable generating header file for this module | 123 int doHdrGen; // enable generating header file for this module |
124 | |
125 bool safe; // TRUE if module is marked as 'safe' | |
124 | 126 |
125 Module(char *arg, Identifier *ident, int doDocComment, int doHdrGen); | 127 Module(char *arg, Identifier *ident, int doDocComment, int doHdrGen); |
126 ~Module(); | 128 ~Module(); |
127 | 129 |
128 static Module *load(Loc loc, Array *packages, Identifier *ident); | 130 static Module *load(Loc loc, Array *packages, Identifier *ident); |
129 | 131 |
130 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | 132 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); |
133 void toJsonBuffer(OutBuffer *buf); | |
131 const char *kind(); | 134 const char *kind(); |
132 void read(Loc loc); // read file | 135 void read(Loc loc); // read file |
133 #if IN_GCC | 136 #if IN_GCC |
134 void parse(bool dump_source = false); // syntactic parse | 137 void parse(bool dump_source = false); // syntactic parse |
135 #else | 138 #else |
136 void parse(); // syntactic parse | 139 void parse(); // syntactic parse |
137 #endif | 140 #endif |
141 void importAll(Scope *sc); | |
138 void semantic(Scope* unused_sc = NULL); // semantic analysis | 142 void semantic(Scope* unused_sc = NULL); // semantic analysis |
139 void semantic2(Scope* unused_sc = NULL); // pass 2 semantic analysis | 143 void semantic2(Scope* unused_sc = NULL); // pass 2 semantic analysis |
140 void semantic3(Scope* unused_sc = NULL); // pass 3 semantic analysis | 144 void semantic3(Scope* unused_sc = NULL); // pass 3 semantic analysis |
141 void inlineScan(); // scan for functions to inline | 145 void inlineScan(); // scan for functions to inline |
142 #ifdef _DH | 146 #ifdef _DH |
144 #endif | 148 #endif |
145 // void gensymfile(); | 149 // void gensymfile(); |
146 void gendocfile(); | 150 void gendocfile(); |
147 int needModuleInfo(); | 151 int needModuleInfo(); |
148 Dsymbol *search(Loc loc, Identifier *ident, int flags); | 152 Dsymbol *search(Loc loc, Identifier *ident, int flags); |
153 Dsymbol *symtabInsert(Dsymbol *s); | |
149 void deleteObjFile(); | 154 void deleteObjFile(); |
150 void addDeferredSemantic(Dsymbol *s); | 155 void addDeferredSemantic(Dsymbol *s); |
151 void runDeferredSemantic(); | 156 void runDeferredSemantic(); |
152 int imports(Module *m); | 157 int imports(Module *m); |
153 | 158 |
196 | 201 |
197 struct ModuleDeclaration | 202 struct ModuleDeclaration |
198 { | 203 { |
199 Identifier *id; | 204 Identifier *id; |
200 Array *packages; // array of Identifier's representing packages | 205 Array *packages; // array of Identifier's representing packages |
206 bool safe; | |
201 | 207 |
202 ModuleDeclaration(Array *packages, Identifier *id); | 208 ModuleDeclaration(Array *packages, Identifier *id); |
203 | 209 |
204 char *toChars(); | 210 char *toChars(); |
205 }; | 211 }; |