Skip to content

Commit

Permalink
- Fix compilation
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12136 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jun 20, 2012
1 parent 01b1c86 commit acfec95
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Compiler/FrontEnd/ExpressionDump.mo
Expand Up @@ -620,7 +620,7 @@ algorithm

case (DAE.SCONST(string = s), stringDelimiter, _, _)
equation
s = System.escapedString(s);
s = System.escapedString(s,false);
s = stringAppendList({stringDelimiter, s, stringDelimiter});
then
s;
Expand Down Expand Up @@ -1151,7 +1151,7 @@ algorithm

case (DAE.SCONST(string = s))
equation
s = System.escapedString(s);
s = System.escapedString(s,true);
s = stringAppendList({"\"", s, "\""});
then
Graphviz.LNODE("SCONST",{s},{},{});
Expand Down Expand Up @@ -1344,7 +1344,7 @@ algorithm
case (DAE.SCONST(string = s),level) /* Graphviz.LNODE(\"SCONST\",{s\'\'},{},{}) */
equation
gen_str = genStringNTime(" |", level);
s = System.escapedString(s);
s = System.escapedString(s,true);
res_str = stringAppendList({gen_str,"SCONST ","\"", s,"\"\n"});
then
res_str;
Expand Down
16 changes: 12 additions & 4 deletions Compiler/FrontEnd/SCodeInst.mo
Expand Up @@ -147,7 +147,7 @@ algorithm

//print("SCodeInst took " +& realString(System.getTimerIntervalTime()) +& " seconds.\n");

_ = SCodeExpand.expand(name, cls);
_ = SCodeExpand.expand(name, cls /*, functions */);
then
();

Expand Down Expand Up @@ -1713,7 +1713,7 @@ protected function instFunction
output Function outFunction;
output FunctionHashTable outFunctions;
algorithm
(outName, outFunction, outFunctions) := match(inName, inEnv, inPrefix, inInfo, inFunctions)
(outName, outFunction, outFunctions) := matchcontinue (inName, inEnv, inPrefix, inInfo, inFunctions)
local
Absyn.Path path;
Item item;
Expand All @@ -1726,6 +1726,12 @@ algorithm
list<Statement> stmts;
FunctionHashTable functions;

case (_, _, _, _, functions)
equation
path = Absyn.crefToPath(inName);
outFunction = BaseHashTable.get(path,functions);
then (path, outFunction, functions);

case (_, _, _, _, functions)
equation
path = Absyn.crefToPath(inName);
Expand All @@ -1735,10 +1741,12 @@ algorithm
InstTypes.NO_PREFIXES(), inEnv, InstTypes.emptyPrefix, INST_ALL(), functions);
(inputs,outputs,locals) = getFunctionParameters(cls);
stmts = List.flatten(algorithms);
outFunction = InstTypes.FUNCTION(inputs,outputs,locals,stmts);
functions = BaseHashTable.addUnique((path,outFunction),functions);
then
(path, InstTypes.FUNCTION(inputs,outputs,locals,stmts), functions);
(path, outFunction, functions);

end match;
end matchcontinue;
end instFunction;

protected function instFunctionName
Expand Down
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/ValuesUtil.mo
Expand Up @@ -2049,7 +2049,7 @@ algorithm
();
case Values.STRING(string = s)
equation
s = System.escapedString(s);
s = System.escapedString(s,false);
s_1 = stringAppendList({"\"",s,"\""});
Print.printBuf(s_1);
then
Expand Down

0 comments on commit acfec95

Please sign in to comment.