diff dmd/InterfaceDeclaration.d @ 166:d8565fbd755c

Moved object and classinfo from ClassDeclaration to Global (as part of getting rid of the global state)
author korDen
date Thu, 30 Sep 2010 10:30:15 +0400
parents 60bb0fe4563e
children fa9a71a9f5a8
line wrap: on
line diff
--- a/dmd/InterfaceDeclaration.d	Thu Sep 30 10:04:32 2010 +0400
+++ b/dmd/InterfaceDeclaration.d	Thu Sep 30 10:30:15 2010 +0400
@@ -306,18 +306,18 @@
 					if (j && bc.base.isInterfaceDeclaration())
 						*poffset = OFFSET_RUNTIME;
 				}
-				return 1;
+				return true;
 			}
 			if (isBaseOf(b, poffset))
 			{   
 				if (j && poffset && bc.base.isInterfaceDeclaration())
 					*poffset = OFFSET_RUNTIME;
-				return 1;
+				return true;
 			}
 		}
 		if (poffset)
 			*poffset = 0;
-		return 0;
+		return false;
 	}
 	
     override string kind()
@@ -412,8 +412,8 @@
 		 */
 		dt_t *dt = null;
 
-		if (classinfo)
-			dtxoff(&dt, classinfo.toVtblSymbol(), 0, TYnptr); // vtbl for ClassInfo
+		if (global.classinfo)
+			dtxoff(&dt, global.classinfo.toVtblSymbol(), 0, TYnptr); // vtbl for ClassInfo
 		else
 			dtdword(&dt, 0);		// BUG: should be an assert()
 		dtdword(&dt, 0);			// monitor
@@ -436,8 +436,8 @@
 		dtdword(&dt, vtblInterfaces.dim);
 		if (vtblInterfaces.dim)
 		{
-			if (classinfo)
-				assert(classinfo.structsize == CLASSINFO_SIZE);
+			if (global.classinfo)
+				assert(global.classinfo.structsize == CLASSINFO_SIZE);
 			offset = CLASSINFO_SIZE;
 			dtxoff(&dt, csym, offset, TYnptr);	// (*)
 		}