Remove minor differences with upstream

This commit is contained in:
Alexey Prokhin
2013-07-28 22:28:43 +04:00
parent 21b07c783a
commit 153febd093
11 changed files with 30 additions and 23 deletions

View File

@@ -129,7 +129,7 @@ int StructLiteralExp::apply(fp_t fp, void *param)
stageflags |= stageApply;
int ret = condApply(elements, fp, param) ||
(*fp)(this, param);
stageflags = old;
stageflags = old;
return ret;
}

View File

@@ -164,7 +164,7 @@ Lneed:
* Note that s will be constructed onto the stack, and probably
* copy-constructed in caller site.
*
* If S has copy copy construction and/or destructor,
* If S has copy copy construction and/or destructor,
* the body will make bit-wise object swap:
* S __tmp = this; // bit copy
* this = s; // bit copy

View File

@@ -145,7 +145,7 @@ struct Declaration : Dsymbol
enum PROT protection;
enum LINK linkage;
int inuse; // used to detect cycles
const char *mangleOverride; // overridden symbol with pragma(mangle, "...")
const char *mangleOverride; // overridden symbol with pragma(mangle, "...")
enum Semantic sem;
Declaration(Identifier *id);

View File

@@ -163,7 +163,7 @@ struct Dsymbol : Object
void deprecation(Loc loc, const char *format, ...);
void deprecation(const char *format, ...);
void checkDeprecated(Loc loc, Scope *sc);
Module *getModule(); // module where declared
Module *getModule();
Module *getAccessModule();
Dsymbol *pastMixin();
Dsymbol *toParent();

View File

@@ -907,7 +907,7 @@ bool hasNonConstPointers(Expression *e)
int old = se->stageflags;
se->stageflags |= stageSearchPointers;
bool ret = arrayHasNonConstPointers(se->elements);
se->stageflags = old;
se->stageflags = old;
return ret;
}
else

View File

@@ -741,7 +741,7 @@ void Module::importAll(Scope *prevsc)
sc->pop(); // 2 pops because Scope::createGlobal() created 2
}
void Module::semantic(Scope* unused_sc)
void Module::semantic()
{
if (semanticstarted)
return;
@@ -811,7 +811,7 @@ void Module::semantic(Scope* unused_sc)
//printf("-Module::semantic(this = %p, '%s'): parent = %p\n", this, toChars(), parent);
}
void Module::semantic2(Scope* unused_sc)
void Module::semantic2()
{
if (deferred.dim)
{
@@ -851,7 +851,7 @@ void Module::semantic2(Scope* unused_sc)
//printf("-Module::semantic2('%s'): parent = %p\n", toChars(), parent);
}
void Module::semantic3(Scope* unused_sc)
void Module::semantic3()
{
//printf("Module::semantic3('%s'): parent = %p\n", toChars(), parent);
if (semanticstarted >= 3)
@@ -904,8 +904,7 @@ void Module::inlineScan()
/****************************************************
*/
// is this used anywhere?
/*
#if IN_DMD
void Module::gensymfile()
{
OutBuffer buf;
@@ -927,7 +926,8 @@ void Module::gensymfile()
buf.data = NULL;
symfile->writev();
}*/
}
#endif
/**********************************
* Determine if we need to generate an instance of ModuleInfo

View File

@@ -143,12 +143,15 @@ struct Module : Package
void parse(); // syntactic parse
#endif
void importAll(Scope *sc);
void semantic(Scope* unused_sc = NULL); // semantic analysis
void semantic2(Scope* unused_sc = NULL); // pass 2 semantic analysis
void semantic3(Scope* unused_sc = NULL); // pass 3 semantic analysis
void semantic(); // semantic analysis
void semantic2(); // pass 2 semantic analysis
void semantic3(); // pass 3 semantic analysis
void inlineScan(); // scan for functions to inline
void genhdrfile(); // generate D import file
// void gensymfile();
#if IN_DMD
void genobjfile(int multiobj);
void gensymfile();
#endif
void gendocfile();
int needModuleInfo();
Dsymbol *search(Loc loc, Identifier *ident, int flags);

View File

@@ -52,6 +52,9 @@ struct Parameter;
#ifdef IN_GCC
union tree_node; typedef union tree_node TYPE;
typedef TYPE type;
#elif IN_LLVM
#else
typedef struct TYPE type;
#endif
#if IN_DMD

View File

@@ -75,17 +75,16 @@ typedef bool (*sapply_fp_t)(Statement *, void *);
// Back end
struct IRState;
struct Blockx;
#if IN_LLVM
class DValue;
typedef DValue elem;
#endif
#ifdef IN_GCC
union tree_node; typedef union tree_node block;
//union tree_node; typedef union tree_node elem;
union tree_node; typedef union tree_node elem;
#elif IN_LLVM
class DValue;
typedef DValue elem;
#else
struct block;
//struct elem;
struct elem;
#endif
struct code;

View File

@@ -22,7 +22,7 @@ struct Target
static int realsize; // size a real consumes in memory
static int realpad; // 'padding' added to the CPU real size to bring it up to realsize
static int realalignsize; // alignment for reals
static void init();
static unsigned alignsize(Type* type);
static unsigned fieldalign(Type* type);

View File

@@ -5509,7 +5509,7 @@ void TemplateInstance::semanticTiargs(Loc loc, Scope *sc, Objects *tiargs, int f
{
ea = ea->optimize(WANTvalue);
}
}
}
else if (ea->op == TOKvar)
{ /* This test is to skip substituting a const var with
* its initializer. The problem is the initializer won't
@@ -6999,3 +6999,5 @@ void TemplateMixin::toCBuffer(OutBuffer *buf, HdrGenState *hgs)
buf->writebyte(';');
buf->writenl();
}