From 94171908c07a7f85ff991f14867c6bc5e7f93258 Mon Sep 17 00:00:00 2001 From: krasimir Date: Thu, 12 Nov 2009 21:11:51 +0000 Subject: before the optimizations OptParametrize and OptValues were applied twice. in addition the values optimization is now always applied because it become very cheep --- src/GF/Compile.hs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/GF/Compile.hs') diff --git a/src/GF/Compile.hs b/src/GF/Compile.hs index 33f5e44ea..e0c60178e 100644 --- a/src/GF/Compile.hs +++ b/src/GF/Compile.hs @@ -5,7 +5,7 @@ import GF.Compile.GetGrammar import GF.Compile.Rename import GF.Compile.CheckGrammar import GF.Compile.Optimize -import GF.Compile.OptimizeGF +import GF.Compile.SubExOpt import GF.Compile.OptimizeGFCC import GF.Compile.GrammarToGFCC import GF.Compile.ReadFiles @@ -183,10 +183,8 @@ compileOne opts env@(_,srcgr,_) file = do intermOut opts DumpSource (ppModule Qualified sm0) (k',sm) <- compileSourceModule opts env sm0 - let sm1 = if isConcr sm then shareModule sm else sm -- cannot expand Str - cm <- putPointE Verbose opts " generating code... " $ generateModuleCode opts gfo sm1 - -- sm is optimized before generation, but not in the env - extendCompileEnvInt env k' (Just gfo) sm1 + putPointE Verbose opts " generating code... " $ generateModuleCode opts gfo sm + extendCompileEnvInt env k' (Just gfo) sm where isConcr (_,m) = isModCnc m && mstatus m /= MSIncomplete -- cgit v1.2.3