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

SCM Repository

[diderot] Diff of /trunk/src/compiler/ast/ast.sml
ViewVC logotype

Diff of /trunk/src/compiler/ast/ast.sml

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

revision 2355, Sun Apr 7 11:35:08 2013 UTC revision 2356, Sun Apr 7 14:45:25 2013 UTC
# Line 16  Line 16 
16        = BasisVar        = BasisVar
17        | InputVar        | InputVar
18        | GlobalVar        | GlobalVar
19          | FunVar                  (* user-defined function *)
20        | StrandParam             (* parameter to strand definition *)        | StrandParam             (* parameter to strand definition *)
21        | StrandStateVar          (* strand state variable *)        | StrandStateVar          (* strand state variable *)
22        | StrandOutputVar         (* strand output variable *)        | StrandOutputVar         (* strand output variable *)
# Line 34  Line 35 
35      and decl      and decl
36        = D_Input of var * string * expr option        = D_Input of var * string * expr option
37        | D_Var of var_decl                       (* global variable decl *)        | D_Var of var_decl                       (* global variable decl *)
38        | D_Strand of {                           (* strand decl *)        | D_Func of var * var list * stmt         (* user-defined function *)
39              name : Atom.atom,        | D_Strand of strand                      (* strand decl *)
             params : var list,  
             state : var_decl list,              (* true marks output variables *)  
             methods : method list  
           }  
40        | D_InitialArray of create * iter list        | D_InitialArray of create * iter list
41        | D_InitialCollection of create * iter list        | D_InitialCollection of create * iter list
42    
43      and var_decl      and var_decl
44        = VD_Decl of var * expr        = VD_Decl of var * expr
45    
46        and strand = Strand of {
47            name : Atom.atom,
48            params : var list,
49            state : var_decl list,          (* true marks output variables *)
50            methods : method list
51          }
52    
53      and method      and method
54        = M_Method of StrandUtil.method_name * stmt        = M_Method of StrandUtil.method_name * stmt
55    
# Line 64  Line 68 
68        | S_New of Atom.atom * expr list        | S_New of Atom.atom * expr list
69        | S_Die        | S_Die
70        | S_Stabilize        | S_Stabilize
71          | S_Return of expr
72        | S_Print of expr list        | S_Print of expr list
73    
74      and expr      and expr
# Line 71  Line 76 
76        | E_Lit of Literal.literal        | E_Lit of Literal.literal
77        | E_Tuple of expr list        | E_Tuple of expr list
78        | E_Apply of var * Ty.meta_var list * expr list * Ty.ty        | E_Apply of var * Ty.meta_var list * expr list * Ty.ty
79                  (* note: operators can be polymorphic, so we record the type arguments. *)                  (* note: operators can be polymorphic, so we record the meta-variable parameters. *)
80        | E_Cons of expr list                             (* tensor-value construction *)        | E_Cons of expr list                             (* tensor-value construction *)
81        | E_Slice of expr * expr option list * Ty.ty      (* tensor slicing *)        | E_Slice of expr * expr option list * Ty.ty      (* tensor slicing *)
82        | E_Cond of expr * expr * expr * Ty.ty            (* ty is result type *)        | E_Cond of expr * expr * expr * Ty.ty            (* ty is result type *)
83          | E_Coerce of {                                   (* coercion between types *)
84                srcTy : Ty.ty,
85                dstTy : Ty.ty,
86                e : expr
87              }
88    
89    end    end

Legend:
Removed from v.2355  
changed lines
  Added in v.2356

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