Mercurial > projects > ddmd
diff main.d @ 130:60bb0fe4563e
dmdfe 2.037 first main iteration
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Thu, 09 Sep 2010 22:51:44 +0100 |
parents | e28b18c23469 |
children | 4092a614a9f3 8bf07a566fdf |
line wrap: on
line diff
--- a/main.d Sun Sep 05 15:32:22 2010 +0400 +++ b/main.d Thu Sep 09 22:51:44 2010 +0100 @@ -214,6 +214,7 @@ int status = ExitCode.EXIT_SUCCESS; int argcstart = args.length; int setdebuglib = 0; + byte noboundscheck = 0; global = new Global(); @@ -229,7 +230,7 @@ global.params.useInvariants = 1; global.params.useIn = 1; global.params.useOut = 1; - global.params.useArrayBounds = 1; + global.params.useArrayBounds = 2; // default to all functions global.params.useSwitchError = 1; global.params.useInline = 0; global.params.obj = 1; @@ -477,8 +478,8 @@ else if (arg == "release") global.params.release = 1; ///version (DMDV2) { - else if (arg == "safe") - global.params.safe = 1; + else if (arg == "noboundscheck") + noboundscheck = 1; ///} else if (arg == "unittest") global.params.useUnitTests = 1; @@ -669,14 +670,18 @@ } if (global.params.release) - { global.params.useInvariants = 0; + { + global.params.useInvariants = 0; global.params.useIn = 0; global.params.useOut = 0; global.params.useAssert = 0; global.params.useArrayBounds = 0; global.params.useSwitchError = 0; } - + + if (noboundscheck) + global.params.useArrayBounds = 0; + if (global.params.run) global.params.quiet = 1;