comparison dmd/declaration.h @ 1482:d9c5f5a43403

Run `semantic3` on imported modules, and emit new symbols with `available_externally` linkage. This allows the inliner to inline functions from other modules while telling the code generator to ignore those functions (treat them as declarations) Still generates a few extra `TypeInfo`s and strings... Disabled when generating debug info because I don't really understand it, and it doesn't like this.
author Frits van Bommel <fvbommel wxs.nl>
date Sun, 07 Jun 2009 16:00:13 +0200
parents 8026319762be
children df11cdec45a2
comparison
equal deleted inserted replaced
1481:e0f03e11cdf8 1482:d9c5f5a43403
298 298
299 /// Index into parent aggregate. 299 /// Index into parent aggregate.
300 /// Set during type generation. 300 /// Set during type generation.
301 unsigned aggrIndex; 301 unsigned aggrIndex;
302 302
303 /// Variables that wouldn't have gotten semantic3'ed if we weren't inlining set this flag.
304 bool availableExternally;
305 /// Override added to set above flag.
306 void semantic3(Scope *sc);
307
303 // FIXME: we're not using these anymore! 308 // FIXME: we're not using these anymore!
304 AnonDeclaration* anonDecl; 309 AnonDeclaration* anonDecl;
305 unsigned offset2; 310 unsigned offset2;
306 311
307 /// This var is used by a naked function. 312 /// This var is used by a naked function.
752 LabelMap labmap; 757 LabelMap labmap;
753 758
754 // if this is an array operation it gets a little special attention 759 // if this is an array operation it gets a little special attention
755 bool isArrayOp; 760 bool isArrayOp;
756 761
762 // Functions that wouldn't have gotten semantic3'ed if we weren't inlining set this flag.
763 bool availableExternally;
764
757 // true if overridden with the pragma(allow_inline); stmt 765 // true if overridden with the pragma(allow_inline); stmt
758 bool allowInlining; 766 bool allowInlining;
759 #endif 767 #endif
760 }; 768 };
761 769