Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/codegen/clang.sml
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/codegen/clang.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 527, Sun Feb 13 02:08:31 2011 UTC revision 528, Sun Feb 13 03:05:35 2011 UTC
# Line 20  Line 20 
20        | T_Array of ty * int        | T_Array of ty * int
21        | T_Named of string        | T_Named of string
22    
23        val charPtr = T_Ptr(T_Num(RawTypes.RT_UInt8))
24      val int32 = T_Num(RawTypes.RT_Int32)      val int32 = T_Num(RawTypes.RT_Int32)
25      val int64 = T_Num(RawTypes.RT_Int64)      val int64 = T_Num(RawTypes.RT_Int64)
26      val float = T_Num(RawTypes.RT_Float)      val float = T_Num(RawTypes.RT_Float)
# Line 55  Line 56 
56        | E_Int of IntegerLit.integer * ty        | E_Int of IntegerLit.integer * ty
57        | E_Flt of FloatLit.float * ty        | E_Flt of FloatLit.float * ty
58        | E_Bool of bool        | E_Bool of bool
59          | E_Str of string
60    
61    (* binary operators in increasing order of precedence *)    (* binary operators in increasing order of precedence *)
62      and binop      and binop
# Line 108  Line 110 
110          | prec (E_Int _) = atomP          | prec (E_Int _) = atomP
111          | prec (E_Flt _) = atomP          | prec (E_Flt _) = atomP
112          | prec (E_Bool _) = atomP          | prec (E_Bool _) = atomP
113            | prec (E_Str _) = atomP
114      in      in
115      fun mkGrp e = if (prec e < atomP) then E_Grp e else e      fun mkGrp e = if (prec e < atomP) then E_Grp e else e
116    (* Note that all C binary operators are left associative. *)    (* Note that all C binary operators are left associative. *)
# Line 136  Line 139 
139      val mkInt = E_Int      val mkInt = E_Int
140      val mkFlt = E_Flt      val mkFlt = E_Flt
141      val mkBool = E_Bool      val mkBool = E_Bool
142        val mkStr = E_Str
143      end (* local *)      end (* local *)
144    
145      val skip = S_Block[]      val skip = S_Block[]
# Line 146  Line 150 
150      in      in
151      fun mkBlock [stm] = stm      fun mkBlock [stm] = stm
152        | mkBlock stms = S_Block stms        | mkBlock stms = S_Block stms
153        val mkDecl = S_Decl
154      val mkAssign = S_Assign      val mkAssign = S_Assign
155      fun mkIfThenElse (e, b1, b2) = S_If(paren e, b1, b2)      fun mkIfThenElse (e, b1, b2) = S_If(paren e, b1, b2)
156      fun mkIfThen (e, b) = mkIfThenElse (e, b, skip)      fun mkIfThen (e, b) = mkIfThenElse (e, b, skip)

Legend:
Removed from v.527  
changed lines
  Added in v.528

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0