mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-06 20:33:12 +01:00
Merged DMD commit 9a4c24659dd76f64cf9faf5f5d159c9c365d1b91:
lots of 64 bit mods The original commit contained a few front-end changes which are merged here. Also bumps the DMDFE version to 1.066.
This commit is contained in:
@@ -1571,6 +1571,7 @@ void IntegerExp::toMangleBuffer(OutBuffer *buf)
|
||||
ErrorExp::ErrorExp()
|
||||
: IntegerExp(0, 0, Type::terror)
|
||||
{
|
||||
op = TOKerror;
|
||||
}
|
||||
|
||||
void ErrorExp::toCBuffer(OutBuffer *buf, HdrGenState *hgs)
|
||||
@@ -4948,14 +4949,16 @@ Expression *BinExp::semantic(Scope *sc)
|
||||
!(op == TOKassign && e1->op == TOKdottd)) // a.template = e2
|
||||
{
|
||||
error("%s has no value", e1->toChars());
|
||||
e1->type = Type::terror;
|
||||
e1 = new ErrorExp();
|
||||
}
|
||||
e2 = e2->semantic(sc);
|
||||
if (!e2->type)
|
||||
{
|
||||
error("%s has no value", e2->toChars());
|
||||
e2->type = Type::terror;
|
||||
e2 = new ErrorExp();
|
||||
}
|
||||
if (e1->op == TOKerror || e2->op == TOKerror)
|
||||
return new ErrorExp();
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -7902,6 +7905,8 @@ Expression *IndexExp::semantic(Scope *sc)
|
||||
if (!e1->type)
|
||||
e1 = e1->semantic(sc);
|
||||
assert(e1->type); // semantic() should already be run on it
|
||||
if (e1->op == TOKerror)
|
||||
goto Lerr;
|
||||
e = this;
|
||||
|
||||
// Note that unlike C we do not implement the int[ptr]
|
||||
@@ -8007,6 +8012,8 @@ Expression *IndexExp::semantic(Scope *sc)
|
||||
}
|
||||
|
||||
default:
|
||||
if (e1->op == TOKerror)
|
||||
goto Lerr;
|
||||
error("%s must be an array or pointer type, not %s",
|
||||
e1->toChars(), e1->type->toChars());
|
||||
case Terror:
|
||||
@@ -8212,7 +8219,9 @@ Expression *AssignExp::semantic(Scope *sc)
|
||||
}
|
||||
}
|
||||
|
||||
BinExp::semantic(sc);
|
||||
Expression *e = BinExp::semantic(sc);
|
||||
if (e->op == TOKerror)
|
||||
return e;
|
||||
|
||||
if (e1->op == TOKdottd)
|
||||
{ // Rewrite a.b=e2, when b is a template, as a.b(e2)
|
||||
|
||||
@@ -59,7 +59,7 @@ Global::Global()
|
||||
|
||||
copyright = "Copyright (c) 1999-2010 by Digital Mars and Tomas Lindquist Olsen";
|
||||
written = "written by Walter Bright and Tomas Lindquist Olsen";
|
||||
version = "v1.064";
|
||||
version = "v1.066";
|
||||
ldc_version = "LDC trunk";
|
||||
llvm_version = "LLVM 2.9";
|
||||
global.structalign = 8;
|
||||
|
||||
14
dmd/mtype.c
14
dmd/mtype.c
@@ -253,7 +253,7 @@ void Type::init()
|
||||
Tfloat32, Tfloat64, Tfloat80,
|
||||
Timaginary32, Timaginary64, Timaginary80,
|
||||
Tcomplex32, Tcomplex64, Tcomplex80,
|
||||
Tbit, Tbool,
|
||||
Tbool,
|
||||
Tascii, Twchar, Tdchar };
|
||||
|
||||
for (i = 0; i < sizeof(basetab) / sizeof(basetab[0]); i++)
|
||||
@@ -690,10 +690,13 @@ Expression *Type::getProperty(Loc loc, Identifier *ident)
|
||||
s = toDsymbol(NULL);
|
||||
if (s)
|
||||
s = s->search_correct(ident);
|
||||
if (s)
|
||||
error(loc, "no property '%s' for type '%s', did you mean '%s'?", ident->toChars(), toChars(), s->toChars());
|
||||
else
|
||||
error(loc, "no property '%s' for type '%s'", ident->toChars(), toChars());
|
||||
if (this != Type::terror)
|
||||
{
|
||||
if (s)
|
||||
error(loc, "no property '%s' for type '%s', did you mean '%s'?", ident->toChars(), toChars(), s->toChars());
|
||||
else
|
||||
error(loc, "no property '%s' for type '%s'", ident->toChars(), toChars());
|
||||
}
|
||||
e = new ErrorExp();
|
||||
}
|
||||
return e;
|
||||
@@ -1012,6 +1015,7 @@ TypeBasic::TypeBasic(TY ty)
|
||||
case Tbit: d = Token::toChars(TOKbit);
|
||||
c = "bit";
|
||||
flags |= TFLAGSintegral | TFLAGSunsigned;
|
||||
assert(0);
|
||||
break;
|
||||
|
||||
case Tbool: d = "bool";
|
||||
|
||||
Reference in New Issue
Block a user