Skip to content

Commit

Permalink
Modified the handling of array for constructors.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@2872 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Kristian Stavåker committed Aug 18, 2007
1 parent e3622b7 commit a7cee19
Show file tree
Hide file tree
Showing 3 changed files with 185 additions and 124 deletions.
11 changes: 9 additions & 2 deletions Compiler/Codegen.mo
Expand Up @@ -2518,6 +2518,13 @@ algorithm
Algorithm.Else else_;
Algorithm.Statement algStmt;
Boolean a;

// Part of ValueBlock implementation, special treatment of _ := VB case
case (Algorithm.ASSIGN(_,Exp.CREF_IDENT("WILDCARD__",{}),exp as Exp.VALUEBLOCK(_,_,_,_)),tnr,context)
equation
(cfn,_,tnr1) = generateExpression(exp, tnr, context);
then (cfn,tnr1);

case (Algorithm.ASSIGN(type_ = typ,componentRef = cref,exp = exp),tnr,context)
equation
Debug.fprintln("cgas", "generate_algorithm_statement");
Expand Down Expand Up @@ -3947,8 +3954,8 @@ algorithm
then (cfn,tnr2,tvar);
case (Exp.T_ARRAY(_,SOME(_) :: _),_,_,_,_)
local
equation
Debug.fprintln("failtrace", "# Codegen: Only 1 dim return arrays from Valueblock implemented");
equation
Debug.fprintln("failtrace", "# Codegen.addValueblockRetVar failed, N-dim arrays not supported");
then fail();
case (localType,localFunc,localTnr,localResVar,_)
local
Expand Down

0 comments on commit a7cee19

Please sign in to comment.