Ignore:
Timestamp:
Jan 19, 2011, 6:23:27 PM (9 years ago)
Author:
campbell
Message:

Port memory spaces changes to latest prototype compiler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D2.3/8051-memoryspaces-branch/cparser/Unblock.ml

    r453 r460  
    3333  | Init_single e ->
    3434      sdoseq loc
    35         { edesc = EBinop(Oassign, path, e, path.etyp); etyp = path.etyp }
     35        { edesc = EBinop(Oassign, path, e, path.etyp); etyp = path.etyp; espace = path.espace }
    3636        k
    3737  | Init_array il ->
    38       let ty_elt =
     38      let space, ty_elt =
    3939        match unroll env path.etyp with
    40         | TArray(ty_elt, _, _) -> ty_elt
     40        | TArray(space, ty_elt, _, _) -> space, ty_elt
    4141        | _ -> fatal_error "%aWrong type for array initializer"
    4242                           formatloc loc in
     
    4545        | i :: il ->
    4646            local_initializer loc env
    47               { edesc = EBinop(Oindex, path, intconst pos IInt, TPtr(ty_elt, []));
    48                 etyp = ty_elt }
     47              { edesc = EBinop(Oindex, path, intconst pos IInt, TPtr(space, ty_elt, []));
     48                etyp = ty_elt;
     49                espace = Any }
    4950              i
    5051              (array_init (Int64.succ pos) il) in
     
    5354      let field_init (fld, i) k =
    5455        local_initializer loc env
    55           { edesc = EUnop(Odot fld.fld_name, path); etyp = fld.fld_typ }
     56          { edesc = EUnop(Odot fld.fld_name, path); etyp = fld.fld_typ; espace = Any }
    5657          i k in
    5758      List.fold_right field_init fil k
    5859  | Init_union(id, fld, i) ->
    5960      local_initializer loc env
    60         { edesc = EUnop(Odot fld.fld_name, path); etyp = fld.fld_typ }
     61        { edesc = EUnop(Odot fld.fld_name, path); etyp = fld.fld_typ; espace = Any }
    6162        i k
    6263
     
    8384  | None -> k
    8485  | Some init ->
    85       local_initializer loc env { edesc = EVar id; etyp = ty' } init k
     86      local_initializer loc env { edesc = EVar id; etyp = ty'; espace = Any } init k
    8687
    8788(* Simplification of blocks within a statement *)
Note: See TracChangeset for help on using the changeset viewer.