Changeset 6b899c3 in OpenModelica


Ignore:
Timestamp:
2012-11-16T22:53:52+01:00 (11 years ago)
Author:
Martin Sjölund <martin.sjolund@…>
Branches:
Added-citation-metadata, maintenance/v1.14, maintenance/v1.15, maintenance/v1.16, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master, omlib-staging
Children:
234451a
Parents:
9913f672
Message:

#1941

  • Allow all sorts of weird stuff if external language is "builtin"

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13932 f25d12d1-65f4-0310-ae8a-bbce733d8d8e

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Compiler/FrontEnd/Inst.mo

    rf15694a2 r6b899c3  
    1284312843        (cache,SOME((exp,prop,attr))) = Static.elabCref(cache,env,cref,impl,false /* Do NOT vectorize arrays; we require a CREF */,pre,info);
    1284412844        (cache,extarg) = instExtGetFargsSingle(cache,env,exp,prop);
    12845         assertExtArgOutputIsCrefVariable(extarg,Types.getPropType(prop),Types.propAllConst(prop),info);
     12845        assertExtArgOutputIsCrefVariable(lang,extarg,Types.getPropType(prop),Types.propAllConst(prop),info);
    1284612846      then
    1284712847        (cache,extarg);
     
    1285612856
    1285712857protected function assertExtArgOutputIsCrefVariable
     12858  input Option<String> lang;
    1285812859  input DAE.ExtArg arg;
    1285912860  input DAE.Type ty;
     
    1286112862  input Absyn.Info info;
    1286212863algorithm
    12863   _ := match (arg,ty,c,info)
     12864  _ := match (lang,arg,ty,c,info)
    1286412865    local
    1286512866      String str;
    12866     case (_,DAE.T_ARRAY(ty = _),_,_)
     12867    case (SOME("builtin"),_,_,_,_) then ();
     12868    case (_,_,DAE.T_ARRAY(ty = _),_,_)
    1286712869      equation
    1286812870        str = Types.unparseType(ty);
    1286912871        Error.addSourceMessage(Error.EXTERNAL_FUNCTION_RESULT_ARRAY_TYPE,{str},info);
    1287012872      then fail();
    12871     case (DAE.EXTARG(type_=_),_,DAE.C_VAR(),_) then ();
    12872     case (_,_,DAE.C_VAR(),_)
     12873    case (_,DAE.EXTARG(type_=_),_,DAE.C_VAR(),_) then ();
     12874    case (_,_,_,DAE.C_VAR(),_)
    1287312875      equation
    1287412876        str = DAEDump.dumpExtArgStr(arg);
Note: See TracChangeset for help on using the changeset viewer.