Changeset 3477


Ignore:
Timestamp:
Mar 10, 2008, 7:47:54 PM (13 years ago)
Author:
orlov
Message:
  • $tfunc is synonym for $func when compiling to non-T.
Location:
to-imperative/trunk/compiler
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/compiler/rfp_asail_cpp.rf

    r3455 r3477  
    134134          (ERROR e.n "Not available"))>;
    135135    (s.tag s.linkage t.name (e.args) (e.ress) e.body),
    136       s.tag : \{ FUNC; "FUNC?"; },
     136      s.tag : \{ FUNC; "FUNC?"; TFUNC; },
    137137      <Store &Current_Func t.name>,
    138138      { <Get &Entry> : e t.name e = <Store &Entry_Name <QName_To_Cpp <Concat t.name>>>;; },
     
    414414    (STATIC e) =
    415415      ' + ' <Rfp2Cpp t.item>;
    416     (s.FUNC t.name), s.FUNC : \{ FUNC; "FUNC?"; } =
     416    (s.FUNC t.name), s.FUNC : \{ FUNC; "FUNC?"; TFUNC; } =
    417417      ' + Expr::create_sym<rftype::Func> (' <Name_To_CPP "DECL-FUNC" t.name> ')';
    418418    s.sym, {
  • to-imperative/trunk/compiler/rfp_asail_java.rf

    r3455 r3477  
    126126      s.tag : \{
    127127        FUNC  = ('void') /*empty*/;
     128        TFUNC  = ('void') /*empty*/;
    128129        "FUNC?" = ('boolean') ('return true;');
    129130      } :: (e.return_type) e.return =
     
    422423        ('return '<Name_To_Java t.name>' (arg, res);')
    423424      '}') '}');
    424     (FUNC t.name) = ('new Func () {'
     425    (s.FUNC t.name), s.FUNC : \{ FUNC; TFUNC; } = ('new Func () {'
    425426      ('public boolean eval (Expr arg, Result res) throws RefalException {'
    426427        ((<Name_To_Java t.name>' (arg, res);')
  • to-imperative/trunk/compiler/rfp_asail_jbc.rf

    r3473 r3477  
    172172          <MVvisitMethodInsn s.mv &INVOKESTATIC s.mod_name s.func_name "(Lorg/refal/plus/Expr;Lorg/refal/plus/Result;)Z">,
    173173          <MVvisitInsn s.mv &IRETURN>;
    174         FUNC  =
     174        s.FUNC_or_TFUNC  =
    175175          <MVvisitMethodInsn s.mv &INVOKESTATIC s.mod_name s.func_name "(Lorg/refal/plus/Expr;Lorg/refal/plus/Result;)V">,
    176176          <MVvisitInsn s.mv &ICONST_1> <MVvisitInsn s.mv &IRETURN>;
     
    317317  (s.tag s.linkage t.qname (e.args) (e.ress) e.body),
    318318    s.tag : \{
    319       FUNC  = 'V';
     319      FUNC    = 'V';
     320      TFUNC   = 'V';
    320321      "FUNC?" = 'Z';
    321322    } : s.retType =
     
    335336    <Pop_Block_Table>
    336337    s.tag : {
    337       FUNC  = <MVvisitInsn <MV> &RETURN>;
     338      FUNC    = <MVvisitInsn <MV> &RETURN>;
     339      TFUNC   = <MVvisitInsn <MV> &RETURN>;
    338340      "FUNC?" = <MVvisitInsn <MV> &ICONST_1> <MVvisitInsn <MV> &IRETURN>;
    339341    },
     
    815817  } :: e.module t.name =
    816818    <MVvisitFieldInsn <MV> &GETSTATIC <GetJBCQName e.module t.name> "Lorg/refal/plus/Expr;">;
    817   (s.func (e.module s.name)), s.func : \{ FUNC; "FUNC?"; } =
     819  (s.func (e.module s.name)), s.func : \{ FUNC; "FUNC?"; TFUNC; } =
    818820    <ToWord <Get &Class_Name> '$' <Length <Get &Func_Refs>>> :: s.cl_name,
    819821    <Put &Func_Refs (<Length <Get &Func_Refs>> <GetJBCQName e.module s.name> s.func)>,
  • to-imperative/trunk/compiler/rfpc.rf

    r3455 r3477  
    248248              { s.Isneed_close : 1 = <CloseChannel s.channel>;; },
    249249              $fail;
    250 //            <In-Table? &RFP-Options TPP>, e.asail-module : v,
    251 //              <Verbose "compilation from as-ail to T++ started">,
    252 //              <RFP-ASAIL-To-TPP t.module> :: e.module,
    253 //              <Verbose "compilation from as-ail to T++ finished">,
    254 //              <Open-Channel e.basename ('.tpp')> :: s.channel s.need-close?,
    255 //              <CPP-Pretty-Print 0 s.channel () e.module>,
    256 //              { s.need-close? : 1 = <Close-Channel s.channel>;; },
    257 //              $fail;                   
     250            <IsInTable &RFP_Options TPP>,
     251              <Verbose "compilation from as-ail to T++ started">,
     252              <RFP_ASAIL_To_TPP t.module> :: e.module,
     253              <Verbose "compilation from as-ail to T++ finished">,
     254              <Open_Channel e.basename ('.tpp')> :: s.channel s.Isneed_close,
     255              <CPP_Pretty_Print 0 s.channel () e.module>,
     256              { s.Isneed_close : 1 = <CloseChannel s.channel>;; },
     257              $fail;
    258258            <IsInTable &RFP_Options JAVA>,
    259259              <Verbose "compilation from as-ail to java started">,
Note: See TracChangeset for help on using the changeset viewer.