Removed all CRLF line endings from DMD source.

Some files in our copy of the DMD 2 source had CRLF line endings.
This was not only inconsistent, but also made merging DMD patches
(where LF is used throughout) unnecessarily painful.
This commit is contained in:
David Nadlinger
2012-08-26 21:07:25 +02:00
parent 1205e3ea83
commit e03e027002
9 changed files with 12665 additions and 12665 deletions

View File

@@ -1,117 +1,117 @@
The "Artistic License" The "Artistic License"
Preamble Preamble
The intent of this document is to state the conditions under which a The intent of this document is to state the conditions under which a
Package may be copied, such that the Copyright Holder maintains some Package may be copied, such that the Copyright Holder maintains some
semblance of artistic control over the development of the package, semblance of artistic control over the development of the package,
while giving the users of the package the right to use and distribute while giving the users of the package the right to use and distribute
the Package in a more-or-less customary fashion, plus the right to make the Package in a more-or-less customary fashion, plus the right to make
reasonable modifications. reasonable modifications.
Definitions: Definitions:
"Package" refers to the collection of files distributed by the "Package" refers to the collection of files distributed by the
Copyright Holder, and derivatives of that collection of files Copyright Holder, and derivatives of that collection of files
created through textual modification. created through textual modification.
"Standard Version" refers to such a Package if it has not been "Standard Version" refers to such a Package if it has not been
modified, or has been modified in accordance with the wishes modified, or has been modified in accordance with the wishes
of the Copyright Holder as specified below. of the Copyright Holder as specified below.
"Copyright Holder" is whoever is named in the copyright or "Copyright Holder" is whoever is named in the copyright or
copyrights for the package. copyrights for the package.
"You" is you, if you're thinking about copying or distributing "You" is you, if you're thinking about copying or distributing
this Package. this Package.
"Reasonable copying fee" is whatever you can justify on the "Reasonable copying fee" is whatever you can justify on the
basis of media cost, duplication charges, time of people involved, basis of media cost, duplication charges, time of people involved,
and so on. (You will not be required to justify it to the and so on. (You will not be required to justify it to the
Copyright Holder, but only to the computing community at large Copyright Holder, but only to the computing community at large
as a market that must bear the fee.) as a market that must bear the fee.)
"Freely Available" means that no fee is charged for the item "Freely Available" means that no fee is charged for the item
itself, though there may be fees involved in handling the item. itself, though there may be fees involved in handling the item.
It also means that recipients of the item may redistribute it It also means that recipients of the item may redistribute it
under the same conditions they received it. under the same conditions they received it.
1. You may make and give away verbatim copies of the source form of the 1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers. duplicate all of the original copyright notices and associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications 2. You may apply bug fixes, portability fixes and other modifications
derived from the Public Domain or from the Copyright Holder. A Package derived from the Public Domain or from the Copyright Holder. A Package
modified in such a way shall still be considered the Standard Version. modified in such a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way, provided 3. You may otherwise modify your copy of this Package in any way, provided
that you insert a prominent notice in each changed file stating how and that you insert a prominent notice in each changed file stating how and
when you changed that file, and provided that you do at least ONE of the when you changed that file, and provided that you do at least ONE of the
following: following:
a) place your modifications in the Public Domain or otherwise make them a) place your modifications in the Public Domain or otherwise make them
Freely Available, such as by posting said modifications to Usenet or Freely Available, such as by posting said modifications to Usenet or
an equivalent medium, or placing the modifications on a major archive an equivalent medium, or placing the modifications on a major archive
site such as uunet.uu.net, or by allowing the Copyright Holder to include site such as uunet.uu.net, or by allowing the Copyright Holder to include
your modifications in the Standard Version of the Package. your modifications in the Standard Version of the Package.
b) use the modified Package only within your corporation or organization. b) use the modified Package only within your corporation or organization.
c) rename any non-standard executables so the names do not conflict c) rename any non-standard executables so the names do not conflict
with standard executables, which must also be provided, and provide with standard executables, which must also be provided, and provide
a separate manual page for each non-standard executable that clearly a separate manual page for each non-standard executable that clearly
documents how it differs from the Standard Version. documents how it differs from the Standard Version.
d) make other distribution arrangements with the Copyright Holder. d) make other distribution arrangements with the Copyright Holder.
4. You may distribute the programs of this Package in object code or 4. You may distribute the programs of this Package in object code or
executable form, provided that you do at least ONE of the following: executable form, provided that you do at least ONE of the following:
a) distribute a Standard Version of the executables and library files, a) distribute a Standard Version of the executables and library files,
together with instructions (in the manual page or equivalent) on where together with instructions (in the manual page or equivalent) on where
to get the Standard Version. to get the Standard Version.
b) accompany the distribution with the machine-readable source of b) accompany the distribution with the machine-readable source of
the Package with your modifications. the Package with your modifications.
c) give non-standard executables non-standard names, and clearly c) give non-standard executables non-standard names, and clearly
document the differences in manual pages (or equivalent), together document the differences in manual pages (or equivalent), together
with instructions on where to get the Standard Version. with instructions on where to get the Standard Version.
d) make other distribution arrangements with the Copyright Holder. d) make other distribution arrangements with the Copyright Holder.
5. You may charge a reasonable copying fee for any distribution of this 5. You may charge a reasonable copying fee for any distribution of this
Package. You may charge any fee you choose for support of this Package. You may charge any fee you choose for support of this
Package. You may not charge a fee for this Package itself. However, Package. You may not charge a fee for this Package itself. However,
you may distribute this Package in aggregate with other (possibly you may distribute this Package in aggregate with other (possibly
commercial) programs as part of a larger (possibly commercial) software commercial) programs as part of a larger (possibly commercial) software
distribution provided that you do not advertise this Package as a distribution provided that you do not advertise this Package as a
product of your own. You may embed this Package's interpreter within product of your own. You may embed this Package's interpreter within
an executable of yours (by linking); this shall be construed as a mere an executable of yours (by linking); this shall be construed as a mere
form of aggregation, provided that the complete Standard Version of the form of aggregation, provided that the complete Standard Version of the
interpreter is so embedded. interpreter is so embedded.
6. The source code and object code supplied as input to or produced as 6. The source code and object code supplied as input to or produced as
output from the programs of this Package do not automatically fall output from the programs of this Package do not automatically fall
under the copyright of this Package, but belong to whoever generated under the copyright of this Package, but belong to whoever generated
them, and may be sold commercially, and may be aggregated with this them, and may be sold commercially, and may be aggregated with this
Package. Package.
7. Aggregation of this Package with a commercial distribution is always 7. Aggregation of this Package with a commercial distribution is always
permitted provided that the use of this Package is embedded; that is, permitted provided that the use of this Package is embedded; that is,
when no overt attempt is made to make this Package's interfaces visible when no overt attempt is made to make this Package's interfaces visible
to the end user of the commercial distribution. Such use shall not be to the end user of the commercial distribution. Such use shall not be
construed as a distribution of this Package. construed as a distribution of this Package.
8. The name of the Copyright Holder may not be used to endorse or promote 8. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission. products derived from this software without specific prior written permission.
9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The End The End

