Skip to content

Commit

Permalink
Renamed misleading function name
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhard-thiele committed Sep 13, 2015
1 parent 1dff76a commit cd7c5dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Compiler/BackEnd/EvaluateFunctions.mo
Expand Up @@ -1949,10 +1949,10 @@ algorithm
(msg,_) = BackendVarTransform.replaceExp(msg,replIn,NONE());
(msg) = evaluateConstantFunctionCallExp(msg,funcTree);
(msg,_) = ExpressionSimplify.simplify(msg);
if Expression.expEqual(cond,DAE.BCONST(false)) and Expression.expString(lvl)=="AssertionLevel.error" then
if Expression.expEqual(cond,DAE.BCONST(false)) and Expression.sconstEnumNameString(lvl)=="AssertionLevel.error" then
if Flags.isSet(Flags.EVAL_FUNC_DUMP) then print("ERROR: "+ExpressionDump.printExpStr(msg)+"\n"); end if;
fail();
elseif Expression.expEqual(cond,DAE.BCONST(false)) and Expression.expString(lvl)=="AssertionLevel.warning" then
elseif Expression.expEqual(cond,DAE.BCONST(false)) and Expression.sconstEnumNameString(lvl)=="AssertionLevel.warning" then
if Flags.isSet(Flags.EVAL_FUNC_DUMP) then print("WARNING: "+ExpressionDump.printExpStr(msg)+"\n"); end if;
fail();
end if;
Expand Down
4 changes: 2 additions & 2 deletions Compiler/FrontEnd/Expression.mo
Expand Up @@ -1576,7 +1576,7 @@ algorithm
end match;
end expArrayIndex;

public function expString
public function sconstEnumNameString
input DAE.Exp exp;
output String str;
algorithm
Expand All @@ -1587,7 +1587,7 @@ algorithm
case DAE.SCONST(s) then s;
case DAE.ENUM_LITERAL(name) then Absyn.pathString(name);
end match;
end expString;
end sconstEnumNameString;

public function varName "Returns the name of a Var"
input DAE.Var v;
Expand Down
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/Static.mo
Expand Up @@ -4649,7 +4649,7 @@ algorithm
ty2 = Types.arrayElementType(Types.getPropType(prop2));
(c,_) = Types.matchType(c,ty1,DAE.T_CLOCK_DEFAULT,true);
(solverMethod,_) = Types.matchType(solverMethod,ty2,DAE.T_STRING_DEFAULT,true);
strSolverMethod = Expression.expString(solverMethod);
strSolverMethod = Expression.sconstEnumNameString(solverMethod);
call = DAE.CLKCONST(DAE.SOLVER_CLOCK(c, strSolverMethod));
then (cache, call, prop);

Expand Down

0 comments on commit cd7c5dc

Please sign in to comment.