Skip to content

Commit

Permalink
- Fixed the generateCode() API call
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@7024 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Nov 14, 2010
1 parent 18ca920 commit c6f7d6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Compiler/CevalScript.mo
Expand Up @@ -1807,10 +1807,16 @@ algorithm
case (cache,env,DAE.CALL(path = Absyn.IDENT(name = "generateCode"),expLst = {DAE.CODE(Absyn.C_TYPENAME(path),_)}),
(st as Interactive.SYMBOLTABLE(ast = p,explodedAst = sp,instClsLst = ic,lstVarVal = iv,compiledFunctions = cf)),msg)
equation
(cache,Util.SUCCESS()) = Static.instantiateDaeFunction(cache, env, path, false, NONE(), true);
(cache,_) = cevalGenerateFunction(cache,env, path) " & Inst.instantiate_implicit(p\') => d &" ;
then
(cache,Values.BOOL(true),st);

case (cache,env,DAE.CALL(path = Absyn.IDENT(name = "generateCode"),expLst = {DAE.CODE(Absyn.C_TYPENAME(path),_)}),
(st as Interactive.SYMBOLTABLE(ast = p,explodedAst = sp,instClsLst = ic,lstVarVal = iv,compiledFunctions = cf)),msg)
then
(cache,Values.BOOL(false),st);

case (cache,env,
DAE.CALL(
path = Absyn.IDENT(name = "loadModel"),
Expand Down
4 changes: 2 additions & 2 deletions Compiler/Static.mo
Expand Up @@ -72,6 +72,7 @@ public import SCode;
public import SCodeUtil;
public import Values;
public import Prefix;
public import Util;

public type Ident = String;

Expand Down Expand Up @@ -107,7 +108,6 @@ protected import Patternm;
protected import Print;
protected import System;
protected import Types;
protected import Util;
protected import ValuesUtil;
protected import DAEUtil;
protected import PrefixUtil;
Expand Down Expand Up @@ -8827,7 +8827,7 @@ algorithm
end matchcontinue;
end elabCallArgsMetarecord;

protected function instantiateDaeFunction "help function to elabCallArgs. Instantiates the function as a dae and adds it to the
public function instantiateDaeFunction "help function to elabCallArgs. Instantiates the function as a dae and adds it to the
functiontree of a newly created dae"
input Env.Cache inCache;
input Env.Env env;
Expand Down

0 comments on commit c6f7d6b

Please sign in to comment.