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/basics/conrep.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/Semant/basics/conrep.sml

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

revision 101, Thu May 14 04:56:46 1998 UTC revision 102, Thu May 14 05:53:10 1998 UTC
# Line 30  Line 30 
30      | ty => ty      | ty => ty
31    
32  fun notconst(_,true,_) = false  fun notconst(_,true,_) = false
33    (*
34    | notconst(_,_,CONty(_,[t,_])) =    | notconst(_,_,CONty(_,[t,_])) =
35        (case (reduce t)        (case (reduce t)
36          of CONty(RECORDtyc nil,_) => false          of CONty(RECORDtyc nil,_) => false
37           | _ => true)           | _ => true)
38    *)
39    | notconst _ = true    | notconst _ = true
40    
41  (*  (*
# Line 46  Line 48 
48  (* the first argument indicates whether this is a recursive datatypes *)  (* the first argument indicates whether this is a recursive datatypes *)
49  fun infer false ([(_, false, CONty(_,[ty,_]))]) =  fun infer false ([(_, false, CONty(_,[ty,_]))]) =
50        (case (reduce ty)        (case (reduce ty)
51          of (CONty(RECORDtyc nil, _)) => ([CONSTANT 0], CSIG (0,1))          of (* (CONty(RECORDtyc nil, _)) => ([CONSTANT 0], CSIG (0,1))
52           | _ => ([UNTAGGED], CSIG(1,0)) (* [TRANSPARENT] *))           | *) _ => ([UNTAGGED], CSIG(1,0)) (* [TRANSPARENT] *))
53        (* The TRANSPARENT conrep is temporarily turned off;        (* The TRANSPARENT conrep is temporarily turned off;
54           it should be working very soon. Ask zsh. *)           it should be working very soon. Ask zsh. *)
55    
# Line 61  Line 63 
63    
64              | decide (ctag,vtag, (_,false,CONty(_,[ty,_]))::rest, reps) =              | decide (ctag,vtag, (_,false,CONty(_,[ty,_]))::rest, reps) =
65                  (case (reduce ty, multiple)                  (case (reduce ty, multiple)
66                    of (CONty(RECORDtyc nil,_),_) =>                    of (*
67                         (CONty(RECORDtyc nil,_),_) =>
68                         decide(ctag+1, vtag, rest, (CONSTANT ctag) :: reps)                         decide(ctag+1, vtag, rest, (CONSTANT ctag) :: reps)
69                     | (_, true) =>                     | *)
70                         (_, true) =>
71                         decide(ctag, vtag+1, rest, (TAGGED vtag) :: reps)                         decide(ctag, vtag+1, rest, (TAGGED vtag) :: reps)
72                     | (_, false) =>                     | (_, false) =>
73                         decide(ctag, vtag+1, rest, (UNTAGGED :: reps)))                         decide(ctag, vtag+1, rest, (UNTAGGED :: reps)))

Legend:
Removed from v.101  
changed lines
  Added in v.102

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