Changeset 880 for src/common/AST.ma


Ignore:
Timestamp:
Jun 3, 2011, 5:35:31 PM (8 years ago)
Author:
campbell
Message:

Add type information into Cminor.
As a result, the Clight to Cminor stage now does extra type checking.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/common/AST.ma

    r879 r880  
    171171  | Mfloat64 : memory_chunk        (*r 64-bit double-precision float *)
    172172  | Mpointer : region → memory_chunk. (* pointer addressing given region *)
     173
     174definition typ_of_memory_chunk : memory_chunk → typ ≝
     175λc. match c with
     176[ Mint8signed ⇒ ASTint I8 Signed
     177| Mint8unsigned ⇒ ASTint I8 Unsigned
     178| Mint16signed ⇒ ASTint I16 Signed
     179| Mint16unsigned ⇒ ASTint I16 Unsigned
     180| Mint32 ⇒ ASTint I32 Unsigned (* XXX signed? *)
     181| Mfloat32 ⇒ ASTfloat F32
     182| Mfloat64 ⇒ ASTfloat F64
     183| Mpointer r ⇒ ASTptr r
     184].
    173185
    174186(* * Initialization data for global variables. *)
Note: See TracChangeset for help on using the changeset viewer.