Ignore:
Timestamp:
Oct 11, 2011, 5:42:20 PM (9 years ago)
Author:
tranquil
Message:
  • changed implementation of constant indexings with extensible arrays
  • work on ASM completed
  • next: optimizations!
File:
1 edited

Legend:

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

    r1319 r1357  
    296296        (id, uint) :: loop_indexes_defs prefix max_depth
    297297
     298let max_depth =
     299        let f_expr _ _ = () in
     300        let f_stmt stmt _ res_stmts =
     301                let curr_max = List.fold_left max 0 res_stmts in
     302                if curr_max > 0 then curr_max else     
     303                match stmt with
     304                | Clight.Swhile(Some x,_,_) | Clight.Sdowhile(Some x,_,_)
     305                | Clight.Sfor(Some x,_,_,_,_) -> x + 1
     306                | _ -> 0 in
     307        ClightFold.statement2 f_expr f_stmt
     308
    298309(* Instrument a function. *)
    299310
     
    301312  let def = match def with
    302313    | Clight.Internal def ->
    303         let max_depth = ClightUtils.max_loop_index_lbld def.Clight.fn_body in
     314        let max_depth = max_depth def.Clight.fn_body in
    304315        let vars = loop_indexes_defs l_ind max_depth in
    305316        let vars = List.rev_append vars def.Clight.fn_vars in
Note: See TracChangeset for help on using the changeset viewer.