Skip to content

Commit

Permalink
get rid of _DH
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Nov 15, 2011
1 parent 17bf006 commit 44b6ba5
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 33 deletions.
10 changes: 0 additions & 10 deletions src/declaration.c
Expand Up @@ -399,10 +399,8 @@ AliasDeclaration::AliasDeclaration(Loc loc, Identifier *id, Type *type)
this->loc = loc;
this->type = type;
this->aliassym = NULL;
#ifdef _DH
this->htype = NULL;
this->haliassym = NULL;
#endif
this->overnext = NULL;
this->inSemantic = 0;
assert(type);
Expand All @@ -416,10 +414,8 @@ AliasDeclaration::AliasDeclaration(Loc loc, Identifier *id, Dsymbol *s)
this->loc = loc;
this->type = NULL;
this->aliassym = s;
#ifdef _DH
this->htype = NULL;
this->haliassym = NULL;
#endif
this->overnext = NULL;
this->inSemantic = 0;
assert(s);
Expand All @@ -434,7 +430,6 @@ Dsymbol *AliasDeclaration::syntaxCopy(Dsymbol *s)
sa = new AliasDeclaration(loc, ident, type->syntaxCopy());
else
sa = new AliasDeclaration(loc, ident, aliassym->syntaxCopy(NULL));
#ifdef _DH
// Syntax copy for header file
if (!htype) // Don't overwrite original
{ if (type) // Make copy for both old and new instances
Expand All @@ -452,7 +447,6 @@ Dsymbol *AliasDeclaration::syntaxCopy(Dsymbol *s)
}
else
sa->haliassym = haliassym->syntaxCopy(s);
#endif
return sa;
}

Expand Down Expand Up @@ -710,10 +704,8 @@ VarDeclaration::VarDeclaration(Loc loc, Type *type, Identifier *id, Initializer
assert(type || init);
this->type = type;
this->init = init;
#ifdef _DH
this->htype = NULL;
this->hinit = NULL;
#endif
this->loc = loc;
offset = 0;
noscope = 0;
Expand Down Expand Up @@ -750,7 +742,6 @@ Dsymbol *VarDeclaration::syntaxCopy(Dsymbol *s)
sv = new VarDeclaration(loc, type ? type->syntaxCopy() : NULL, ident, init);
sv->storage_class = storage_class;
}
#ifdef _DH
// Syntax copy for header file
if (!htype) // Don't overwrite original
{ if (type) // Make copy for both old and new instances
Expand All @@ -768,7 +759,6 @@ Dsymbol *VarDeclaration::syntaxCopy(Dsymbol *s)
}
else
sv->hinit = hinit->syntaxCopy();
#endif
return sv;
}

Expand Down
2 changes: 0 additions & 2 deletions src/enum.h
Expand Up @@ -21,9 +21,7 @@
struct Identifier;
struct Type;
struct Expression;
#ifdef _DH
struct HdrGenState;
#endif


struct EnumDeclaration : ScopeDsymbol
Expand Down
2 changes: 0 additions & 2 deletions src/expression.h
Expand Up @@ -254,9 +254,7 @@ struct ComplexExp : Expression
int isBool(int result);
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
void toMangleBuffer(OutBuffer *buf);
#ifdef _DH
OutBuffer hexp;
#endif
elem *toElem(IRState *irs);
dt_t **toDt(dt_t **pdt);
};
Expand Down
5 changes: 0 additions & 5 deletions src/func.c
Expand Up @@ -1326,15 +1326,10 @@ void FuncDeclaration::semantic3(Scope *sc)

// Merge contracts together with body into one compound statement

#ifdef _DH
if (frequire && global.params.useIn)
{ frequire->incontract = 1;
a->push(frequire);
}
#else
if (frequire && global.params.useIn)
a->push(frequire);
#endif

// Precondition invariant
if (addPreInvariant())
Expand Down
4 changes: 0 additions & 4 deletions src/iasm.c
Expand Up @@ -52,10 +52,6 @@
#include "code.h"
#include "iasm.h"

#if DMDV1
#undef _DH
#endif

// I32 isn't set correctly yet because this is the front end, and I32
// is a backend flag
#undef I16
Expand Down
2 changes: 0 additions & 2 deletions src/identifier.h
Expand Up @@ -29,9 +29,7 @@ struct Identifier : Object
int compare(Object *o);
void print();
char *toChars();
#ifdef _DH
char *toHChars();
#endif
const char *toHChars2();
int dyncast();

Expand Down
2 changes: 0 additions & 2 deletions src/import.h
Expand Up @@ -24,9 +24,7 @@ struct OutBuffer;
struct Module;
struct Package;
struct AliasDeclaration;
#ifdef _DH
struct HdrGenState;
#endif

struct Import : Dsymbol
{
Expand Down
2 changes: 0 additions & 2 deletions src/statement.h
Expand Up @@ -96,9 +96,7 @@ struct Statement : Object
virtual TryCatchStatement *isTryCatchStatement() { return NULL; }
virtual GotoStatement *isGotoStatement() { return NULL; }
virtual AsmStatement *isAsmStatement() { return NULL; }
#ifdef _DH
int incontract;
#endif
virtual ScopeStatement *isScopeStatement() { return NULL; }
virtual Statement *semantic(Scope *sc);
Statement *semanticScope(Scope *sc, Statement *sbreak, Statement *scontinue);
Expand Down
2 changes: 0 additions & 2 deletions src/staticassert.h
Expand Up @@ -18,9 +18,7 @@
#include "dsymbol.h"

struct Expression;
#ifdef _DH
struct HdrGenState;
#endif

struct StaticAssert : Dsymbol
{
Expand Down
4 changes: 2 additions & 2 deletions src/win32.mak
Expand Up @@ -36,8 +36,8 @@ LFLAGS=

LINKN=$(SCROOT)\bin\link /de

CFLAGS=-I$(ROOT);$(INCLUDE) $(XFLG) $(OPT) $(DEBUG) -cpp -D_DH
MFLAGS=-I$C;$(TK) $(OPT) -DMARS -cpp $(DEBUG) -e -wx -D_DH
CFLAGS=-I$(ROOT);$(INCLUDE) $(XFLG) $(OPT) $(DEBUG) -cpp
MFLAGS=-I$C;$(TK) $(OPT) -DMARS -cpp $(DEBUG) -e -wx

# Makerules:
.c.obj:
Expand Down

0 comments on commit 44b6ba5

Please sign in to comment.