Skip to content
This repository has been archived by the owner on May 18, 2019. It is now read-only.

Commit

Permalink
Added new flag condenseArrays
Browse files Browse the repository at this point in the history
- Added new flag condenseArrays to make it possible to turn of the
  array condensing done in InstSection.
  • Loading branch information
perost authored and OpenModelica-Hudson committed Dec 2, 2016
1 parent bfd4680 commit 9da1640
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions Compiler/FrontEnd/InstSection.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,7 @@ algorithm
Absyn.Exp e1,e2;

case(cache,env,e1,e2,_,_,prop,prop2,_,pre,_) equation
true = Flags.getConfigBool(Flags.CONDENSE_ARRAYS);
b3 = Types.isPropTupleArray(prop);
b4 = Types.isPropTupleArray(prop2);
true = boolOr(b3,b4);
Expand Down
6 changes: 5 additions & 1 deletion Compiler/Util/Flags.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,9 @@ constant ConfigFlag EVALUATE_PROTECTED_PARAMS = CONFIG_FLAG(108, "evaluateProtec
constant ConfigFlag REPLACE_EVALUATED_PARAMS = CONFIG_FLAG(109, "replaceEvaluatedParameters",
NONE(), EXTERNAL(), BOOL_FLAG(true), NONE(),
Util.gettext("Replaces all the evaluated parameters in the DAE."));
constant ConfigFlag CONDENSE_ARRAYS = CONFIG_FLAG(110, "condenseArrays",
NONE(), EXTERNAL(), BOOL_FLAG(true), NONE(),
Util.gettext("Sets whether array expressions containing function calls are condensed or not."));

protected
// This is a list of all configuration flags. A flag can not be used unless it's
Expand Down Expand Up @@ -1441,7 +1444,8 @@ constant list<ConfigFlag> allConfigFlags = {
EQUATIONS_PER_FILE,
EVALUATE_FINAL_PARAMS,
EVALUATE_PROTECTED_PARAMS,
REPLACE_EVALUATED_PARAMS
REPLACE_EVALUATED_PARAMS,
CONDENSE_ARRAYS
};

public function new
Expand Down

0 comments on commit 9da1640

Please sign in to comment.