Skip to content

Commit

Permalink
- Add debug_print to builtin env
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@6991 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Nov 12, 2010
1 parent e611436 commit 4fe3141
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Compiler/Builtin.mo
Expand Up @@ -2005,6 +2005,9 @@ protected constant DAE.Type void2string =(
protected constant DAE.Type a2void =(
DAE.T_FUNCTION({("x1",typeA)},(DAE.T_NORETCALL(),NONE()),DAE.NO_INLINE()),NONE());

protected constant DAE.Type stringBoxed2void =(
DAE.T_FUNCTION({("msg",DAE.T_STRING_DEFAULT),("val",DAE.T_BOXED_DEFAULT)},(DAE.T_NORETCALL(),NONE()),DAE.NO_INLINE()),NONE());

protected constant DAE.Type void2int =(
DAE.T_FUNCTION({},DAE.T_INTEGER_DEFAULT,DAE.NO_INLINE()),NONE());

Expand Down Expand Up @@ -3044,6 +3047,7 @@ algorithm
// Misc Operations
env = Env.extendFrameT(env, "if_exp", boolBoxedBoxed2boxed);
env = Env.extendFrameT(env, "printAny", a2void);
env = Env.extendFrameT(env, "debug_print", stringBoxed2void);
env = Env.extendFrameT(env, "tick", void2int);
env = Env.extendFrameT(env, "equality", AA2void);
// There is a C function called clock which does not return a double...
Expand Down
4 changes: 2 additions & 2 deletions Compiler/Types.mo
Expand Up @@ -1377,11 +1377,11 @@ algorithm
end setVarInput;

protected function setVarType "Sets a DAE.Var's type"
input Var v;
input Var var;
input Type ty;
output Var outV;
algorithm
outV := matchcontinue(v,ty)
outV := matchcontinue(var,ty)
local
Ident name;
Boolean f,p,streamPrefix;
Expand Down

0 comments on commit 4fe3141

Please sign in to comment.