Skip to content

Commit

Permalink
Always traverse down non-literal array expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed Apr 13, 2016
1 parent 7251626 commit 9939891
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions Compiler/SimCode/SimCodeFunctionUtil.mo
Expand Up @@ -1167,10 +1167,10 @@ function replaceLiteralArrayExp
input DAE.Exp inExp;
input tuple<Integer, HashTableExpToIndex.HashTable, list<DAE.Exp>> inTpl;
output DAE.Exp outExp;
output Boolean cont;
output Boolean cont=true;
output tuple<Integer, HashTableExpToIndex.HashTable, list<DAE.Exp>> outTpl;
algorithm
(outExp,cont,outTpl) := matchcontinue (inExp,inTpl)
(outExp,outTpl) := match (inExp,inTpl)
local
DAE.Exp exp,exp2;
tuple<Integer, HashTableExpToIndex.HashTable, list<DAE.Exp>> tpl;
Expand All @@ -1182,14 +1182,8 @@ algorithm
cont := false;
else
exp2 := inExp;
try
isLiteralExp(inExp);
cont := false;
else
cont := true;
end try;
end try;
then (exp2, cont, tpl);
then (exp2, tpl);
case (exp as DAE.MATRIX(), tpl)
algorithm
try
Expand All @@ -1198,16 +1192,10 @@ algorithm
cont := false;
else
exp2 := inExp;
try
isLiteralExp(inExp);
cont := false;
else
cont := true;
end try;
end try;
then (exp2, cont, tpl);
else (inExp, true, inTpl);
end matchcontinue;
then (exp2, tpl);
else (inExp, inTpl);
end match;
end replaceLiteralArrayExp;

function replaceLiteralExp
Expand Down

0 comments on commit 9939891

Please sign in to comment.