Skip to content

Commit

Permalink
[Janitor mode] Fix whitespace
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@22275 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
OpenModelica-Hudson committed Sep 11, 2014
1 parent 35a6f78 commit 6afa020
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Compiler/BackEnd/IndexReduction.mo
Expand Up @@ -3416,7 +3416,7 @@ algorithm
equation
crlst = ComponentReference.expandCref(name,false);
/*
TODO: mahge: what is this supposed to do?.
TODO: mahge: what is this supposed to do?.
Why are even these dims needed separetely in BackendDAE.VAR
They are already in the cref */
/*
Expand Down
2 changes: 1 addition & 1 deletion Compiler/BackEnd/XMLDump.mo
Expand Up @@ -3317,7 +3317,7 @@ algorithm
Print.printBuf(printExpStr(e1));
then
();
case DAE.DIM_UNKNOWN()
case DAE.DIM_UNKNOWN()
equation
Print.printBuf(":");
then
Expand Down
10 changes: 5 additions & 5 deletions Compiler/FrontEnd/CevalFunction.mo
Expand Up @@ -1905,7 +1905,7 @@ algorithm
SymbolTable st;

case (ty, {}, _, _, _, _) then (inCache, ty, inST);

case (ty, DAE.DIM_UNKNOWN() :: rest_dims, dim_int :: bind_dims, _, _, st)
equation
dim = Expression.intDimension(dim_int);
Expand All @@ -1919,31 +1919,31 @@ algorithm
(cache, ty, st) = appendDimensions2(ty, rest_dims, bind_dims, inCache, inEnv, st);
then
(cache, DAE.T_ARRAY(ty, {DAE.DIM_INTEGER(0)}, DAE.emptyTypeSource), st);

case (ty, DAE.DIM_INTEGER(dim_int) :: rest_dims, bind_dims, _, _, st)
equation
dim = DAE.DIM_INTEGER(dim_int);
bind_dims = List.stripFirst(bind_dims);
(cache, ty, st) = appendDimensions2(ty, rest_dims, bind_dims, inCache, inEnv, st);
then
(cache, DAE.T_ARRAY(ty, {dim}, DAE.emptyTypeSource), st);

case (ty, DAE.DIM_BOOLEAN() :: rest_dims, bind_dims, _, _, st)
equation
dim = DAE.DIM_INTEGER(2);
bind_dims = List.stripFirst(bind_dims);
(cache, ty, st) = appendDimensions2(ty, rest_dims, bind_dims, inCache, inEnv, st);
then
(cache, DAE.T_ARRAY(ty, {dim}, DAE.emptyTypeSource), st);

case (ty, DAE.DIM_ENUM(size = dim_int) :: rest_dims, bind_dims, _, _, st)
equation
dim = DAE.DIM_INTEGER(dim_int);
bind_dims = List.stripFirst(bind_dims);
(cache, ty, st) = appendDimensions2(ty, rest_dims, bind_dims, inCache, inEnv, st);
then
(cache, DAE.T_ARRAY(ty, {dim}, DAE.emptyTypeSource), st);

case (ty, DAE.DIM_EXP(exp = dim_exp) :: rest_dims, bind_dims, _, _, st)
equation
(cache, dim_val, st) = cevalExp(dim_exp, inCache, inEnv, st);
Expand Down
4 changes: 2 additions & 2 deletions Compiler/FrontEnd/Expression.mo
Expand Up @@ -580,7 +580,7 @@ public function dimensionSizeExpHandleUnkown
This function will change unknown dims to DAE.ICONST(-1).
we use it to handle unknown dims in code generation. unknown dims
are okay if the variable is a function input (it's just holds the slot
and will not be generated). Otherwise it's an error
and will not be generated). Otherwise it's an error
since it shouldn't have reached there."
input DAE.Dimension dim;
output DAE.Exp exp;
Expand Down Expand Up @@ -8543,7 +8543,7 @@ public function dimensionsKnownAndNonZero
input list<DAE.Dimension> dims;
output Boolean allKnown;
algorithm
allKnown := Util.boolAndList(List.map(dims, dimensionKnownAndNonZero));
allKnown := Util.boolAndList(List.map(dims, dimensionKnownAndNonZero));
end dimensionsKnownAndNonZero;

public function dimensionUnknownOrExp
Expand Down
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/Inst.mo
Expand Up @@ -2420,7 +2420,7 @@ algorithm
(cache,dims) = InstUtil.elabArraydimOpt(cache,cenv_2, Absyn.CREF_IDENT("",{}),cn, ad, eq, impl,NONE(),true,pre,info,inst_dims) "owncref not valid here" ;
// inst_dims2 = InstUtil.instDimExpLst(dims, impl);
inst_dims_1 = List.appendLastList(inst_dims, dims);

(cache,env_2,ih,store,dae,csets_1,ci_state_1,vars,bc,oDA,eqConstraint,graph) = instClassIn(cache, cenv_2, ih, store, mods_1, pre, new_ci_state, c, vis,
inst_dims_1, impl, callscope, graph, inSets, instSingleCref) "instantiate class in opened scope.";
ClassInf.assertValid(ci_state_1, re, info) "Check for restriction violations";
Expand Down
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/InstUtil.mo
Expand Up @@ -3969,7 +3969,7 @@ algorithm
outDimension := match (inDimension)
local
Integer i;

// case (DAE.DIM_ENUM(size = i)) then DAE.DIM_INTEGER(i);
case (DAE.DIM_BOOLEAN()) then DAE.DIM_INTEGER(2);
else inDimension;
Expand Down
10 changes: 5 additions & 5 deletions Compiler/FrontEnd/InstVar.mo
Expand Up @@ -813,11 +813,11 @@ algorithm
equation
true = Config.splitArrays();
false = ClassInf.isFunction(ci_state);

// Try to deduce the dimension from the modifier.
dim2 = InstUtil.instWholeDimFromMod(dim, mod, n, info);
inst_dims_1 = List.appendLastList(inst_dims, {dim2});

(cache,compenv,ih,store,dae,csets,ty,graph) =
instArray(cache,env,ih,store, ci_state, mod, pre, n, (cl,attr), pf, 1, dim2, dims, idxs, inst_dims_1, impl, comment,info,graph, csets);
ty_1 = InstUtil.liftNonBasicTypes(ty,dim2); // Do not lift types extending basic type, they are already array types.
Expand All @@ -841,7 +841,7 @@ algorithm
dim2 = InstUtil.instWholeDimFromMod(dim, mod, n, info);
inst_dims_1 = List.appendLastList(inst_dims, {dim2});
dime2 = Expression.dimensionSubscript(dim2);

(cache,compenv,ih,store,dae,csets,ty,graph) =
instVar2(cache,env,ih,store,ci_state,mod,pre,n,cl,attr,pf,dims,dime2::idxs,inst_dims_1,impl,comment,info,graph,csets);
ty_1 = InstUtil.liftNonBasicTypes(ty,dim2); // Do not lift types extending basic type, they are already array types.
Expand All @@ -856,7 +856,7 @@ algorithm

// dim = InstUtil.evalEnumAndBoolDim(dim);
inst_dims_1 = List.appendLastList(inst_dims, {dim});

(cache,compenv,ih,store,dae,csets,ty,graph) =
instArray(cache,env,ih,store, ci_state, mod, pre, n, (cl,attr), pf, 1, dim, dims, idxs, inst_dims_1, impl, comment,info,graph,csets);
ty_1 = InstUtil.liftNonBasicTypes(ty,dim); // Do not lift types extending basic type, they are already array types.
Expand All @@ -875,7 +875,7 @@ algorithm
*/
inst_dims_1 = List.appendLastList(inst_dims, {dim});
dime = Expression.dimensionSubscript(dim);

