Ignore:
Timestamp:
Mar 2, 2011, 3:27:41 PM (10 years ago)
Author:
ayache
Message:

Update of D2.2 from Paris.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D2.2/8051/src/common/memory.ml

    r486 r619  
    192192    | Some alignment when (size <= alignment) && (is_multiple size alignment) ->
    193193      let size = Offset.of_int size in
    194       let rem = Offset.modulo off size in
     194      let rem = Offset.modulou off size in
    195195      if Offset.eq rem Offset.zero then off
    196196      else Offset.add off (Offset.sub size rem)
    197197    | Some alignment ->
    198198      let size = Offset.of_int alignment in
    199       let rem = Offset.modulo off size in
     199      let rem = Offset.modulou off size in
    200200      if Offset.eq rem Offset.zero then off
    201201      else Offset.add off (Offset.sub size rem)
     
    263263  (* Pretty printing *)
    264264
    265 let print mem =
     265  let print mem =
    266266    let print_cells off = function
    267267      | Datum (size, v) when Value.eq v Value.undef ->
     
    275275      match content with
    276276        | Contents contents ->
    277             Printf.printf "(%s -> %s)%!"
    278               (Offset.to_string contents.low) (Offset.to_string contents.high) ;
    279             OffsetMap.iter print_cells contents.cells
     277          Printf.printf "(%s -> %s)%!"
     278            (Offset.to_string contents.low) (Offset.to_string contents.high) ;
     279          OffsetMap.iter print_cells contents.cells
    280280        | Fun_def _ -> Printf.printf "function definition%!" ;
    281281    in
    282282    BlockMap.iter print_block mem.blocks ;
    283283    Printf.printf "\n%!"
    284 
    285 
    286284
    287285
     
    405403    all_are_in_list msg mem b first_off last_off [Datum (1, Value.undef) ; Cont]
    406404
     405  let string_of_alignment = function
     406    | None -> "none"
     407    | Some alignment -> string_of_int alignment
     408
    407409  (** [write_value msg mem b off size v size'] store the value [v] at the offset
    408410      [off] of the block [b] in the memory [mem]. [size] is the size of the
Note: See TracChangeset for help on using the changeset viewer.