diff dmd/ReturnStatement.d @ 68:ee3a9f34dc48

final bits of codegen implementation to compile Phobos
author korDen
date Tue, 24 Aug 2010 16:44:34 +0400
parents f708f0452e81
children 2e2a5c3f943a
line wrap: on
line diff
--- a/dmd/ReturnStatement.d	Mon Aug 23 21:21:05 2010 +0400
+++ b/dmd/ReturnStatement.d	Tue Aug 24 16:44:34 2010 +0400
@@ -399,10 +399,11 @@
     void toIR(IRState* irs)
 	{
 		Blockx* blx = irs.blx;
-
+		
 		incUsage(irs, loc);
 		if (exp)
 		{	
+			//printf("%.*s %.*s\n", exp.classinfo.name, exp.toChars());
 			elem *e;
 
 			FuncDeclaration func = irs.getFunc();
@@ -420,7 +421,7 @@
 				 */
 				if (exp.op == TOK.TOKstructliteral)
 				{	
-					scope StructLiteralExp se = cast(StructLiteralExp)exp;
+					StructLiteralExp se = cast(StructLiteralExp)exp;
 					enum objectSize = __traits(classInstanceSize, StructLiteralExp);
 					ubyte save[objectSize];
 					memcpy(save.ptr, cast(void*)se, objectSize);
@@ -461,7 +462,8 @@
 					//if (tb.ty == TY.Tstruct) exp.dump(0);
 					if ((exp.op == TOK.TOKvar || exp.op == TOK.TOKdotvar || exp.op == TOK.TOKstar) &&
 						tb.ty == TY.Tstruct)
-					{   StructDeclaration sd = (cast(TypeStruct)tb).sym;
+					{   
+						StructDeclaration sd = (cast(TypeStruct)tb).sym;
 						if (sd.postblit)
 						{	
 							FuncDeclaration fd = sd.postblit;