4458
dmd2/doc.c

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,396 +1,396 @@
// Compiler implementation of the D programming language // Compiler implementation of the D programming language
// Copyright (c) 1999-2012 by Digital Mars // Copyright (c) 1999-2012 by Digital Mars
// All Rights Reserved // All Rights Reserved
// written by Walter Bright // written by Walter Bright
// http://www.digitalmars.com // http://www.digitalmars.com
// License for redistribution is by either the Artistic License // License for redistribution is by either the Artistic License
// in artistic.txt, or the GNU General Public License in gnu.txt. // in artistic.txt, or the GNU General Public License in gnu.txt.
// See the included readme.txt for details. // See the included readme.txt for details.
#ifndef DMD_DSYMBOL_H #ifndef DMD_DSYMBOL_H
#define DMD_DSYMBOL_H #define DMD_DSYMBOL_H
#ifdef __DMC__ #ifdef __DMC__
#pragma once #pragma once
#endif /* __DMC__ */ #endif /* __DMC__ */
#include "root.h" #include "root.h"
#include "stringtable.h" #include "stringtable.h"
#include "mars.h" #include "mars.h"
#include "arraytypes.h" #include "arraytypes.h"
#if IN_LLVM #if IN_LLVM
#if defined(_MSC_VER) #if defined(_MSC_VER)
#undef min #undef min
#undef max #undef max
#endif #endif
#include "../ir/irdsymbol.h" #include "../ir/irdsymbol.h"
#endif #endif
struct Identifier; struct Identifier;
struct Scope; struct Scope;
struct DsymbolTable; struct DsymbolTable;
struct Declaration; struct Declaration;
struct ThisDeclaration; struct ThisDeclaration;
struct TupleDeclaration; struct TupleDeclaration;
struct TypedefDeclaration; struct TypedefDeclaration;
struct AliasDeclaration; struct AliasDeclaration;
struct AggregateDeclaration; struct AggregateDeclaration;
struct EnumDeclaration; struct EnumDeclaration;
struct ClassDeclaration; struct ClassDeclaration;
struct InterfaceDeclaration; struct InterfaceDeclaration;
struct StructDeclaration; struct StructDeclaration;
struct UnionDeclaration; struct UnionDeclaration;
struct FuncDeclaration; struct FuncDeclaration;
struct FuncAliasDeclaration; struct FuncAliasDeclaration;
struct FuncLiteralDeclaration; struct FuncLiteralDeclaration;
struct CtorDeclaration; struct CtorDeclaration;
struct PostBlitDeclaration; struct PostBlitDeclaration;
struct DtorDeclaration; struct DtorDeclaration;
struct StaticCtorDeclaration; struct StaticCtorDeclaration;
struct StaticDtorDeclaration; struct StaticDtorDeclaration;
struct SharedStaticCtorDeclaration; struct SharedStaticCtorDeclaration;
struct SharedStaticDtorDeclaration; struct SharedStaticDtorDeclaration;
struct InvariantDeclaration; struct InvariantDeclaration;
struct UnitTestDeclaration; struct UnitTestDeclaration;
struct NewDeclaration; struct NewDeclaration;
struct VarDeclaration; struct VarDeclaration;
struct AttribDeclaration; struct AttribDeclaration;
#if IN_DMD #if IN_DMD
struct Symbol; struct Symbol;
#endif #endif
struct Package; struct Package;
struct Module; struct Module;
struct Import; struct Import;
struct Type; struct Type;
struct TypeTuple; struct TypeTuple;
struct WithStatement; struct WithStatement;
struct LabelDsymbol; struct LabelDsymbol;
struct ScopeDsymbol; struct ScopeDsymbol;
struct TemplateDeclaration; struct TemplateDeclaration;
struct TemplateInstance; struct TemplateInstance;
struct TemplateMixin; struct TemplateMixin;
struct EnumMember; struct EnumMember;
struct ScopeDsymbol; struct ScopeDsymbol;
struct WithScopeSymbol; struct WithScopeSymbol;
struct ArrayScopeSymbol; struct ArrayScopeSymbol;
struct StaticStructInitDeclaration; struct StaticStructInitDeclaration;
struct Expression; struct Expression;
struct DeleteDeclaration; struct DeleteDeclaration;
struct HdrGenState; struct HdrGenState;
struct OverloadSet; struct OverloadSet;
struct AA; struct AA;
#if TARGET_NET #if TARGET_NET
struct PragmaScope; struct PragmaScope;
#endif #endif
#if IN_LLVM #if IN_LLVM
struct TypeInfoDeclaration; struct TypeInfoDeclaration;
struct ClassInfoDeclaration; struct ClassInfoDeclaration;
#endif #endif
#if IN_GCC #if IN_GCC
union tree_node; union tree_node;
typedef union tree_node TYPE; typedef union tree_node TYPE;
#else #else
struct TYPE; struct TYPE;
#endif #endif
#if IN_LLVM #if IN_LLVM
class Ir; class Ir;
class IrSymbol; class IrSymbol;
namespace llvm namespace llvm
{ {
class Value; class Value;
} }
#endif #endif
#if IN_DMD #if IN_DMD
// Back end // Back end
struct Classsym; struct Classsym;
#endif #endif
enum PROT enum PROT
{ {
PROTundefined, PROTundefined,
PROTnone, // no access PROTnone, // no access
PROTprivate, PROTprivate,
PROTpackage, PROTpackage,
PROTprotected, PROTprotected,
PROTpublic, PROTpublic,
PROTexport, PROTexport,
}; };
/* State of symbol in winding its way through the passes of the compiler /* State of symbol in winding its way through the passes of the compiler
*/ */
enum PASS enum PASS
{ {
PASSinit, // initial state PASSinit, // initial state
PASSsemantic, // semantic() started PASSsemantic, // semantic() started
PASSsemanticdone, // semantic() done PASSsemanticdone, // semantic() done
PASSsemantic2, // semantic2() run PASSsemantic2, // semantic2() run
PASSsemantic3, // semantic3() started PASSsemantic3, // semantic3() started
PASSsemantic3done, // semantic3() done PASSsemantic3done, // semantic3() done
PASSobj, // toObjFile() run PASSobj, // toObjFile() run
}; };
typedef int (*Dsymbol_apply_ft_t)(Dsymbol *, void *); typedef int (*Dsymbol_apply_ft_t)(Dsymbol *, void *);
struct Dsymbol : Object struct Dsymbol : Object
{ {
Identifier *ident; Identifier *ident;
Identifier *c_ident; Identifier *c_ident;
Dsymbol *parent; Dsymbol *parent;
#if IN_DMD #if IN_DMD
Symbol *csym; // symbol for code generator Symbol *csym; // symbol for code generator
Symbol *isym; // import version of csym Symbol *isym; // import version of csym
#endif #endif
unsigned char *comment; // documentation comment for this Dsymbol unsigned char *comment; // documentation comment for this Dsymbol
Loc loc; // where defined Loc loc; // where defined
Scope *scope; // !=NULL means context to use for semantic() Scope *scope; // !=NULL means context to use for semantic()
bool errors; // this symbol failed to pass semantic() bool errors; // this symbol failed to pass semantic()
Dsymbol(); Dsymbol();
Dsymbol(Identifier *); Dsymbol(Identifier *);
char *toChars(); char *toChars();
char *locToChars(); char *locToChars();
int equals(Object *o); int equals(Object *o);
int isAnonymous(); int isAnonymous();
void error(Loc loc, const char *format, ...) IS_PRINTF(3); void error(Loc loc, const char *format, ...) IS_PRINTF(3);
void error(const char *format, ...) IS_PRINTF(2); void error(const char *format, ...) IS_PRINTF(2);
void verror(Loc loc, const char *format, va_list ap); void verror(Loc loc, const char *format, va_list ap);
void checkDeprecated(Loc loc, Scope *sc); void checkDeprecated(Loc loc, Scope *sc);
Module *getModule(); // module where declared Module *getModule(); // module where declared
Module *getAccessModule(); Module *getAccessModule();
Dsymbol *pastMixin(); Dsymbol *pastMixin();
Dsymbol *toParent(); Dsymbol *toParent();
Dsymbol *toParent2(); Dsymbol *toParent2();
TemplateInstance *inTemplateInstance(); TemplateInstance *inTemplateInstance();
TemplateInstance *isSpeculative(); TemplateInstance *isSpeculative();
int dyncast() { return DYNCAST_DSYMBOL; } // kludge for template.isSymbol() int dyncast() { return DYNCAST_DSYMBOL; } // kludge for template.isSymbol()
static Dsymbols *arraySyntaxCopy(Dsymbols *a); static Dsymbols *arraySyntaxCopy(Dsymbols *a);
virtual const char *toPrettyChars(); virtual const char *toPrettyChars();
virtual const char *kind(); virtual const char *kind();
virtual Dsymbol *toAlias(); // resolve real symbol virtual Dsymbol *toAlias(); // resolve real symbol
virtual int apply(Dsymbol_apply_ft_t fp, void *param); virtual int apply(Dsymbol_apply_ft_t fp, void *param);
virtual int addMember(Scope *sc, ScopeDsymbol *s, int memnum); virtual int addMember(Scope *sc, ScopeDsymbol *s, int memnum);
virtual void setScope(Scope *sc); virtual void setScope(Scope *sc);
virtual void importAll(Scope *sc); virtual void importAll(Scope *sc);
virtual void semantic0(Scope *sc); virtual void semantic0(Scope *sc);
virtual void semantic(Scope *sc); virtual void semantic(Scope *sc);
virtual void semantic2(Scope *sc); virtual void semantic2(Scope *sc);
virtual void semantic3(Scope *sc); virtual void semantic3(Scope *sc);
virtual void inlineScan(); virtual void inlineScan();
virtual Dsymbol *search(Loc loc, Identifier *ident, int flags); virtual Dsymbol *search(Loc loc, Identifier *ident, int flags);
Dsymbol *search_correct(Identifier *id); Dsymbol *search_correct(Identifier *id);
Dsymbol *searchX(Loc loc, Scope *sc, Identifier *id); Dsymbol *searchX(Loc loc, Scope *sc, Identifier *id);
virtual int overloadInsert(Dsymbol *s); virtual int overloadInsert(Dsymbol *s);
char *toHChars(); char *toHChars();
virtual void toHBuffer(OutBuffer *buf, HdrGenState *hgs); virtual void toHBuffer(OutBuffer *buf, HdrGenState *hgs);
virtual void toCBuffer(OutBuffer *buf, HdrGenState *hgs); virtual void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
virtual void toDocBuffer(OutBuffer *buf); virtual void toDocBuffer(OutBuffer *buf);
virtual void toJsonBuffer(OutBuffer *buf); virtual void toJsonBuffer(OutBuffer *buf);
virtual unsigned size(Loc loc); virtual unsigned size(Loc loc);
virtual int isforwardRef(); virtual int isforwardRef();
virtual void defineRef(Dsymbol *s); virtual void defineRef(Dsymbol *s);
virtual AggregateDeclaration *isThis(); // is a 'this' required to access the member virtual AggregateDeclaration *isThis(); // is a 'this' required to access the member
AggregateDeclaration *isAggregateMember(); // are we a member of an aggregate? AggregateDeclaration *isAggregateMember(); // are we a member of an aggregate?
ClassDeclaration *isClassMember(); // are we a member of a class? ClassDeclaration *isClassMember(); // are we a member of a class?
virtual int isExport(); // is Dsymbol exported? virtual int isExport(); // is Dsymbol exported?
virtual int isImportedSymbol(); // is Dsymbol imported? virtual int isImportedSymbol(); // is Dsymbol imported?
virtual int isDeprecated(); // is Dsymbol deprecated? virtual int isDeprecated(); // is Dsymbol deprecated?
#if DMDV2 #if DMDV2
virtual int isOverloadable(); virtual int isOverloadable();
virtual int hasOverloads(); virtual int hasOverloads();
#endif #endif
virtual LabelDsymbol *isLabel(); // is this a LabelDsymbol? virtual LabelDsymbol *isLabel(); // is this a LabelDsymbol?
virtual AggregateDeclaration *isMember(); // is this symbol a member of an AggregateDeclaration? virtual AggregateDeclaration *isMember(); // is this symbol a member of an AggregateDeclaration?
virtual Type *getType(); // is this a type? virtual Type *getType(); // is this a type?
virtual char *mangle(); virtual char *mangle();
virtual int needThis(); // need a 'this' pointer? virtual int needThis(); // need a 'this' pointer?
virtual enum PROT prot(); virtual enum PROT prot();
virtual Dsymbol *syntaxCopy(Dsymbol *s); // copy only syntax trees virtual Dsymbol *syntaxCopy(Dsymbol *s); // copy only syntax trees
virtual int oneMember(Dsymbol **ps, Identifier *ident); virtual int oneMember(Dsymbol **ps, Identifier *ident);
static int oneMembers(Dsymbols *members, Dsymbol **ps, Identifier *ident = NULL); static int oneMembers(Dsymbols *members, Dsymbol **ps, Identifier *ident = NULL);
virtual void setFieldOffset(AggregateDeclaration *ad, unsigned *poffset, bool isunion); virtual void setFieldOffset(AggregateDeclaration *ad, unsigned *poffset, bool isunion);
virtual int hasPointers(); virtual int hasPointers();
virtual bool hasStaticCtorOrDtor(); virtual bool hasStaticCtorOrDtor();
virtual void addLocalClass(ClassDeclarations *) { } virtual void addLocalClass(ClassDeclarations *) { }
virtual void checkCtorConstInit() { } virtual void checkCtorConstInit() { }
virtual void addComment(unsigned char *comment); virtual void addComment(unsigned char *comment);
virtual void emitComment(Scope *sc); virtual void emitComment(Scope *sc);
void emitDitto(Scope *sc); void emitDitto(Scope *sc);
#if IN_DMD #if IN_DMD
// Backend // Backend
virtual Symbol *toSymbol(); // to backend symbol virtual Symbol *toSymbol(); // to backend symbol
virtual void toObjFile(int multiobj); // compile to .obj file virtual void toObjFile(int multiobj); // compile to .obj file
virtual int cvMember(unsigned char *p); // emit cv debug info for member virtual int cvMember(unsigned char *p); // emit cv debug info for member
Symbol *toImport(); // to backend import symbol Symbol *toImport(); // to backend import symbol
static Symbol *toImport(Symbol *s); // to backend import symbol static Symbol *toImport(Symbol *s); // to backend import symbol
Symbol *toSymbolX(const char *prefix, int sclass, TYPE *t, const char *suffix); // helper Symbol *toSymbolX(const char *prefix, int sclass, TYPE *t, const char *suffix); // helper
#endif #endif
// Eliminate need for dynamic_cast // Eliminate need for dynamic_cast
virtual Package *isPackage() { return NULL; } virtual Package *isPackage() { return NULL; }
virtual Module *isModule() { return NULL; } virtual Module *isModule() { return NULL; }
virtual EnumMember *isEnumMember() { return NULL; } virtual EnumMember *isEnumMember() { return NULL; }
virtual TemplateDeclaration *isTemplateDeclaration() { return NULL; } virtual TemplateDeclaration *isTemplateDeclaration() { return NULL; }
virtual TemplateInstance *isTemplateInstance() { return NULL; } virtual TemplateInstance *isTemplateInstance() { return NULL; }
virtual TemplateMixin *isTemplateMixin() { return NULL; } virtual TemplateMixin *isTemplateMixin() { return NULL; }
virtual Declaration *isDeclaration() { return NULL; } virtual Declaration *isDeclaration() { return NULL; }
virtual ThisDeclaration *isThisDeclaration() { return NULL; } virtual ThisDeclaration *isThisDeclaration() { return NULL; }
virtual TupleDeclaration *isTupleDeclaration() { return NULL; } virtual TupleDeclaration *isTupleDeclaration() { return NULL; }
virtual TypedefDeclaration *isTypedefDeclaration() { return NULL; } virtual TypedefDeclaration *isTypedefDeclaration() { return NULL; }
virtual AliasDeclaration *isAliasDeclaration() { return NULL; } virtual AliasDeclaration *isAliasDeclaration() { return NULL; }
virtual AggregateDeclaration *isAggregateDeclaration() { return NULL; } virtual AggregateDeclaration *isAggregateDeclaration() { return NULL; }
virtual FuncDeclaration *isFuncDeclaration() { return NULL; } virtual FuncDeclaration *isFuncDeclaration() { return NULL; }
virtual FuncAliasDeclaration *isFuncAliasDeclaration() { return NULL; } virtual FuncAliasDeclaration *isFuncAliasDeclaration() { return NULL; }
virtual FuncLiteralDeclaration *isFuncLiteralDeclaration() { return NULL; } virtual FuncLiteralDeclaration *isFuncLiteralDeclaration() { return NULL; }
virtual CtorDeclaration *isCtorDeclaration() { return NULL; } virtual CtorDeclaration *isCtorDeclaration() { return NULL; }
virtual PostBlitDeclaration *isPostBlitDeclaration() { return NULL; } virtual PostBlitDeclaration *isPostBlitDeclaration() { return NULL; }
virtual DtorDeclaration *isDtorDeclaration() { return NULL; } virtual DtorDeclaration *isDtorDeclaration() { return NULL; }
virtual StaticCtorDeclaration *isStaticCtorDeclaration() { return NULL; } virtual StaticCtorDeclaration *isStaticCtorDeclaration() { return NULL; }
virtual StaticDtorDeclaration *isStaticDtorDeclaration() { return NULL; } virtual StaticDtorDeclaration *isStaticDtorDeclaration() { return NULL; }
virtual SharedStaticCtorDeclaration *isSharedStaticCtorDeclaration() { return NULL; } virtual SharedStaticCtorDeclaration *isSharedStaticCtorDeclaration() { return NULL; }
virtual SharedStaticDtorDeclaration *isSharedStaticDtorDeclaration() { return NULL; } virtual SharedStaticDtorDeclaration *isSharedStaticDtorDeclaration() { return NULL; }
virtual InvariantDeclaration *isInvariantDeclaration() { return NULL; } virtual InvariantDeclaration *isInvariantDeclaration() { return NULL; }
virtual UnitTestDeclaration *isUnitTestDeclaration() { return NULL; } virtual UnitTestDeclaration *isUnitTestDeclaration() { return NULL; }
virtual NewDeclaration *isNewDeclaration() { return NULL; } virtual NewDeclaration *isNewDeclaration() { return NULL; }
virtual VarDeclaration *isVarDeclaration() { return NULL; } virtual VarDeclaration *isVarDeclaration() { return NULL; }
virtual ClassDeclaration *isClassDeclaration() { return NULL; } virtual ClassDeclaration *isClassDeclaration() { return NULL; }
virtual StructDeclaration *isStructDeclaration() { return NULL; } virtual StructDeclaration *isStructDeclaration() { return NULL; }
virtual UnionDeclaration *isUnionDeclaration() { return NULL; } virtual UnionDeclaration *isUnionDeclaration() { return NULL; }
virtual InterfaceDeclaration *isInterfaceDeclaration() { return NULL; } virtual InterfaceDeclaration *isInterfaceDeclaration() { return NULL; }
virtual ScopeDsymbol *isScopeDsymbol() { return NULL; } virtual ScopeDsymbol *isScopeDsymbol() { return NULL; }
virtual WithScopeSymbol *isWithScopeSymbol() { return NULL; } virtual WithScopeSymbol *isWithScopeSymbol() { return NULL; }
virtual ArrayScopeSymbol *isArrayScopeSymbol() { return NULL; } virtual ArrayScopeSymbol *isArrayScopeSymbol() { return NULL; }
virtual Import *isImport() { return NULL; } virtual Import *isImport() { return NULL; }
virtual EnumDeclaration *isEnumDeclaration() { return NULL; } virtual EnumDeclaration *isEnumDeclaration() { return NULL; }
virtual DeleteDeclaration *isDeleteDeclaration() { return NULL; } virtual DeleteDeclaration *isDeleteDeclaration() { return NULL; }
virtual StaticStructInitDeclaration *isStaticStructInitDeclaration() { return NULL; } virtual StaticStructInitDeclaration *isStaticStructInitDeclaration() { return NULL; }
virtual AttribDeclaration *isAttribDeclaration() { return NULL; } virtual AttribDeclaration *isAttribDeclaration() { return NULL; }
virtual OverloadSet *isOverloadSet() { return NULL; } virtual OverloadSet *isOverloadSet() { return NULL; }
virtual TypeInfoDeclaration* isTypeInfoDeclaration() { return NULL; } virtual TypeInfoDeclaration* isTypeInfoDeclaration() { return NULL; }
virtual ClassInfoDeclaration* isClassInfoDeclaration() { return NULL; } virtual ClassInfoDeclaration* isClassInfoDeclaration() { return NULL; }
#if TARGET_NET #if TARGET_NET
virtual PragmaScope* isPragmaScope() { return NULL; } virtual PragmaScope* isPragmaScope() { return NULL; }
#endif #endif
#if IN_LLVM #if IN_LLVM
/// Codegen traversal /// Codegen traversal
virtual void codegen(Ir* ir); virtual void codegen(Ir* ir);
// llvm stuff // llvm stuff
int llvmInternal; int llvmInternal;
IrDsymbol ir; IrDsymbol ir;
IrSymbol* irsym; IrSymbol* irsym;
#endif #endif
}; };
// Dsymbol that generates a scope // Dsymbol that generates a scope
struct ScopeDsymbol : Dsymbol struct ScopeDsymbol : Dsymbol
{ {
Dsymbols *members; // all Dsymbol's in this scope Dsymbols *members; // all Dsymbol's in this scope
DsymbolTable *symtab; // members[] sorted into table DsymbolTable *symtab; // members[] sorted into table
Dsymbols *imports; // imported Dsymbol's Dsymbols *imports; // imported Dsymbol's
unsigned char *prots; // array of PROT, one for each import unsigned char *prots; // array of PROT, one for each import
ScopeDsymbol(); ScopeDsymbol();
ScopeDsymbol(Identifier *id); ScopeDsymbol(Identifier *id);
Dsymbol *syntaxCopy(Dsymbol *s); Dsymbol *syntaxCopy(Dsymbol *s);
Dsymbol *search(Loc loc, Identifier *ident, int flags); Dsymbol *search(Loc loc, Identifier *ident, int flags);
void importScope(Dsymbol *s, enum PROT protection); void importScope(Dsymbol *s, enum PROT protection);
int isforwardRef(); int isforwardRef();
void defineRef(Dsymbol *s); void defineRef(Dsymbol *s);
static void multiplyDefined(Loc loc, Dsymbol *s1, Dsymbol *s2); static void multiplyDefined(Loc loc, Dsymbol *s1, Dsymbol *s2);
Dsymbol *nameCollision(Dsymbol *s); Dsymbol *nameCollision(Dsymbol *s);
const char *kind(); const char *kind();
FuncDeclaration *findGetMembers(); FuncDeclaration *findGetMembers();
virtual Dsymbol *symtabInsert(Dsymbol *s); virtual Dsymbol *symtabInsert(Dsymbol *s);
bool hasStaticCtorOrDtor(); bool hasStaticCtorOrDtor();
void emitMemberComments(Scope *sc); void emitMemberComments(Scope *sc);
static size_t dim(Dsymbols *members); static size_t dim(Dsymbols *members);
static Dsymbol *getNth(Dsymbols *members, size_t nth, size_t *pn = NULL); static Dsymbol *getNth(Dsymbols *members, size_t nth, size_t *pn = NULL);
typedef int (*ForeachDg)(void *ctx, size_t idx, Dsymbol *s); typedef int (*ForeachDg)(void *ctx, size_t idx, Dsymbol *s);
static int foreach(Scope *sc, Dsymbols *members, ForeachDg dg, void *ctx, size_t *pn=NULL); static int foreach(Scope *sc, Dsymbols *members, ForeachDg dg, void *ctx, size_t *pn=NULL);
ScopeDsymbol *isScopeDsymbol() { return this; } ScopeDsymbol *isScopeDsymbol() { return this; }
}; };
// With statement scope // With statement scope
struct WithScopeSymbol : ScopeDsymbol struct WithScopeSymbol : ScopeDsymbol
{ {
WithStatement *withstate; WithStatement *withstate;
WithScopeSymbol(WithStatement *withstate); WithScopeSymbol(WithStatement *withstate);
Dsymbol *search(Loc loc, Identifier *ident, int flags); Dsymbol *search(Loc loc, Identifier *ident, int flags);
WithScopeSymbol *isWithScopeSymbol() { return this; } WithScopeSymbol *isWithScopeSymbol() { return this; }
}; };
// Array Index/Slice scope // Array Index/Slice scope
struct ArrayScopeSymbol : ScopeDsymbol struct ArrayScopeSymbol : ScopeDsymbol
{ {
Expression *exp; // IndexExp or SliceExp Expression *exp; // IndexExp or SliceExp
TypeTuple *type; // for tuple[length] TypeTuple *type; // for tuple[length]
TupleDeclaration *td; // for tuples of objects TupleDeclaration *td; // for tuples of objects
Scope *sc; Scope *sc;
ArrayScopeSymbol(Scope *sc, Expression *e); ArrayScopeSymbol(Scope *sc, Expression *e);
ArrayScopeSymbol(Scope *sc, TypeTuple *t); ArrayScopeSymbol(Scope *sc, TypeTuple *t);
ArrayScopeSymbol(Scope *sc, TupleDeclaration *td); ArrayScopeSymbol(Scope *sc, TupleDeclaration *td);
Dsymbol *search(Loc loc, Identifier *ident, int flags); Dsymbol *search(Loc loc, Identifier *ident, int flags);
ArrayScopeSymbol *isArrayScopeSymbol() { return this; } ArrayScopeSymbol *isArrayScopeSymbol() { return this; }
}; };
// Overload Sets // Overload Sets
#if DMDV2 #if DMDV2
struct OverloadSet : Dsymbol struct OverloadSet : Dsymbol
{ {
Dsymbols a; // array of Dsymbols Dsymbols a; // array of Dsymbols
OverloadSet(); OverloadSet();
void push(Dsymbol *s); void push(Dsymbol *s);
OverloadSet *isOverloadSet() { return this; } OverloadSet *isOverloadSet() { return this; }
const char *kind(); const char *kind();
}; };
#endif #endif
// Table of Dsymbol's // Table of Dsymbol's
struct DsymbolTable : Object struct DsymbolTable : Object
{ {
AA *tab; AA *tab;
DsymbolTable(); DsymbolTable();
~DsymbolTable(); ~DsymbolTable();
// Look up Identifier. Return Dsymbol if found, NULL if not. // Look up Identifier. Return Dsymbol if found, NULL if not.
Dsymbol *lookup(Identifier *ident); Dsymbol *lookup(Identifier *ident);
// Insert Dsymbol in table. Return NULL if already there. // Insert Dsymbol in table. Return NULL if already there.
Dsymbol *insert(Dsymbol *s); Dsymbol *insert(Dsymbol *s);
// Look for Dsymbol in table. If there, return it. If not, insert s and return that. // Look for Dsymbol in table. If there, return it. If not, insert s and return that.
Dsymbol *update(Dsymbol *s); Dsymbol *update(Dsymbol *s);
Dsymbol *insert(Identifier *ident, Dsymbol *s); // when ident and s are not the same Dsymbol *insert(Identifier *ident, Dsymbol *s); // when ident and s are not the same
}; };
#endif /* DMD_DSYMBOL_H */ #endif /* DMD_DSYMBOL_H */

