diff --git a/OMCompiler/Compiler/BackEnd/BackendDAEOptimize.mo b/OMCompiler/Compiler/BackEnd/BackendDAEOptimize.mo index 84a5d8d1957..a1822e9ac36 100644 --- a/OMCompiler/Compiler/BackEnd/BackendDAEOptimize.mo +++ b/OMCompiler/Compiler/BackEnd/BackendDAEOptimize.mo @@ -5730,29 +5730,11 @@ algorithm end matchcontinue; end listAllIterationVariables2; -protected function warnAboutVars "author: lochel" - input list inVars; - output String outString; +protected function warnAboutVars + input list vars; + output String str; algorithm - outString := match(inVars) - local - BackendDAE.Var v; - list vars; - String crStr; - String str; - - case ({}) - then ""; - - case (v::{}) equation - crStr = " " + BackendDump.varString(v); - then crStr; - - case (v::vars) equation - crStr = BackendDump.varString(v); - str = " " + crStr + "\n" + warnAboutVars(vars); - then str; - end match; + str := stringDelimitList(list(" " + BackendDump.varString(v) for v in vars), "\n"); end warnAboutVars; public function addTimeAsState diff --git a/OMCompiler/Compiler/BackEnd/BackendDAEUtil.mo b/OMCompiler/Compiler/BackEnd/BackendDAEUtil.mo index 88f8c009f96..f2341c205fe 100644 --- a/OMCompiler/Compiler/BackEnd/BackendDAEUtil.mo +++ b/OMCompiler/Compiler/BackEnd/BackendDAEUtil.mo @@ -477,18 +477,19 @@ public function copyBackendDAE "author: Frenkel TUD, wbraun input BackendDAE.BackendDAE inDAE; output BackendDAE.BackendDAE outDAE; algorithm - outDAE := mapEqSystem(inDAE, copyEqSystemAndShared); + outDAE := mapEqSystem(inDAE, copyEqSystemTraverser); + outDAE.shared := copyBackendDAEShared(outDAE.shared); end copyBackendDAE; -public function copyEqSystemAndShared +public function copyEqSystemTraverser input BackendDAE.EqSystem inSystem; input BackendDAE.Shared inShared; output BackendDAE.EqSystem outSystem; output BackendDAE.Shared outShared; algorithm outSystem := copyEqSystem(inSystem); - outShared := copyBackendDAEShared(inShared); -end copyEqSystemAndShared; + outShared := inShared; +end copyEqSystemTraverser; public function copyEqSystem input BackendDAE.EqSystem inSystem;