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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/tree-ir/tree-state-var.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/tree-ir/tree-state-var.sml

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

revision 4468, Tue Aug 30 13:54:15 2016 UTC revision 4469, Tue Aug 30 13:56:03 2016 UTC
# Line 14  Line 14 
14              name : string,              (* variable name *)              name : string,              (* variable name *)
15              ty : TreeTypes.t,           (* variable's TreeIR type *)              ty : TreeTypes.t,           (* variable's TreeIR type *)
16              varying : bool,             (* does the variable get updated? *)              varying : bool,             (* does the variable get updated? *)
17                shared : bool,              (* is the variable accessed by other strands? *)
18              apiTy : APITypes.t option   (* specifies the external type of the variable (for outputs) *)              apiTy : APITypes.t option   (* specifies the external type of the variable (for outputs) *)
19            } -> t            } -> t
20    
# Line 30  Line 31 
31    
32      val isVarying : t -> bool      val isVarying : t -> bool
33    
34        val isShared : t -> bool
35    
36      val toString : t -> string      val toString : t -> string
37    
38    end = struct    end = struct
39    
40      datatype t = datatype TreeIR.state_var      datatype t = datatype TreeIR.state_var
41    
42      fun new {name, ty, varying, apiTy} = SV{      fun new {name, ty, varying, shared, apiTy} = SV{
43              name = name, ty = ty, xty = apiTy, varying = varying              name = name, ty = ty, xty = apiTy, varying = varying, shared = shared
44            }            }
45    
46      fun same (SV{name=a, ...}, SV{name=b, ...}) = (a = b)      fun same (SV{name=a, ...}, SV{name=b, ...}) = (a = b)
# Line 55  Line 58 
58    
59      fun isVarying (SV{varying, ...}) = varying      fun isVarying (SV{varying, ...}) = varying
60    
61        fun isShared (SV{shared, ...}) = shared
62    
63      fun toString (SV{name, ...}) = name      fun toString (SV{name, ...}) = name
64    
65    end    end

Legend:
Removed from v.4468  
changed lines
  Added in v.4469

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