Ignore:
Timestamp:
Oct 6, 2011, 11:07:04 AM (9 years ago)
Author:
tranquil
Message:

added indexes to loop constructors. Branch does not compile atm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D2.2/8051-indexed-labels-branch/src/clight/clightFold.ml

    r818 r1305  
    116116  | Clight.Ssequence (stmt1, stmt2) -> ([], [stmt1 ; stmt2])
    117117  | Clight.Sifthenelse (e, stmt1, stmt2) -> ([e], [stmt1 ; stmt2])
    118   | Clight.Swhile (e, stmt) | Clight.Sdowhile (e, stmt) -> ([e], [stmt])
    119   | Clight.Sfor (stmt1, e, stmt2, stmt3) -> ([e], [stmt1 ; stmt2 ; stmt3])
     118  | Clight.Swhile (_, e, stmt) | Clight.Sdowhile (_, e, stmt) -> ([e], [stmt])
     119  | Clight.Sfor (_, stmt1, e, stmt2, stmt3) -> ([e], [stmt1 ; stmt2 ; stmt3])
    120120  | Clight.Sreturn (Some e) -> ([e], [])
    121121  | Clight.Sswitch (e, lbl_stmts) -> ([e], labeled_statements_subs lbl_stmts)
     
    145145    | Clight.Sifthenelse _, e :: _, stmt1 :: stmt2 :: _ ->
    146146      Clight.Sifthenelse (e, stmt1, stmt2)
    147     | Clight.Swhile _, e :: _, stmt :: _ ->
    148       Clight.Swhile (e, stmt)
    149     | Clight.Sdowhile _, e :: _, stmt :: _ ->
    150       Clight.Sdowhile (e, stmt)
    151     | Clight.Sfor _, e :: _, stmt1 :: stmt2 :: stmt3 :: _ ->
    152       Clight.Sfor (stmt1, e, stmt2, stmt3)
     147    | Clight.Swhile (i, _, _), e :: _, stmt :: _ ->
     148      Clight.Swhile (i, e, stmt)
     149    | Clight.Sdowhile (i, _, _), e :: _, stmt :: _ ->
     150      Clight.Sdowhile (i, e, stmt)
     151    | Clight.Sfor (i, _, _, _, _), e :: _, stmt1 :: stmt2 :: stmt3 :: _ ->
     152      Clight.Sfor (i, stmt1, e, stmt2, stmt3)
    153153    | Clight.Sreturn (Some _), e :: _, _ -> Clight.Sreturn (Some e)
    154154    | Clight.Sswitch (_, lbl_stmts), e :: _, _ ->
Note: See TracChangeset for help on using the changeset viewer.