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/compiler/FLINT/plambda/chkplexp.sml
ViewVC logotype

Diff of /sml/trunk/compiler/FLINT/plambda/chkplexp.sml

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

revision 4539, Sat Apr 21 17:13:52 2018 UTC revision 4540, Wed Apr 25 17:06:35 2018 UTC
# Line 1  Line 1 
1  (* Copyright 1996 by AT&T Bell Laboratories *)  (* chkplexp.sml
2  (* chkplexp.sml *)   *
3     * COPYRIGHT (c) 2018 The Fellowship of SML/NJ (http://www.smlnj.org)
4     * All rights reserved.
5     *)
6    
7  signature CHKPLEXP =  signature CHKPLEXP =
8  sig  sig
# Line 235  Line 238 
238            val t = ltFnAppR le "DECON" (t1, root)            val t = ltFnAppR le "DECON" (t1, root)
239         in LT.ltInsert(venv, v, t, d)         in LT.ltInsert(venv, v, t, d)
240        end        end
241    | ltConChk le s (c, root, kenv, venv, d) =    | ltConChk le s (c, root, kenv, venv, d) = let
242        let val nt = (case c of INT32con _ => LT.ltc_int32        val nt = (case c
243    (* 64BIT: will need other cases *)
244                 of INT32con _ => LT.ltc_int32
245                              | WORD32con _ => LT.ltc_int32                              | WORD32con _ => LT.ltc_int32
246                              | STRINGcon _ => ltString                              | STRINGcon _ => ltString
247                              | INTINFcon _ => bug "INTINFcon"                              | INTINFcon _ => bug "INTINFcon"
248                              |  _ => LT.ltc_int)                | _ => LT.ltc_int
249         in ((ltMatch le s (nt, root)) handle Fail _ => say "ConChk ltEquiv\n"); venv              (* end case *))
250          in
251            ((ltMatch le s (nt, root)) handle Fail _ => say "ConChk ltEquiv\n"); venv
252        end        end
253    
254  (** check : tkindEnv * ltyEnv * DI.depth -> lexp -> lty *)  (** check : tkindEnv * ltyEnv * DI.depth -> lexp -> lty *)
# Line 270  Line 277 
277                             (say ("** Lvar ** " ^ (LV.lvarName(v))                             (say ("** Lvar ** " ^ (LV.lvarName(v))
278                                   ^ " is unbound *** \n");                                   ^ " is unbound *** \n");
279                              bug "unexpected lambda code in checkLty"))                              bug "unexpected lambda code in checkLty"))
280    (* 64BIT: will need extra cases *)
281                   | (INT _ | WORD _) => LT.ltc_int                   | (INT _ | WORD _) => LT.ltc_int
282                   | (INT32 _ | WORD32 _) => LT.ltc_int32                   | (INT32 _ | WORD32 _) => LT.ltc_int32
283    (* REAL32: will need extra cases *)
284                   | REAL _ => LT.ltc_real                   | REAL _ => LT.ltc_real
285                   | STRING _ => ltString                   | STRING _ => ltString
286                   | PRIM(p, t, ts) =>                   | PRIM(p, t, ts) =>

Legend:
Removed from v.4539  
changed lines
  Added in v.4540

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