View File

@@ -1,248 +1,248 @@
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 1, February 1989 Version 1, February 1989
Copyright (C) 1989 Free Software Foundation, Inc. Copyright (C) 1989 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307, USA 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
Preamble Preamble
The license agreements of most software companies try to keep users The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public at the mercy of those companies. By contrast, our General Public
License is intended to guarantee your freedom to share and change free License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. The software--to make sure the software is free for all its users. The
General Public License applies to the Free Software Foundation's General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it. software and to any other program whose authors commit to using it.
You can use it for your programs, too. You can use it for your programs, too.
When we speak of free software, we are referring to freedom, not When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free sure that you have the freedom to give away or sell copies of free
software, that you receive source code or can get it if you want it, software, that you receive source code or can get it if you want it,
that you can change the software or use pieces of it in new free that you can change the software or use pieces of it in new free
programs; and that you know you can do these things. programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights. anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it. distribute copies of the software, or if you modify it.
For example, if you distribute copies of a such a program, whether For example, if you distribute copies of a such a program, whether
gratis or for a fee, you must give the recipients all the rights that gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the you have. You must make sure that they, too, receive or can get the
source code. And you must tell them their rights. source code. And you must tell them their rights.
We protect your rights with two steps: (1) copyright the software, and We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy, (2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software. distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original that any problems introduced by others will not reflect on the original
authors' reputations. authors' reputations.
The precise terms and conditions for copying, distribution and The precise terms and conditions for copying, distribution and
modification follow. modification follow.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any program or other work which 0. This License Agreement applies to any program or other work which
contains a notice placed by the copyright holder saying it may be contains a notice placed by the copyright holder saying it may be
distributed under the terms of this General Public License. The distributed under the terms of this General Public License. The
"Program", below, refers to any such program or work, and a "work based "Program", below, refers to any such program or work, and a "work based
on the Program" means either the Program or any work containing the on the Program" means either the Program or any work containing the
Program or a portion of it, either verbatim or with modifications. Each Program or a portion of it, either verbatim or with modifications. Each
licensee is addressed as "you". licensee is addressed as "you".
1. You may copy and distribute verbatim copies of the Program's source 1. You may copy and distribute verbatim copies of the Program's source
code as you receive it, in any medium, provided that you conspicuously and code as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this disclaimer of warranty; keep intact all the notices that refer to this
General Public License and to the absence of any warranty; and give any General Public License and to the absence of any warranty; and give any
other recipients of the Program a copy of this General Public License other recipients of the Program a copy of this General Public License
along with the Program. You may charge a fee for the physical act of along with the Program. You may charge a fee for the physical act of
transferring a copy. transferring a copy.
2. You may modify your copy or copies of the Program or any portion of 2. You may modify your copy or copies of the Program or any portion of
it, and copy and distribute such modifications under the terms of Paragraph it, and copy and distribute such modifications under the terms of Paragraph
1 above, provided that you also do the following: 1 above, provided that you also do the following:
a) cause the modified files to carry prominent notices stating that a) cause the modified files to carry prominent notices stating that
you changed the files and the date of any change; and you changed the files and the date of any change; and
b) cause the whole of any work that you distribute or publish, that b) cause the whole of any work that you distribute or publish, that
in whole or in part contains the Program or any part thereof, either in whole or in part contains the Program or any part thereof, either
with or without modifications, to be licensed at no charge to all with or without modifications, to be licensed at no charge to all
third parties under the terms of this General Public License (except third parties under the terms of this General Public License (except
that you may choose to grant warranty protection to some or all that you may choose to grant warranty protection to some or all
third parties, at your option). third parties, at your option).
c) If the modified program normally reads commands interactively when c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General conditions, and telling the user how to view a copy of this General
Public License. Public License.
d) You may charge a fee for the physical act of transferring a d) You may charge a fee for the physical act of transferring a
copy, and you may at your option offer warranty protection in copy, and you may at your option offer warranty protection in
exchange for a fee. exchange for a fee.
Mere aggregation of another independent work with the Program (or its Mere aggregation of another independent work with the Program (or its
derivative) on a volume of a storage or distribution medium does not bring derivative) on a volume of a storage or distribution medium does not bring
the other work under the scope of these terms. the other work under the scope of these terms.
3. You may copy and distribute the Program (or a portion or derivative of 3. You may copy and distribute the Program (or a portion or derivative of
it, under Paragraph 2) in object code or executable form under the terms of it, under Paragraph 2) in object code or executable form under the terms of
Paragraphs 1 and 2 above provided that you also do one of the following: Paragraphs 1 and 2 above provided that you also do one of the following:
a) accompany it with the complete corresponding machine-readable a) accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of source code, which must be distributed under the terms of
Paragraphs 1 and 2 above; or, Paragraphs 1 and 2 above; or,
b) accompany it with a written offer, valid for at least three b) accompany it with a written offer, valid for at least three
years, to give any third party free (except for a nominal charge years, to give any third party free (except for a nominal charge
for the cost of distribution) a complete machine-readable copy of the for the cost of distribution) a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of corresponding source code, to be distributed under the terms of
Paragraphs 1 and 2 above; or, Paragraphs 1 and 2 above; or,
c) accompany it with the information you received as to where the c) accompany it with the information you received as to where the
corresponding source code may be obtained. (This alternative is corresponding source code may be obtained. (This alternative is
allowed only for noncommercial distribution and only if you allowed only for noncommercial distribution and only if you
received the program in object code or executable form alone.) received the program in object code or executable form alone.)
Source code for a work means the preferred form of the work for making Source code for a work means the preferred form of the work for making
modifications to it. For an executable file, complete source code means modifications to it. For an executable file, complete source code means
all the source code for all modules it contains; but, as a special all the source code for all modules it contains; but, as a special
exception, it need not include source code for modules which are standard exception, it need not include source code for modules which are standard
libraries that accompany the operating system on which the executable libraries that accompany the operating system on which the executable
file runs, or for standard header files or definitions files that file runs, or for standard header files or definitions files that
accompany that operating system. accompany that operating system.
4. You may not copy, modify, sublicense, distribute or transfer the 4. You may not copy, modify, sublicense, distribute or transfer the
Program except as expressly provided under this General Public License. Program except as expressly provided under this General Public License.
Any attempt otherwise to copy, modify, sublicense, distribute or transfer Any attempt otherwise to copy, modify, sublicense, distribute or transfer
the Program is void, and will automatically terminate your rights to use the Program is void, and will automatically terminate your rights to use
the Program under this License. However, parties who have received the Program under this License. However, parties who have received
copies, or rights to use copies, from you under this General Public copies, or rights to use copies, from you under this General Public
License will not have their licenses terminated so long as such parties License will not have their licenses terminated so long as such parties
remain in full compliance. remain in full compliance.
5. By copying, distributing or modifying the Program (or any work based 5. By copying, distributing or modifying the Program (or any work based
on the Program) you indicate your acceptance of this license to do so, on the Program) you indicate your acceptance of this license to do so,
and all its terms and conditions. and all its terms and conditions.
6. Each time you redistribute the Program (or any work based on the 6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these licensor to copy, distribute or modify the Program subject to these
terms and conditions. You may not impose any further restrictions on the terms and conditions. You may not impose any further restrictions on the
recipients' exercise of the rights granted herein. recipients' exercise of the rights granted herein.
7. The Free Software Foundation may publish revised and/or new versions 7. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to be similar in spirit to the present version, but may differ in detail to
address new problems or concerns. address new problems or concerns.
Each version is given a distinguishing version number. If the Program Each version is given a distinguishing version number. If the Program
specifies a version number of the license which applies to it and "any specifies a version number of the license which applies to it and "any
later version", you have the option of following the terms and conditions later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of Software Foundation. If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software the license, you may choose any version ever published by the Free Software
Foundation. Foundation.
8. If you wish to incorporate parts of the Program into other free 8. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally. of promoting the sharing and reuse of software generally.
NO WARRANTY NO WARRANTY
9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION. REPAIR OR CORRECTION.
10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES. POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these free software which everyone can redistribute and change under these
terms. terms.
To do so, attach the following notices to the program. It is safest to To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found. "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.> <one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author> Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option) the Free Software Foundation; either version 1, or (at your option)
any later version. any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this If the program is interactive, make it output a short notice like this
when it starts in an interactive mode: when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details. under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License. Of course, the appropriate parts of the General Public License. Of course, the
commands you use may be called something other than `show w' and `show commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your c'; they could even be mouse-clicks or menu items--whatever suits your
program. program.
You should also get your employer (if you work as a programmer) or your You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here a sample; alter the names: necessary. Here a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the Yoyodyne, Inc., hereby disclaims all copyright interest in the
program `Gnomovision' (a program to direct compilers to make passes program `Gnomovision' (a program to direct compilers to make passes
at assemblers) written by James Hacker. at assemblers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989 <signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice Ty Coon, President of Vice
That's all there is to it! That's all there is to it!

