diff options
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/interp/sys-constants.boot | 3 | ||||
-rw-r--r-- | src/interp/sys-driver.boot | 3 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f28d0a42..4ea91dc5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,10 @@ 2009-06-13 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/sys-constants.boot ($defaultOptimizationLevel): New. + * interp/sys-driver.boot (initializeGlobalState): Use it for + default initialization level. + +2009-06-13 Gabriel Dos Reis <gdr@cs.tamu.edu> Support multiple scrutinee in is-case pattern matching. * interp/compiler.boot (compRetractGruard): Rename from diff --git a/src/interp/sys-constants.boot b/src/interp/sys-constants.boot index 000b2b4b..b8aa8983 100644 --- a/src/interp/sys-constants.boot +++ b/src/interp/sys-constants.boot @@ -734,6 +734,9 @@ $SpadReaderTag == --% +++ Default optimization level +$defaultOptimizationLevel == 2 + ++ List of operator names that can be overloaded in libraries. $OperatorFunctionNames == ["**", "^", "*", "/", "rem", "quo", "mod", "div", "exquo", diff --git a/src/interp/sys-driver.boot b/src/interp/sys-driver.boot index b4d23d29..58b36e74 100644 --- a/src/interp/sys-driver.boot +++ b/src/interp/sys-driver.boot @@ -191,6 +191,8 @@ initializeGlobalState() == $compileExportsOnly := getOptionValue "exports-only" $compileDefaultsOnly := getOptionValue "defaults-only" $reportOptimization := getOptionValue "show-insn" + setCompilerOptimizations(getOptionValue "optimize" or + $defaultOptimizationLevel) GCMSG(NIL) if have_to then $superHash := MAKE_-HASHTABLE('UEQUAL) @@ -268,7 +270,6 @@ compileSpadLibrary(progname,options,file) == $verbose := false $ProcessInteractiveValue := true $PrintCompilerMessageIfTrue := $verbose - setCompilerOptimizations getOptionValue "optimize" CATCH($intTopLevel, CATCH("SpadCompileItem", CATCH($SpadReaderTag,compiler [file]))) |