Ignore:
Timestamp:
Oct 26, 2011, 7:45:42 PM (9 years ago)
Author:
tranquil
Message:
  • implemented constant propagation
  • implementing partial redundancy elimination
File:
1 edited

Legend:

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

    r486 r1468  
    11
    22include StringTools
     3
     4module ImpMap = struct
     5
     6  type key =
     7      Map.key
     8 
     9  type 'data t =
     10      'data Map.t ref
     11     
     12  let create () =
     13    ref Map.empty
     14
     15  let clear t =
     16    t := Map.empty
     17   
     18  let add k d t =
     19    t := Map.add k d !t
     20
     21  let find k t =
     22    Map.find k !t
     23
     24  let iter f t =
     25    Map.iter f !t
     26
     27end
     28
Note: See TracChangeset for help on using the changeset viewer.