File diff suppressed because it is too large Load Diff

View File

@@ -1,24 +1,24 @@
The D Programming Language The D Programming Language
Compiler Front End Source Compiler Front End Source
Copyright (c) 1999-2009, by Digital Mars Copyright (c) 1999-2009, by Digital Mars
http://www.digitalmars.com http://www.digitalmars.com
All Rights Reserved All Rights Reserved
This is the source code to the front end Digital Mars D compiler. This is the source code to the front end Digital Mars D compiler.
It covers the lexical analysis, parsing, and semantic analysis It covers the lexical analysis, parsing, and semantic analysis
of the D Programming Language defined in the documents at of the D Programming Language defined in the documents at
http://www.digitalmars.com/d/ http://www.digitalmars.com/d/
These sources are free, they are redistributable and modifiable These sources are free, they are redistributable and modifiable
under the terms of the GNU General Public License (attached as gpl.txt), under the terms of the GNU General Public License (attached as gpl.txt),
or the Artistic License (attached as artistic.txt). or the Artistic License (attached as artistic.txt).
The optimizer and code generator sources are The optimizer and code generator sources are
covered under a separate license, backendlicense.txt. covered under a separate license, backendlicense.txt.
It does not apply to anything else distributed by Digital Mars, It does not apply to anything else distributed by Digital Mars,
including D compiler executables. including D compiler executables.
-Walter Bright -Walter Bright

