Changeset 2739


Ignore:
Timestamp:
Apr 27, 2007, 7:56:20 PM (14 years ago)
Author:
yura
Message:
  • Some recursions are replaced by $iter - do not use a recursion to terms on the same level in expression.
Location:
to-imperative/trunk/compiler
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/compiler/Makefile.bat

    r2707 r2739  
    22set JAVA_BIN=C:\Progra~1\Java\jdk1.5.0_11\bin
    33del *.java *.class
    4 start /b /wait /belownormal java -Xss10000000 -classpath ..\java;C:\Progra~1\Java\asm-3.0\lib\asm-3.0.jar org.refal.plus.compiler.rfpc -I . -java *.rf
     4start /b /wait /belownormal java -classpath ..\java;C:\Progra~1\Java\asm-3.0\lib\asm-3.0.jar org.refal.plus.compiler.rfpc -I . -java *.rf
    55start /b /wait /belownormal %JAVA_BIN%\javac -classpath .;..\java *.java
  • to-imperative/trunk/compiler/rfp_as2as.rf

    r2729 r2739  
    4545  <Transform (e.targets) e.Items>;
    4646
    47 Transform (e.targets) e.Items, {
     47$func Transform2 (e.targets) e.Items = e.Items (e.Items);
     48
     49Transform (e.targets) e.Items,
     50  /*empty*/ (e.Items) $iter {
     51    e.Items <Transform2 (e.targets) e.rest>;
     52  } :: e.Items (e.rest), e.rest : /*empty*/ =
     53  e.Items;
     54
     55Transform2 (e.targets) e.Items, {
    4856  e.Items : t.item e.rest, {
    4957    {
     
    8290    <Del_Pragmas t.item>;
    8391  } :: e.item =
    84     e.item <Transform (e.targets) e.rest>;;
     92    e.item (e.rest);
     93  ();
    8594};
    8695
  • to-imperative/trunk/compiler/rfp_asail2asail.rf

    r2638 r2739  
    5151  t2;
    5252
    53 Remove_Unreachable {
     53$func Remove_Unreachable2 e.asail = e.head (e.tail);
     54
     55Remove_Unreachable e.asail,
     56  /*empty*/ (e.asail) $iter {
     57    e.head <Remove_Unreachable2 e.tail>;
     58  } :: e.head (e.tail), e.tail : /*empty*/ =
     59  e.head;
     60
     61Remove_Unreachable2 {
    5462  t1 e2, t1 : \{
    5563    (FUNC t.name t.in t.out e.body) =
     
    106114        $fail;;
    107115    },
    108     e.t1 <Remove_Unreachable e2>;
     116    e.t1 (e2);
    109117  t1 e2, t1 : \{
    110118    (BREAK t.label) =
     
    122130    (ERROR e) = t1;
    123131    FATAL = t1;
    124   };
    125   t1 e2 = t1 <Remove_Unreachable e2>;
     132  } :: e1, e1 ();
     133  t1 e2 = t1 (e2);
    126134  /*empty*/ =
    127135    {
    128136      <GetR &Last_Breaks> : (e.breaks),
    129137        <Put &Last_Breaks (e.breaks "Normal-Exit")>;;
    130     };
     138    } :: e1, e1 ();
    131139};
    132140
  • to-imperative/trunk/compiler/rfp_parse.rf

    r2726 r2739  
    223223  <Parse_Body>;
    224224
     225
     226$func Parse_Body2 = e.items s.tag;
    225227// The main parsing routine
    226228Parse_Body =
     229  /*empty*/ T $iter {
     230    e.items <Parse_Body2>;
     231  } :: e.items s.tag, s.tag : F,
     232  e.items;
     233       
     234Parse_Body2 =
    227235{
    228236  <Expect_Token
     
    267275        };
    268276      //# \{ s.type : EOFS; } ;
    269     } :: e.items = e.items <Parse_Body>;
     277    } :: e.items = e.items T;
    270278  // If there are no tokens and we aren't processing an interface file then
    271279  // check for undefined functions.
    272   <Get &Current_Module> : RFI e = ;
     280  <Get &Current_Module> : RFI e = F;
    273281  <Domain &Names> (/*e.undefs*/) $iter {
    274282    e.domain : e (e.name) e.rest,
     
    281289  } :: e.domain (e.undefs),
    282290    e.domain : /*empty*/ =
    283     e.undefs;
     291    e.undefs F;
    284292};
    285293
Note: See TracChangeset for help on using the changeset viewer.