diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/sys-constants.boot | 3 | ||||
-rw-r--r-- | src/interp/sys-driver.boot | 3 |
2 files changed, 5 insertions, 1 deletions
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]))) |