diff dmd/TypeInfoSharedDeclaration.d @ 96:acd69f84627e

further work
author Trass3r
date Tue, 31 Aug 2010 02:12:15 +0200
parents ef02e2e203c2
children e28b18c23469
line wrap: on
line diff
--- a/dmd/TypeInfoSharedDeclaration.d	Mon Aug 30 23:08:44 2010 +0200
+++ b/dmd/TypeInfoSharedDeclaration.d	Tue Aug 31 02:12:15 2010 +0200
@@ -3,18 +3,26 @@
 import dmd.Type;
 import dmd.TypeInfoDeclaration;
 import dmd.backend.dt_t;
+import dmd.backend.Util;
+import dmd.backend.TYM;
 
+version(DMDV2)
 class TypeInfoSharedDeclaration : TypeInfoDeclaration
 {
 	this(Type tinfo)
 	{
 		super(tinfo, 0);
-	    type = Type.typeinfoshared.type;
+		type = Type.typeinfoshared.type;
 	}
 
 	override void toDt(dt_t** pdt)
 	{
-		assert(false);
+		// writef("TypeInfoSharedDeclaration::toDt() %s\n", toChars());
+		dtxoff(pdt, Type.typeinfoshared.toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Shared
+		dtdword(pdt, 0);				// monitor
+		Type tm = tinfo.unSharedOf();
+		tm = tm.merge();
+		tm.getTypeInfo(null);
+		dtxoff(pdt, tm.vtinfo.toSymbol(), 0, TYnptr);
 	}
-}
-
+}
\ No newline at end of file