Changeset 2319


Ignore:
Timestamp:
Feb 2, 2007, 9:36:06 PM (14 years ago)
Author:
yura
Message:
  • Generate <Error.Not-Available> calls for Java imports when compiling to C++.
Location:
to-imperative/trunk/compiler
Files:
3 edited

Legend:

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

    r2073 r2319  
    4343$func Symbol-To-CPP s.RFP-Symbol = e.CPP-String;
    4444
    45 $func Name-To-CPP t.name = e.CPP-Name;
     45$func? Name-To-CPP t.name = e.CPP-Name;
    4646
    4747$func Cond-To-CPP e.cond = e.CPP-Cond;
     
    249249      {
    250250        # \{ s.call : CALL; }, <? &Current-Trace> : e.full-name (e.ress) =
    251           ('if (RF_CALL (' <Name-To-CPP t.name> ', '
    252             <Args-To-CPP () Exprs e.exprs> ', ' <Args-To-CPP () Vars e.ress> '))')
     251          {
     252            ('if (RF_CALL (' <Name-To-CPP t.name> ', '
     253              <Args-To-CPP () Exprs e.exprs> ', ' <Args-To-CPP () Vars e.ress> '))');
     254            <Bind &RFP-Includes (Error) (BOOT)>,
     255              ('if (RF_CALL (' <Name-To-CPP (Error Not-Available)> ', '
     256                '(' <Const-Expr-To-CPP <Concat t.name>> ', ' <Args-To-CPP () Vars>'))');
     257          }
    253258          ('{' (<Trace-Exit e.full-name (e.ress)> ('return true;')) '}')
    254259          ('else RF_RETFAIL;');
     
    257262          s.call;
    258263        } :: s.call,
    259           ('RF_' s.call ' (' <Name-To-CPP t.name> ', '
    260             <Args-To-CPP () Exprs e.exprs> ', ' <Args-To-CPP () Vars e.ress> ');');
     264          {
     265            ('RF_' s.call ' (' <Name-To-CPP t.name> ', '
     266              <Args-To-CPP () Exprs e.exprs> ', ' <Args-To-CPP () Vars e.ress> ');');
     267            <Bind &RFP-Includes (Error) (BOOT)>,
     268              ('RF_' s.call ' (' <Name-To-CPP (Error Not-Available)> ', '
     269                '(' <Const-Expr-To-CPP <Concat t.name>> '), ' <Args-To-CPP () Vars>');');
     270          };
    261271      };
    262272  } :: e.cpp-item,
     
    487497Name-To-CPP t.obj-name =
    488498  <RFP-Extract-Qualifiers t.obj-name> :: (e.qualifiers) e.name,
     499  {
     500    <Lookup &RFP-Includes e.qualifiers> : LOCAL e 'org' s 'refal' s 'plus' s 'wrappers' e =
     501      $fail;;
     502  },
    489503  <? &Current-Namespace> :: e.namespace,
    490504  {
  • to-imperative/trunk/compiler/rfpc.rf

    r2300 r2319  
    6565
    6666$func Open-Channel e.name (e.ext) = s.channel s.need-close?;
    67 
    68 $table Includes;
    6967
    7068$func Extract-Inputs e.items = e.items;
     
    280278              <PrintLN! s.channel '#include <rf_core.hh>'>,
    281279              {
    282                 <Domain &Includes> : e (e.include) e,
    283                   <Lookup &Includes e.include> : \{
     280                <Domain &RFP-Includes> : e (e.include) e,
     281                  <Lookup &RFP-Includes e.include> : \{
    284282                    BOOT e = '<refal/'e.include'.hh>';
     283                    LOCAL e 'org' s 'refal' s 'plus' s 'wrappers' e = $fail;
    285284                    LOCAL e.path = '"'e.path e.include'.hh"';
    286285                  } :: e.include,
     
    308307              <PrintLN! s.channel '#include <rf_core.hh>'>,
    309308              {
    310                 <Domain &Includes> : e (e.include) e,
    311                   <Lookup &Includes e.include> : \{
     309                <Domain &RFP-Includes> : e (e.include) e,
     310                  <Lookup &RFP-Includes e.include> : \{
    312311                    BOOT e = '<refal/'e.include'.hh>';
    313312                    LOCAL e.path = '"'e.path e.include'.hh"';
     
    369368              {
    370369                e.inputs : e (v.java-module) e, \{
    371                   <Lookup &Includes v.java-module> : \{
     370                  <Lookup &RFP-Includes v.java-module> : \{
    372371                    BOOT e = 'org.refal.plus.library.'v.java-module;
    373372                    LOCAL e.path,
     
    439438              {
    440439                e.inputs : e (v.java-module) e, \{
    441                   <Lookup &Includes v.java-module> : \{
     440                  <Lookup &RFP-Includes v.java-module> : \{
    442441                    BOOT e = 'org.refal.plus.library.'v.java-module;
    443442                    LOCAL e.path,
     
    650649
    651650Get-Ready-To-Work e.Items =
    652   <RFP-Clear-Table &Includes>,
     651  <RFP-Clear-Table &RFP-Includes>,
    653652  <RFP-Clear-Table &Fun>,
    654653  <RFP-Clear-Table &Fun?>,
     
    756755              \!\! $fail;
    757756            };
    758           <Bind &Includes (e.mod-name) (BOOT e.path s.dir-separator)>;
     757          <Bind &RFP-Includes (e.mod-name) (BOOT e.path s.dir-separator)>;
    759758        };
    760759      {
     
    767766        e.path s.dir-separator;
    768767      } :: e.path,
    769         <Bind &Includes (e.mod-name) (LOCAL e.path)>;
     768        <Bind &RFP-Includes (e.mod-name) (LOCAL e.path)>;
    770769    };
    771     <Bind &Includes (e.mod-name) (LOCAL)>;
     770    <Bind &RFP-Includes (e.mod-name) (LOCAL)>;
    772771  },
    773772    <Extract-Inputs e.items>;
    774773  e.items =
    775774    {
    776       <In-Table? &RFP-Options DBG> = <Bind &Includes (Debug) (BOOT)>;;
     775      <In-Table? &RFP-Options DBG> = <Bind &RFP-Includes (Debug) (BOOT)>;;
    777776    },
    778777    e.items;
  • to-imperative/trunk/compiler/rfpc.rfi

    r2096 r2319  
    2929$table RFP-Trace ;
    3030
     31$table RFP-Includes;
     32
    3133$func Main = e ;
    3234$func RFP-Pretty-Print s.channel (e.indent) e.expr = ;
Note: See TracChangeset for help on using the changeset viewer.