Changeset 1231


Ignore:
Timestamp:
Aug 15, 2003, 5:30:23 PM (17 years ago)
Author:
orlov
Message:
  • Fixed $iter compilation.
Location:
to-imperative/trunk/compiler
Files:
3 edited

Legend:

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

    r1208 r1231  
    434434
    435435  /*
     436   * Before compiling $iter condition or body we should forget available info
     437   * about all format variables, because that info can be changed during
     438   * cycle iterations.
    436439   * Then compile $iter condition and body both with the current state of the
    437440   * sentence.
     
    443446   */
    444447  (Comp Iter (BRANCH e.body) t.format (BRANCH e.condition)) e.Snt =
     448    t.format : (FORMAT e.Fe),
     449    <Vars-Reset <Prepare-Vars <Vars e.Fe>>>,
     450    <Save-Snt-State>,
    445451    <Gener-Label "iter"> :: t.label,
    446452    <Gener-Label "exit_iter"> :: t.exit,
    447     <Save-Snt-State>,
    448453    <Comp-Sentence s.tail? (v.fails ((BREAK t.label))) () e.condition e.Snt>
    449454      :: e.comp-condition,
  • to-imperative/trunk/compiler/rfp_vars.rf

    r1201 r1231  
    144144
    145145
     146
     147$func Reset-Var e = e;
     148
     149Vars-Reset e.vars = <Map &Reset-Var (e.vars)> : e;
     150
     151
     152Reset-Var t.var =
     153  <? &State> : $r e1 (t.var e (Decl s.decl) e) e2,
     154  <Store &State e1 e2>,
     155  <Normalize-Info (Instantiated? True) (Decl s.decl) t.var>;
     156
     157
     158
    146159$func Print-Var e = e;
    147160
     
    187200
    188201
    189 
    190 //!Declared? t.var =
    191 //!     <? &State> : $r e (t.var tag t.min t.max s.decl e.rest) e = <Box? s.decl>;
    192 
    193 
    194 //!$func? Decl-Box t.var = s.box;
    195 
    196 //!Decl-Box t.var =
    197 //!     <? &State> : $r e (t.var tag t.min t.max s.decl e.rest) e = <Box? s.decl>, s.decl;
    198 
    199 
    200 //!Instantiated? t.var =
    201 //! <Var? t.var>,
    202 //! <? &State> : $r e (t.var tag t.min t.max s.decl s.inst) e = s.inst : Instantiated;
    203202
    204203
  • to-imperative/trunk/compiler/rfp_vars.rfi

    r1201 r1231  
    1616$func Vars-Print e = e;
    1717$func Vars-Decl e = e;
     18
     19$func Vars-Reset e.vars = ;
    1820
    1921$func Create-Int-Var (e.prefix) t.var e.expr = t.int-var e.int-assign;
Note: See TracChangeset for help on using the changeset viewer.