Skip to content

Commit

Permalink
- Changing the scope of DAEDump.dumpInlineTypeStr
Browse files Browse the repository at this point in the history
- Using Print.saveAndClearBuf for function ValuesUtil.valString
- Applying replacements on ASUB subindices

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16472 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Leonardo Laguna committed Jun 24, 2013
1 parent e72f245 commit 99ff8d2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/DAEDump.mo
Expand Up @@ -1641,7 +1641,7 @@ algorithm
end match;
end dumpParallelismStr;

protected function dumpInlineTypeStr
public function dumpInlineTypeStr
input DAE.InlineType inlineType;
output String str;
algorithm
Expand Down
8 changes: 3 additions & 5 deletions Compiler/FrontEnd/ValuesUtil.mo
Expand Up @@ -2003,14 +2003,12 @@ public function valString "function: valString
input Value inValue;
output String outString;
protected
String oldBuffer;
Integer handle;
algorithm
oldBuffer := Print.getString();
Print.clearBuf();
handle := Print.saveAndClearBuf();
valString2(inValue);
outString := Print.getString();
Print.clearBuf();
Print.printBuf(oldBuffer);
Print.restoreBuf(handle);
end valString;

public function valString2 "function: valString
Expand Down
7 changes: 4 additions & 3 deletions Compiler/Util/VarTransform.mo
Expand Up @@ -907,9 +907,9 @@ protected function printReplacementTupleStr "help function to dumpReplacements"
output String str;
algorithm
// optional exteded type debugging
str := ComponentReference.debugPrintComponentRefTypeStr(Util.tuple21(tpl)) +& " -> " +& ExpressionDump.debugPrintComponentRefExp(Util.tuple22(tpl));
//str := ComponentReference.debugPrintComponentRefTypeStr(Util.tuple21(tpl)) +& " -> " +& ExpressionDump.debugPrintComponentRefExp(Util.tuple22(tpl));
// Normal debugging, without type&dimension information on crefs.
//str := ComponentReference.printComponentRefStr(Util.tuple21(tpl)) +& " -> " +& ExpressionDump.printExpStr(Util.tuple22(tpl));
str := ComponentReference.printComponentRefStr(Util.tuple21(tpl)) +& " -> " +& ExpressionDump.printExpStr(Util.tuple22(tpl));
end printReplacementTupleStr;

public function replacementSources "Returns all sources of the replacement rules"
Expand Down Expand Up @@ -1567,8 +1567,9 @@ algorithm
equation
true = replaceExpCond(cond, e);
(e1_1,true) = replaceExp(e1, repl, cond);
(expl_1,true) = replaceExpList(expl, repl, cond, {}, false);
then
(Expression.makeASUB(e1_1,expl),true);
(Expression.makeASUB(e1_1,expl_1),true);
case ((e as DAE.SIZE(exp = e1,sz = NONE())),repl,cond)
equation
true = replaceExpCond(cond, e);
Expand Down

0 comments on commit 99ff8d2

Please sign in to comment.