Changeset d9e7af7 in OpenModelica for Compiler/Script/CevalScriptBackend.mo
- Timestamp:
- 2016-02-03T14:22:33+01:00 (8 years ago)
- Branches:
- Added-citation-metadata, maintenance/v1.14, maintenance/v1.15, maintenance/v1.16, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master, omlib-staging
- Children:
- 8d53fa9
- Parents:
- 521a5df
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Compiler/Script/CevalScriptBackend.mo
re2d5aa8 rd9e7af7 103 103 import Settings; 104 104 import SimulationResults; 105 import StringUtil; 105 106 import SymbolicJacobian; 106 107 import TaskGraphResults; … … 667 668 (outCache,outValue,outInteractiveSymbolTable) := matchcontinue (inCache,inEnv,inFunctionName,inVals,inSt,msg) 668 669 local 669 String omdev,simflags,s1,s2,s3,s tr,str1,str2,str3,token,varid,cmd,executable,executable1,encoding,method_str,670 String omdev,simflags,s1,s2,s3,s4,str,str1,str2,str3,token,varid,cmd,executable,executable1,encoding,method_str, 670 671 outputFormat_str,initfilename,pd,executableSuffixedExe,sim_call,result_file,filename_1,filename, 671 672 call,str_1,mp,pathstr,name,cname,errMsg,errorStr, … … 714 715 GlobalScript.Statements istmts; 715 716 list<GlobalScript.Statements> istmtss; 716 Boolean have_corba, bval, anyCode, b, b1, b2, externalWindow, logX, logY, autoScale, forceOMPlot, gcc_res, omcfound, rm_res, touch_res, uname_res, ifcpp, ifmsvc,sort, builtin, showProtected, inputConnectors, outputConnectors ;717 Boolean have_corba, bval, anyCode, b, b1, b2, externalWindow, logX, logY, autoScale, forceOMPlot, gcc_res, omcfound, rm_res, touch_res, uname_res, ifcpp, ifmsvc,sort, builtin, showProtected, inputConnectors, outputConnectors, sanityCheckFailed; 717 718 FCore.Cache cache; 718 719 list<GlobalScript.LoadedFile> lf; … … 876 877 SimCodeFunctionUtil.execStat("treeDiff"); 877 878 879 sanityCheckFailed := false; 880 881 if true then 882 // Do a sanity check 883 s3 := Dump.unparseStr(Parser.parsestring(s2)); 884 s4 := Dump.unparseStr(Parser.parsestring(printActual(treeDiffs, SimpleModelicaParser.parseTreeNodeStr))); 885 if not StringUtil.equalIgnoreSpace(s3, s4) then 886 Error.addInternalError("After merging the strings, the semantics changed for some reason (will simply return s2):\n"+s3+"\n"+s4, sourceInfo()); 887 sanityCheckFailed := true; 888 end if; 889 end if; 890 878 891 /* 879 892 diffs := diff(tokens1, tokens2, modelicaDiffTokenEq, modelicaDiffTokenWhitespace, tokenContent); … … 893 906 SimCodeFunctionUtil.execStat("diffModelicaFileListings filter diff 2"); 894 907 */ 895 str := matchcontinue Absyn.pathLastIdent(path)908 str := if sanityCheckFailed then s2 else matchcontinue Absyn.pathLastIdent(path) 896 909 case "plain" then printActual(treeDiffs, SimpleModelicaParser.parseTreeNodeStr); 897 910 case "color" then printDiffTerminalColor(treeDiffs, SimpleModelicaParser.parseTreeNodeStr);
Note: See TracChangeset
for help on using the changeset viewer.