File diff suppressed because it is too large Load Diff

View File

@@ -1,46 +1,46 @@
// Compiler implementation of the D programming language // Compiler implementation of the D programming language
// Copyright (c) 1999-2006 by Digital Mars // Copyright (c) 1999-2006 by Digital Mars
// All Rights Reserved // All Rights Reserved
// written by Walter Bright // written by Walter Bright
// http://www.digitalmars.com // http://www.digitalmars.com
// License for redistribution is by either the Artistic License // License for redistribution is by either the Artistic License
// in artistic.txt, or the GNU General Public License in gnu.txt. // in artistic.txt, or the GNU General Public License in gnu.txt.
// See the included readme.txt for details. // See the included readme.txt for details.
#ifndef DMD_TOTAL_H #ifndef DMD_TOTAL_H
#define DMD_TOTAL_H #define DMD_TOTAL_H
#ifdef __DMC__ #ifdef __DMC__
#pragma once #pragma once
#endif /* __DMC__ */ #endif /* __DMC__ */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#include <wchar.h> #include <wchar.h>
#include "root.h" #include "root.h"
#include "stringtable.h" #include "stringtable.h"
#include "arraytypes.h" #include "arraytypes.h"
#include "mars.h" #include "mars.h"
#include "lexer.h" #include "lexer.h"
#include "parse.h" #include "parse.h"
#include "identifier.h" #include "identifier.h"
#include "enum.h" #include "enum.h"
#include "aggregate.h" #include "aggregate.h"
#include "mtype.h" #include "mtype.h"
#include "expression.h" #include "expression.h"
#include "declaration.h" #include "declaration.h"
#include "statement.h" #include "statement.h"
#include "scope.h" #include "scope.h"
#include "import.h" #include "import.h"
#include "module.h" #include "module.h"
#include "id.h" #include "id.h"
#include "cond.h" #include "cond.h"
#include "version.h" #include "version.h"
#include "lib.h" #include "lib.h"
#endif /* DMD_TOTAL_H */ #endif /* DMD_TOTAL_H */