diff dmd/expression/Util.d @ 79:43073c7c7769

updated to 2.035 also implemented a few missing functions still crashes in Import.importAll though
author Trass3r
date Mon, 30 Aug 2010 03:57:51 +0200
parents ef02e2e203c2
children be2ab491772e
line wrap: on
line diff
--- a/dmd/expression/Util.d	Sun Aug 29 14:39:08 2010 +0100
+++ b/dmd/expression/Util.d	Mon Aug 30 03:57:51 2010 +0200
@@ -946,7 +946,8 @@
 
 Expression createTypeInfoArray(Scope sc, Expression* exps, int dim)
 {
-static if (true) {
+static if (true)
+{
 	/* Get the corresponding TypeInfo_Tuple and
 	 * point at its elements[].
 	 */
@@ -965,7 +966,8 @@
 	e = e.optimize(WANTvalue);
 	assert(e.op == TOKsymoff);		// should be SymOffExp
 
-version (BREAKABI) {
+version (BREAKABI)
+{
 	/*
 	 * Should just pass a reference to TypeInfo_Tuple instead,
 	 * but that would require existing code to be recompiled.
@@ -974,7 +976,9 @@
 	 * TypeInfo_Tuple reference.
 	 */
 
-} else {
+}
+else
+{
 	// Advance to elements[] member of TypeInfo_Tuple
 	SymOffExp se = cast(SymOffExp)e;
 	se.offset += PTRSIZE + PTRSIZE;
@@ -987,7 +991,9 @@
 	e.type = se.type.next;
 }
 	return e;
-} else {
+} // of static if (true)
+else
+{
 	/* Improvements:
 	 * 1) create an array literal instead,
 	 * as it would eliminate the extra dereference of loading the
@@ -1036,7 +1042,7 @@
 		ai.type = t;
 		v = new VarDeclaration(0, t, id, ai);
 		m.members.push(v);
-		m.symtab.insert(v);
+		m.symtabInsert(v);
 		sc = sc.push();
 		sc.linkage = LINKc;
 		sc.stc = STCstatic | STCcomdat;
@@ -1115,6 +1121,7 @@
 				e = e.copy();
 				e.type = e1.type;
 			}
+			e.loc = e1.loc;
 		}
 		else
 		{