Skip to content

Commit

Permalink
[Janitor mode] Fix whitespace
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@24237 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
OpenModelica-Hudson committed Jan 28, 2015
1 parent dd53542 commit 61bcfa0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions Compiler/BackEnd/BackendVariable.mo
Expand Up @@ -1598,13 +1598,13 @@ algorithm
outVar = BackendDAE.VAR(inCref, BackendDAE.VARIABLE(), DAE.BIDIR(), DAE.NON_PARALLEL(),
ComponentReference.crefLastType(inCref), NONE(), NONE(), {}, source,
NONE(), SOME(BackendDAE.AVOID()), NONE(), DAE.NON_CONNECTOR());
then outVar;
then outVar;
case(_) equation
outVar = BackendDAE.VAR(inCref, BackendDAE.VARIABLE(), DAE.BIDIR(), DAE.NON_PARALLEL(),
outVar = BackendDAE.VAR(inCref, BackendDAE.VARIABLE(), DAE.BIDIR(), DAE.NON_PARALLEL(),
ComponentReference.crefLastType(inCref), NONE(), NONE(), {}, DAE.emptyElementSource,
NONE(), SOME(BackendDAE.AVOID()), NONE(), DAE.NON_CONNECTOR());
then outVar;
else
else
equation
Error.addMessage(Error.INTERNAL_ERROR, {"BackendVariable.createCSEVar failed."});
then fail();
Expand Down
26 changes: 13 additions & 13 deletions Compiler/BackEnd/CommonSubExpression.mo
Expand Up @@ -206,7 +206,7 @@ algorithm
true = intGt(value2, 1);
if not BaseHashTable.hasKey(value, HT3) then
HT3 = BaseHashTable.add((value, 1), HT3);
varLst1 = createVarsForExp(value, {});
varLst1 = createVarsForExp(value, {});
varLst = listAppend(varLst1, varLst);
eq = BackendEquation.generateEquation(value, key, DAE.emptyElementSource, BackendDAE.EQ_ATTR_DEFAULT_BINDING);
eqLst = eq::eqLst;
Expand All @@ -222,7 +222,7 @@ algorithm
if not Flags.getConfigBool(Flags.CSE_EACHCALL) then
true = intGt(value2, 1);
end if;

// debug
if Flags.isSet(Flags.DUMP_CSE_VERBOSE) then
print("replace :\n " + ExpressionDump.printExpStr(key) + " \n");
Expand All @@ -240,12 +240,12 @@ algorithm
// this need to run before any HashTable is updated
expReplaced = prepareExpForReplace(value);

// traverse all arguments of the function
(expLst, (HT, HT2, HT3, eqLst1, varLst1)) = Expression.traverseExpList(expLst, traverseExpsEquation_2, (HT, HT2, HT3, {}, {}));
exp1 = DAE.CALL(path, expLst, attr);
// traverse all arguments of the function
(expLst, (HT, HT2, HT3, eqLst1, varLst1)) = Expression.traverseExpList(expLst, traverseExpsEquation_2, (HT, HT2, HT3, {}, {}));
exp1 = DAE.CALL(path, expLst, attr);
varLst = listAppend(varLst1, varLst);
eqLst = listAppend(eqLst1, eqLst);

// debug
if Flags.isSet(Flags.DUMP_CSE_VERBOSE) then
print("create equation from:\n LHS: " + ExpressionDump.printExpStr(value) + " \n");
Expand All @@ -259,7 +259,7 @@ algorithm
// update HashTable by value
HT3 = BaseHashTable.add((value, 1), HT3);

// use replaced expression
// use replaced expression
value = expReplaced;

// debug
Expand Down Expand Up @@ -363,7 +363,7 @@ algorithm

case (DAE.CALL(path=Absyn.IDENT("der")), _)
then (inExp, false, inTuple);

case (DAE.CALL(path=path, attr=DAE.CALL_ATTR(ty=tp)), (HT, HT2, i)) equation
true = Flags.getConfigBool(Flags.CSE_CALL) or Flags.getConfigBool(Flags.CSE_EACHCALL);
if BaseHashTable.hasKey(inExp, HT) then
Expand Down Expand Up @@ -515,10 +515,10 @@ algorithm
then var::inAccumVarLst;

/* consider also array and record crefs */
/* TODO: Acivate that case, now it produces wrong types
/* TODO: Acivate that case, now it produces wrong types
in the created variables, it seems that expandCref
has an issue.
*/
*/
/*
case DAE.CREF(componentRef=cr) equation
crefs = ComponentReference.expandCref(cr, true);
Expand All @@ -527,7 +527,7 @@ algorithm
outVarLst = List.fold(expLst, createVarsForExp, inAccumVarLst);
then outVarLst;
*/

case DAE.TUPLE(expLst) equation
outVarLst = List.fold(expLst, createVarsForExp, inAccumVarLst);
then outVarLst;
Expand Down Expand Up @@ -556,7 +556,7 @@ algorithm
list<DAE.Exp> expLst;
DAE.Type ty;
Boolean scalar;

case DAE.TUPLE(PR=expLst) equation
expLst = List.map(expLst, prepareExpForReplace);
then DAE.TUPLE(expLst);
Expand All @@ -566,7 +566,7 @@ algorithm
cr = ComponentReference.crefStripLastSubs(cr);
cr = ComponentReference.crefSetType(cr, ty);
e = Expression.crefExp(cr);
then e;
then e;

case DAE.RECORD(exps=e::_) equation
cr = Expression.expCref(e);
Expand Down

0 comments on commit 61bcfa0

Please sign in to comment.