# HG changeset patch # User korDen # Date 1285818803 -14400 # Node ID 8bf07a566fdf0e6bcec558da08e52928ebb76884 # Parent fe932c1a956398c08e9f3e5e2c442fe1d382a1c4 GC is working now diff -r fe932c1a9563 -r 8bf07a566fdf main.d --- 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();