# HG changeset patch # User Trass3r # Date 1283388569 -7200 # Node ID 352a5164f692177ad51ed1a8532abbb86e4c6066 # Parent 6caaf0256da1c11c0e8468b343d69330b0d79957 small bugfixes diff -r 6caaf0256da1 -r 352a5164f692 dmd/BinExp.d --- a/dmd/BinExp.d Thu Sep 02 01:29:29 2010 +0200 +++ b/dmd/BinExp.d Thu Sep 02 02:49:29 2010 +0200 @@ -677,74 +677,75 @@ Expression interpretCommon(InterState istate, Expression function(Type, Expression, Expression) fp) { - Expression e; - Expression e1; - Expression e2; + Expression e; + Expression e1; + Expression e2; version(LOG) { - writef("BinExp::interpretCommon() %s\n", toChars()); + writef("BinExp::interpretCommon() %s\n", toChars()); } - e1 = this.e1.interpret(istate); - if (e1 == EXP_CANT_INTERPRET) - goto Lcant; - if (e1.isConst() != 1) - goto Lcant; + e1 = this.e1.interpret(istate); + if (e1 is EXP_CANT_INTERPRET) + goto Lcant; + if (e1.isConst() != 1) + goto Lcant; - e2 = this.e2.interpret(istate); - if (e2 == EXP_CANT_INTERPRET) - goto Lcant; - if (e2.isConst() != 1) - goto Lcant; + e2 = this.e2.interpret(istate); + if (e2 is EXP_CANT_INTERPRET) + goto Lcant; + if (e2.isConst() != 1) + goto Lcant; - e = fp(type, e1, e2); - return e; + e = fp(type, e1, e2); + return e; - Lcant: - return EXP_CANT_INTERPRET; + Lcant: + return EXP_CANT_INTERPRET; } Expression interpretCommon2(InterState istate, Expression function(TOK, Type, Expression, Expression) fp) { - Expression e; - Expression e1; - Expression e2; + Expression e; + Expression e1; + Expression e2; version(LOG) { - writef("BinExp::interpretCommon2() %s\n", toChars()); + writef("BinExp::interpretCommon2() %s\n", toChars()); } - e1 = this.e1.interpret(istate); - if (e1 == EXP_CANT_INTERPRET) - goto Lcant; - if (e1.isConst() != 1 && - e1.op != TOKnull && - e1.op != TOKstring && - e1.op != TOKarrayliteral && - e1.op != TOKstructliteral) - goto Lcant; + e1 = this.e1.interpret(istate); + if (e1 is EXP_CANT_INTERPRET) + goto Lcant; + if (e1.isConst() != 1 && + e1.op != TOKnull && + e1.op != TOKstring && + e1.op != TOKarrayliteral && + e1.op != TOKstructliteral) + goto Lcant; - e2 = this.e2.interpret(istate); - if (e2 == EXP_CANT_INTERPRET) - goto Lcant; - if (e2.isConst() != 1 && - e2.op != TOKnull && - e2.op != TOKstring && - e2.op != TOKarrayliteral && - e2.op != TOKstructliteral) - goto Lcant; + e2 = this.e2.interpret(istate); + if (e2 is EXP_CANT_INTERPRET) + goto Lcant; + if (e2.isConst() != 1 && + e2.op != TOKnull && + e2.op != TOKstring && + e2.op != TOKarrayliteral && + e2.op != TOKstructliteral) + goto Lcant; - e = fp(op, type, e1, e2); - return e; + e = fp(op, type, e1, e2); + return e; - Lcant: - return EXP_CANT_INTERPRET; + Lcant: + return EXP_CANT_INTERPRET; } - Expression interpretAssignCommon(InterState istate, Expression (*fp)(Type, Expression, Expression), int post = 0) + Expression interpretAssignCommon(InterState istate, Expression function(Type, Expression, Expression) fp, int post = 0) { -version (LOG) { - printf("BinExp.interpretAssignCommon() %.*s\n", toChars()); +version (LOG) +{ + writef("BinExp.interpretAssignCommon() %.*s\n", toChars()); } Expression e = EXP_CANT_INTERPRET; Expression e1 = this.e1; diff -r 6caaf0256da1 -r 352a5164f692 dmd/PragmaDeclaration.d --- a/dmd/PragmaDeclaration.d Thu Sep 02 01:29:29 2010 +0200 +++ b/dmd/PragmaDeclaration.d Thu Sep 02 02:49:29 2010 +0200 @@ -61,7 +61,7 @@ if (e.op == TOKstring) { auto se = cast(StringExp)e; - writef("%s", se.toChars()[1..$-3] /*se.len, cast(char*)se.string_*/); + writef("%s", se.toChars()[1..$-2] /*se.len, cast(char*)se.string_*/); } else writef(e.toChars());