Revision 3c3414c5
Added by Pierre-Loïc Garoche over 5 years ago
src/features/machine_types/machine_types.ml | ||
---|---|---|
278 | 278 |
let typ = get_specified_type v in |
279 | 279 |
match (MTypes.dynamic_type typ).MTypes.tdesc with |
280 | 280 |
| MTypes.Tbasic b -> MT.is_exportable b |
281 |
| MTypes.Tconst _ -> false (* Enumerated types are not "machine type" customizeable *) |
|
281 | 282 |
| _ -> assert false (* TODO deal with other constructs *) |
282 | 283 |
) |
283 | 284 |
(* could depend on the actual computed type *) |
... | ... | |
307 | 308 |
Format.eprintf "Subtype mismatch %a vs %a@." MTypes.print_ty subtyp Types.print_ty typ; false |
308 | 309 |
in |
309 | 310 |
match (MTypes.dynamic_type subtype).MTypes.tdesc with |
310 |
|
|
311 |
| MTypes.Tconst c -> Types.is_const_type typ c |
|
311 | 312 |
| MTypes.Tbasic MT.MTint _ -> Types.is_int_type typ |
312 | 313 |
| MTypes.Tbasic MT.MTreal _ -> Types.is_real_type typ |
313 | 314 |
| MTypes.Tbasic MT.MTbool -> Types.is_bool_type typ |
... | ... | |
470 | 471 |
|
471 | 472 |
let has_machine_type () = |
472 | 473 |
let annl = Annotations.get_expr_annotations keyword in |
473 |
Format.eprintf "has _mchine _type annotations: %i@." (List.length annl);
|
|
474 |
(* Format.eprintf "has _mchine _type annotations: %i@." (List.length annl); *)
|
|
474 | 475 |
List.length annl > 0 |
475 | 476 |
|
476 | 477 |
(* Local Variables: *) |
Also available in: Unified diff
Solved issue with typing of enumerated types