@@ -751,7 +751,7 @@ algorithm
751751 matchcontinue (inEnv, className, inFileNamePrefix, addDummy, inSimSettingsOpt, args)
752752 local
753753 String filenameprefix, file_dir, resstr, description;
754- DAE . DAElist dae;
754+ DAE . DAElist dae, dae1 ;
755755 FCore . Graph graph;
756756 BackendDAE . BackendDAE dlow, dlow_1;
757757 BackendDAE . Shared shared ;
@@ -774,30 +774,56 @@ algorithm
774774 ExecStat . execStatReset();
775775 (cache, graph, odae) := CevalScriptBackend . runFrontEnd(cache, graph, className, false );
776776 ExecStat . execStat("FrontEnd" );
777- SOME (dae ) := odae;
777+ SOME (dae1 ) := odae;
778778
779779 if Flags . isSet(Flags . SERIALIZED_SIZE ) then
780- serializeNotify(dae, "FrontEnd DAE" );
780+ serializeNotify(getGlobalRoot(Global . instHashIndex), "Global.instHash" );
781+ try
782+ serializeNotify(getGlobalRoot(Global . builtinEnvIndex), "Global.builtinIndex" );
783+ else
784+ end try ;
785+ try
786+ serializeNotify(getGlobalRoot(Global . rewriteRulesIndex), "Global.rewriteRulesIndex" );
787+ else
788+ end try ;
789+ try
790+ serializeNotify(getGlobalRoot(Global . inlineHashTable), "Global.inlineHashTable" );
791+ else
792+ end try ;
793+ try
794+ serializeNotify(getGlobalRoot(Global . operatorOverloadingCache), "Global.operatorOverloadingCache" );
795+ else
796+ end try ;
797+ try
798+ serializeNotify(getGlobalRoot(Global . interactiveCache), "Global.interactiveCache" );
799+ else
800+ end try ;
801+ serializeNotify(dae1, "FrontEnd DAE" );
781802 serializeNotify(graph, "FCore.Graph" );
782803 serializeNotify((graph,inEnv), "FCore.Graph + Old graph" );
783804 serializeNotify(cache, "FCore.Cache" );
784805 serializeNotify((cache,inCache), "FCore.Cache + Old cache" );
785806 serializeNotify(SymbolTable . get(), "Symbol Table (Absyn and SCode)" );
786- serializeNotify((SymbolTable . get(),dae ,graph,inEnv,cache,inCache), "Symbol Table, DAE, Graph, OldGraph, Cache, OldCache" );
807+ serializeNotify((SymbolTable . get(),dae1 ,graph,inEnv,cache,inCache), "Symbol Table, DAE, Graph, OldGraph, Cache, OldCache" );
787808 ExecStat . execStat("Serialize FrontEnd" );
788809 end if ;
789810
790811 timeFrontend := System . realtimeTock(ClockIndexes . RT_CLOCK_FRONTEND );
791812
792813 System . realtimeTick(ClockIndexes . RT_CLOCK_BACKEND );
793814 state := State . backend;
794- dae := DAEUtil . transformationsBeforeBackend(cache, graph, dae );
815+ dae := DAEUtil . transformationsBeforeBackend(cache, graph, dae1 );
795816 ExecStat . execStat("Transformations before backend" );
796817
797818 if Flags . isSet(Flags . SERIALIZED_SIZE ) then
798819 serializeNotify(dae, "FrontEnd DAE after transformations" );
820+ serializeNotify((dae,dae1), "FrontEnd DAE before+after transformations" );
799821 ExecStat . execStat("Serialize DAE (2)" );
800822 end if ;
823+ GC . free(dae1);
824+ GC . free(odae);
825+ odae := NONE ();
826+ dae1 := DAE . emptyDae;
801827
802828 generateFunctions := Flags . set(Flags . GEN , false );
803829 // We should not need to lookup constants and classes in the backend,
@@ -810,6 +836,7 @@ algorithm
810836 dlow := BackendDAECreate . lower(dae, cache, graph, BackendDAE . EXTRA_INFO (description,filenameprefix));
811837
812838 GC . free(dae);
839+ dae := DAE . emptyDae;
813840
814841 if Flags . isSet(Flags . SERIALIZED_SIZE ) then
815842 serializeNotify(dlow, "BackendDAECreate.lower" );
@@ -842,8 +869,7 @@ algorithm
842869 serializeNotify(dlow, "BackendDAE (simulation)" );
843870 serializeNotify(initDAE, "BackendDAE (initialization)" );
844871 serializeNotify(initDAE_lambda0, "BackendDAE (lambda0)" );
845- serializeNotify((dlow,initDAE,initDAE_lambda0), "BackendDAE (simulation+initialization+lambda0)" );
846- serializeNotify(removedInitialEquationLst, "removedInitialEquationLst" );
872+ serializeNotify((dlow,initDAE,initDAE_lambda0,inlineData,removedInitialEquationLst), "BackendDAE (simulation+initialization+lambda0+inlineData+removedInitialEquationLst)" );
847873 ExecStat . execStat("Serialize solved system" );
848874 end if ;
849875
0 commit comments