Skip to content

Commit

Permalink
Remove redundant function dumpTypeStr
Browse files Browse the repository at this point in the history
  • Loading branch information
lochel authored and OpenModelica-Hudson committed Mar 23, 2016
1 parent fbd2797 commit 8fc40e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 deletions.
30 changes: 1 addition & 29 deletions Compiler/BackEnd/BackendDump.mo
Expand Up @@ -1974,34 +1974,6 @@ end printCallFunction2StrDIVISION;
// end matchcontinue;
// end printVarsStatistics;

public function dumpTypeStr
"Dump BackendDAE.Type to a string."
input BackendDAE.Type inType;
output String outString;
algorithm
outString:=
match (inType)
local
String s1,s2,str;
list<String> l;
case DAE.T_INTEGER() then "Integer";
case DAE.T_REAL() then "Real";
case DAE.T_BOOL() then "Boolean";
case DAE.T_STRING() then "String";
case DAE.T_CLOCK() then "Clock";
case DAE.T_ENUMERATION(names = l)
equation
s1 = stringDelimitList(l, ", ");
s2 = stringAppend("enumeration(", s1);
str = stringAppend(s2, ")");
then
str;
case DAE.T_COMPLEX(complexClassType = ClassInf.EXTERNAL_OBJ(_)) then "ExternalObject";
case DAE.T_COMPLEX(complexClassType = ClassInf.RECORD(_)) then "Record";
case DAE.T_ARRAY() then "Array";
end match;
end dumpTypeStr;

public function dumpWhenOperatorStr
"Dumps a WhenOperator into a string, for debugging purposes."
input BackendDAE.WhenOperator inWhenOperator;
Expand Down Expand Up @@ -2337,7 +2309,7 @@ algorithm
outStr := DAEDump.dumpDirectionStr(inVar.varDirection) + ComponentReference.printComponentRefStr(inVar.varName) + ":"
+ kindString(inVar.varKind) + "(" + connectorTypeString(inVar.connectorType) + attributesString(inVar.values)
+ ") " + optExpressionString(inVar.bindExp, "") + DAEDump.dumpCommentAnnotationStr(inVar.comment)
+ stringDelimitList(paths_lst, ", ") + " type: " + dumpTypeStr(inVar.varType) + dimensions + unreplaceableStr;
+ stringDelimitList(paths_lst, ", ") + " type: " + DAEDump.daeTypeStr(inVar.varType) + dimensions + unreplaceableStr;
end varString;

public function dumpKind
Expand Down
2 changes: 1 addition & 1 deletion Compiler/BackEnd/StateMachineFeatures.mo
Expand Up @@ -2634,7 +2634,7 @@ algorithm
sVarName := ComponentReference.crefStr(varName);
sVarKind := BackendDump.kindString(varKind);
sVarDirection := DAEDump.dumpDirectionStr(varDirection);
sVarType := BackendDump.dumpTypeStr(varType);
sVarType := DAEDump.daeTypeStr(varType);
s1 := Util.applyOption(bindExp, function ExpressionDump.dumpExpStr(inInteger=0));
sBindExp := Util.getOptionOrDefault(s1, "");
s2 := Util.applyOption(bindValue, ValuesUtil.valString);
Expand Down

0 comments on commit 8fc40e6

Please sign in to comment.