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

SCM Repository

[diderot] Diff of /branches/staging/src/compiler/ast/var.sml
ViewVC logotype

Diff of /branches/staging/src/compiler/ast/var.sml

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

revision 1930, Tue Jun 26 13:13:39 2012 UTC revision 2152, Sun Feb 17 19:39:37 2013 UTC
# Line 30  Line 30 
30              V{name=Atom.toString name, id=id, kind=kind, ty=scheme}              V{name=Atom.toString name, id=id, kind=kind, ty=scheme}
31            end            end
32    
33        fun copy (V{name, kind, ty, ...}) = V{name=name, id=Stamp.new(), kind=kind, ty=ty}
34    
35      (* return true if variable has global scope *)
36        fun isGlobal (V{kind, ...}) = (case kind
37               of BasisVar => true
38                | InputVar => true
39                | GlobalVar => true
40                | FunVar => true
41                | _ => false
42              (* end case *))
43    
44      fun compare (V{id=a, ...}, V{id=b, ...}) = Stamp.compare(a, b)      fun compare (V{id=a, ...}, V{id=b, ...}) = Stamp.compare(a, b)
45      fun same (V{id=a, ...}, V{id=b, ...}) = Stamp.same(a, b)      fun same (V{id=a, ...}, V{id=b, ...}) = Stamp.same(a, b)
46      fun hash (V{id, ...}) = Stamp.hash id      fun hash (V{id, ...}) = Stamp.hash id

Legend:
Removed from v.1930  
changed lines
  Added in v.2152

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