(cache,compenv,ih,store,dae,csets,ty,graph) =
instVar2(cache,env,ih,store,ci_state,mod,pre,n,cl,attr,pf,dims,dime::idxs,inst_dims_1,impl,comment,info,graph,csets);
// Type lifting is done in the "scalar" case
Expand Down
4 changes: 2 additions & 2 deletions Compiler/Template/CodegenC.tpl
Expand Up @@ -10397,8 +10397,8 @@ template dimension(Dimension d)
case DAE.DIM_BOOLEAN(__) then '2'
case DAE.DIM_ENUM(__) then size
case DAE.DIM_EXP(exp=e) then dimensionExp(e)
case DAE.DIM_INTEGER(__) then
if intEq(integer, -1) then
case DAE.DIM_INTEGER(__) then
if intEq(integer, -1) then
error(sourceInfo(),"Negeative dimension(unknown dimensions) may not be part of generated code. This is most likely an error on the part of OpenModelica. Please submit a detailed bug-report.")
else
integer
Expand Down
4 changes: 2 additions & 2 deletions Compiler/Template/SimCodeTV.mo
Expand Up @@ -2690,8 +2690,8 @@ package ComponentReference
end ComponentReference;

package Expression
function subscriptConstants

function subscriptConstants
"returns true if all subscripts are known (i.e no cref) constant values (no slice or wholedim "
input list<DAE.Subscript> inSubs;
output Boolean areConstant;
Expand Down

0 comments on commit 6afa020

Please sign in to comment.