From 87b55df10f00fd23d89a89bfb7c4354ff455d83d Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 11 Jan 2005 15:06:12 +0000 Subject: -val optimization --- src/GF/Compile/Compile.hs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/GF/Compile/Compile.hs') diff --git a/src/GF/Compile/Compile.hs b/src/GF/Compile/Compile.hs index b320a46f1..a540caca5 100644 --- a/src/GF/Compile/Compile.hs +++ b/src/GF/Compile/Compile.hs @@ -252,9 +252,12 @@ generateModuleCode :: Options -> InitPath -> SourceModule -> IOE GFC.CanonModule generateModuleCode opts path minfo@(name,info) = do let pname = prefixPathName path (prt name) minfo0 <- ioeErr $ redModInfo minfo - minfo' <- return $ if optim - then shareModule fullOpt minfo0 -- parametrization and sharing - else shareModule basicOpt minfo0 -- sharing only + minfo' <- return $ + if optim + then shareModule fullOpt minfo0 -- parametrization and sharing + else if values + then shareModule valOpt minfo0 -- tables as courses-of-values + else shareModule basicOpt minfo0 -- sharing only -- for resource, also emit gfr case info of @@ -279,6 +282,7 @@ generateModuleCode opts path minfo@(name,info) = do nomulti = not $ oElem makeMulti opts emit = oElem emitCode opts && not (oElem notEmitCode opts) optim = oElem optimizeCanon opts + values = oElem optimizeValues opts -- for old GF: sort into modules, write files, compile as usual -- cgit v1.2.3