diff dmd/TypeInfoFunctionDeclaration.d @ 129:010eb8f0e18d

further work on dmd test suite
author korDen
date Sun, 05 Sep 2010 15:32:22 +0400
parents e28b18c23469
children af724d3510d7
line wrap: on
line diff
--- a/dmd/TypeInfoFunctionDeclaration.d	Sat Sep 04 01:33:05 2010 +0100
+++ b/dmd/TypeInfoFunctionDeclaration.d	Sun Sep 05 15:32:22 2010 +0400
@@ -3,7 +3,12 @@
 import dmd.common;
 import dmd.Type;
 import dmd.TypeInfoDeclaration;
+import dmd.TypeFunction;
+import dmd.TY;
+
 import dmd.backend.dt_t;
+import dmd.backend.Util;
+import dmd.backend.TYM;
 
 class TypeInfoFunctionDeclaration : TypeInfoDeclaration
 {
@@ -15,7 +20,16 @@
 
 	override void toDt(dt_t** pdt)
 	{
-		assert(false);
+		//printf("TypeInfoFunctionDeclaration.toDt()\n");
+		dtxoff(pdt, Type.typeinfofunction.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Function
+		dtdword(pdt, 0);			    // monitor
+
+		assert(tinfo.ty == Tfunction);
+
+		TypeFunction tc = cast(TypeFunction)tinfo;
+
+		tc.next.getTypeInfo(null);
+		dtxoff(pdt, tc.next.vtinfo.toSymbol(), 0, TYnptr); // TypeInfo for function return value
 	}
 }