Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/compiler/Semant/pickle/pickmod-new.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/Semant/pickle/pickmod-new.sml

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

revision 1173, Sat Mar 23 04:18:51 2002 UTC revision 1174, Sat Mar 23 21:14:40 2002 UTC
# Line 140  Line 140 
140           DTF, TYCON, T, II, VAR, SD, SG, FSG,  SP, EN,           DTF, TYCON, T, II, VAR, SD, SG, FSG,  SP, EN,
141           STR, F, STE, TCE, STRE, FE, EE, ED, EEV, FX,           STR, F, STE, TCE, STRE, FE, EE, ED, EEV, FX,
142           B, DCON, DICT, FPRIM, FUNDEC, TFUNDEC, DATACON, DTMEM, NRD,           B, DCON, DICT, FPRIM, FUNDEC, TFUNDEC, DATACON, DTMEM, NRD,
143           OVERLD, FCTC, SEN, FEN, SPATH, IPATH, STRID, FCTID, CCI, CTYPE) =           OVERLD, FCTC, SEN, FEN, SPATH, IPATH, STRID, FCTID, CCI, CTYPE,
144             CCALL_TYPE) =
145          (1, 2, 3, 4, 5, 6, 7, 8, 9, 10,          (1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
146           11, 12, 13, 14, 15, 16, 17, 18, 19, 20,           11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
147           21, 22, 23, 24, 25, 26, 27, 28, 29, 30,           21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
148           31, 32, 33, 34, 35, 36, 37, 38, 39, 40,           31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
149           41, 42, 43, 44, 45, 46, 47, 48, 49,           41, 42, 43, 44, 45, 46, 47, 48, 49,
150           50, 51, 52, 53, 54, 55, 56, 57, 58, 59)           50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60)
151    
152      (* this is a bit awful...      (* this is a bit awful...
153       * (we really ought to have syntax for "functional update") *)       * (we really ought to have syntax for "functional update") *)
# Line 332  Line 333 
333            | CTypes.C_signed CTypes.I_long => %?12            | CTypes.C_signed CTypes.I_long => %?12
334            | CTypes.C_signed CTypes.I_long_long => %?13            | CTypes.C_signed CTypes.I_long_long => %?13
335            | CTypes.C_PTR => %?14            | CTypes.C_PTR => %?14
   
336            | CTypes.C_ARRAY (t, i) => ?20 $ [ctype t, int i]            | CTypes.C_ARRAY (t, i) => ?20 $ [ctype t, int i]
337            | CTypes.C_STRUCT l => ?21 $ [list ctype l]            | CTypes.C_STRUCT l => ?21 $ [list ctype l]
338      end      end
339    
340        fun ccall_type t =
341        let val op $ = PU.$ CCALL_TYPE
342        in  case t of
343              P.CCALL_INT32  => "\000" $ []
344            | P.CCALL_REAL64 => "\001" $ []
345            | P.CCALL_ML_PTR => "\002" $ []
346        end
347    
348      fun ccall_info { c_proto = { conv, retTy, paramTys },      fun ccall_info { c_proto = { conv, retTy, paramTys },
349                       ml_flt_args, ml_flt_res_opt } = let                       ml_args, ml_res_opt, reentrant } = let
350          val op $ = PU.$ CCI          val op $ = PU.$ CCI
351      in      in
352          "C" $ [string conv, ctype retTy, list ctype paramTys,          "C" $ [string conv, ctype retTy, list ctype paramTys,
353                 list bool ml_flt_args, option bool ml_flt_res_opt]                 list ccall_type ml_args, option ccall_type ml_res_opt,
354                   bool reentrant
355                  ]
356      end      end
357    
358      fun primop p = let      fun primop p = let
# Line 376  Line 386 
386                | P.RAW_LOAD kind => ?116 $ [numkind kind]                | P.RAW_LOAD kind => ?116 $ [numkind kind]
387                | P.RAW_STORE kind => ?117 $ [numkind kind]                | P.RAW_STORE kind => ?117 $ [numkind kind]
388                | P.RAW_CCALL (SOME i) => ?118 $ [ccall_info i]                | P.RAW_CCALL (SOME i) => ?118 $ [ccall_info i]
389                  | P.RAW_RECORD{tag,sz} => ?119 $ [bool tag,int sz]
390    
391                | P.MKETAG => %?0                | P.MKETAG => %?0
392                | P.WRAP => %?1                | P.WRAP => %?1

Legend:
Removed from v.1173  
changed lines
  Added in v.1174

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