changeset 164:8bf07a566fdf

GC is working now
author korDen
date Thu, 30 Sep 2010 07:53:23 +0400
parents fe932c1a9563
children 25ede4f66bda
files main.d
diffstat 1 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/main.d	Thu Sep 23 13:55:20 2010 +0400
+++ b/main.d	Thu Sep 30 07:53:23 2010 +0400
@@ -42,6 +42,9 @@
 	EXIT_SUCCESS = 0,
 }
 
+version = CrashHandler;
+
+version (CrashHandler) {
 version(Linux)
 {
 extern (C) extern __gshared bool rt_trapExceptions;
@@ -52,6 +55,7 @@
 
 }
 
+
 version(Windows)
 {
 
@@ -169,6 +173,7 @@
 	
 	void runMain()
     {
+		CrashHandlerInit();
         result = main(_d_args);
     }
 
@@ -202,12 +207,10 @@
 }
 
 }
+}
 
 int main(string[] args)
 {
-    GC.disable();
-	CrashHandlerInit();
-	
     Array files = new Array();
     Array libmodules = new Array();
     Module m;
@@ -1036,7 +1039,7 @@
 	}
 	if (global.errors)
 		fatal();
-
+		
     // Do semantic analysis
     for (int i = 0; i < modules.dim; i++)
     {
@@ -1047,7 +1050,7 @@
     }
     if (global.errors)
         fatal();
-
+	
     // Do pass 2 semantic analysis
     for (int i = 0; i < modules.dim; i++)
     {
@@ -1069,7 +1072,7 @@
     }
     if (global.errors)
         fatal();
-
+	
     if (global.params.moduleDeps !is null)
     {
         assert(global.params.moduleDepsFile !is null);
@@ -1177,7 +1180,7 @@
                     m.gendocfile();
             }
         }
-    }
+    }		
 
     if (global.params.lib && !global.errors)
         library.write();