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

Commit aa64ed4

Browse files
perostOpenModelica-Hudson
authored andcommitted
[NF] Constant evaluation optimizations.
- Added a field to NFExpression.ARRAY that indicates whether an array contains only literal expression or not, so that arrays that have already been evaluated can be skipped during constant evaluation. - Implemented Ceval.evalExpPartial that only evaluates the parts of an expression that can be evaluated, keeping e.g. iterators intact. - Use the function mentioned above to optimize the evaluation of array constructors and reductions, by partially evaluating the expression that's evaluated in each iteration. Belonging to [master]: - #2812
1 parent 8b10a66 commit aa64ed4

File tree

11 files changed

+212
-112
lines changed

11 files changed

+212
-112
lines changed

Compiler/NFFrontEnd/NFBuiltinCall.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public
200200
fail();
201201
end if;
202202

203-
arrayExp := Expression.ARRAY(Type.UNKNOWN(), posArgs);
203+
arrayExp := Expression.makeArray(Type.UNKNOWN(), posArgs);
204204
end makeArrayExp;
205205

206206
function makeCatExp

0 commit comments

Comments
 (0)