Skip to content

Commit 5baac76

Browse files
committed
1 parent e33883c commit 5baac76

File tree

6 files changed

+9
-49
lines changed

6 files changed

+9
-49
lines changed

OMCompiler/Compiler/NFFrontEnd/NFCeval.mo

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -931,12 +931,11 @@ function evalBinaryOp_dispatch
931931
output Expression exp;
932932
algorithm
933933
exp := match op.op
934-
case Op.ADD then evalBinaryAdd(exp1, exp2);
935-
case Op.SUB then evalBinarySub(exp1, exp2);
936-
case Op.MUL then evalBinaryMul(exp1, exp2);
937-
case Op.DIV then evalBinaryDiv(exp1, exp2, target);
938-
case Op.DIV_EW then evalBinaryDiv(exp1, exp2, target);
939-
case Op.POW then evalBinaryPow(exp1, exp2, target);
934+
case Op.ADD then evalBinaryAdd(exp1, exp2);
935+
case Op.SUB then evalBinarySub(exp1, exp2);
936+
case Op.MUL then evalBinaryMul(exp1, exp2);
937+
case Op.DIV then evalBinaryDiv(exp1, exp2, target);
938+
case Op.POW then evalBinaryPow(exp1, exp2, target);
940939
case Op.ADD_SCALAR_ARRAY then evalBinaryScalarArray(exp1, exp2, evalBinaryAdd);
941940
case Op.ADD_ARRAY_SCALAR then evalBinaryArrayScalar(exp1, exp2, evalBinaryAdd);
942941
case Op.SUB_SCALAR_ARRAY then evalBinaryScalarArray(exp1, exp2, evalBinarySub);

OMCompiler/Compiler/NFFrontEnd/NFExpandExp.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ public
582582
end if;
583583

584584
if expanded then
585-
outExp := expandBinaryElementWise2(exp1, Operator.stripEW(op), exp2, SimplifyExp.simplifyBinaryOp);
585+
outExp := expandBinaryElementWise2(exp1, op, exp2, SimplifyExp.simplifyBinaryOp);
586586
else
587587
outExp := exp;
588588
end if;

OMCompiler/Compiler/NFFrontEnd/NFOperator.mo

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ public
308308
case Op.MUL_MATRIX_VECTOR then Absyn.Operator.MUL();
309309
case Op.SCALAR_PRODUCT then Absyn.Operator.MUL();
310310
case Op.MATRIX_PRODUCT then Absyn.Operator.MUL();
311-
case Op.DIV_SCALAR_ARRAY then Absyn.Operator.DIV_EW();
311+
case Op.DIV_SCALAR_ARRAY then Absyn.Operator.DIV();
312312
case Op.DIV_ARRAY_SCALAR then Absyn.Operator.DIV();
313313
case Op.POW_SCALAR_ARRAY then Absyn.Operator.POW();
314314
case Op.POW_ARRAY_SCALAR then Absyn.Operator.POW();
@@ -357,7 +357,6 @@ public
357357
case Op.SCALAR_PRODUCT then DAE.MUL_SCALAR_PRODUCT(ty);
358358
case Op.ADD_EW then DAE.ADD_ARR(ty);
359359
case Op.SUB_EW then DAE.SUB_ARR(ty);
360-
case Op.DIV_EW then DAE.DIV_ARR(ty);
361360
case Op.MATRIX_PRODUCT then DAE.MUL_MATRIX_PRODUCT(ty);
362361
case Op.DIV_SCALAR_ARRAY then DAE.DIV_SCALAR_ARRAY(ty);
363362
case Op.DIV_ARRAY_SCALAR then DAE.DIV_ARRAY_SCALAR(ty);

OMCompiler/Compiler/NFFrontEnd/NFTypeCheck.mo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,14 +1129,14 @@ algorithm
11291129
(_, _, mk) := matchArrayTypes(ty1, ty2, e1, ALLOW_UNKNOWN);
11301130
valid := valid and isCompatibleMatch(mk);
11311131
then
1132-
(ty1, if isElementWise then Operator.makeDivEW(ty1) else Operator.makeDiv(ty1));
1132+
(ty1, Operator.makeDiv(ty1));
11331133

11341134
// Anything else is an error.
11351135
else
11361136
algorithm
11371137
valid := false;
11381138
then
1139-
(ty1, if isElementWise then Operator.makeDivEW(ty1) else Operator.makeDiv(ty1));
1139+
(ty1, Operator.makeDiv(ty1));
11401140
end match;
11411141

11421142
binaryExp := Expression.BINARY(e1, op, e2);

testsuite/flattening/modelica/scodeinst/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,6 @@ OperationAdd1.mo \
908908
OperationAddEW1.mo \
909909
OperationDiv1.mo \
910910
OperationDivEW1.mo \
911-
OperationDivEW2.mo \
912911
OperationLogicalBinary1.mo \
913912
OperationLogicalBinary2.mo \
914913
OperationLogicalUnary1.mo \

testsuite/flattening/modelica/scodeinst/OperationDivEW2.mo

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)