changeset 29:9fe59705c82d

Implemented Module.addDeferredSemantic, removed -release from the linux commands file.
author Robert Clipsham <robert@octarineparrot.com>
date Mon, 12 Apr 2010 22:13:20 +0100
parents 3f834bed4f13
children 93810d5d169d
files commands.linux.txt dmd/Module.d
diffstat 2 files changed, 15 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/commands.linux.txt	Tue Apr 13 00:38:04 2010 +0400
+++ b/commands.linux.txt	Mon Apr 12 22:13:20 2010 +0100
@@ -1,6 +1,5 @@
 -gc
 -debug
--release
 -version=Bug3602
 -version=Bug4054
 -version=Bug4059
--- a/dmd/Module.d	Tue Apr 13 00:38:04 2010 +0400
+++ b/dmd/Module.d	Mon Apr 12 22:13:20 2010 +0100
@@ -1187,9 +1187,22 @@
 			docfile.remove();
 	}
 
-    void addDeferredSemantic(Dsymbol s)
+	/*******************************************
+	 * Can't run semantic on s now, try again later.
+	 */
+	void addDeferredSemantic(Dsymbol s)
 	{
-		assert(false);
+	    // Don't add it if it is already there
+	    for (int i = 0; i < deferred.dim; i++)
+	    {
+		Dsymbol sd = cast(Dsymbol)deferred.data[i];
+
+		if (sd == s)
+		    return;
+	    }
+
+	    //printf("Module::addDeferredSemantic('%s')\n", s->toChars());
+	    deferred.push(cast(void*)s);
 	}
 	
 	/******************************************