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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/low-opt/low-contract.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/low-opt/low-contract.sml

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

revision 3855, Fri May 13 20:47:16 2016 UTC revision 3856, Sat May 14 12:49:20 2016 UTC
# Line 28  Line 28 
28      val cntIntToReal            = ST.newCounter "low-contract:int-to-real"      val cntIntToReal            = ST.newCounter "low-contract:int-to-real"
29      val cntTensorIndex          = ST.newCounter "low-contract:tensor-index"      val cntTensorIndex          = ST.newCounter "low-contract:tensor-index"
30      val cntProjectLast          = ST.newCounter "low-contract:project-last"      val cntProjectLast          = ST.newCounter "low-contract:project-last"
31        val cntSubscript            = ST.newCounter "low-contract:subscript"
32      val cntUnused               = ST.newCounter "low-contract:unused"      val cntUnused               = ST.newCounter "low-contract:unused"
33      val firstCounter            = cntAddNeg      val firstCounter            = cntAddNeg
34      val lastCounter             = cntUnused      val lastCounter             = cntUnused
# Line 131  Line 132 
132                      | _ => NONE                      | _ => NONE
133                    (* end case *)                    (* end case *)
134                  end                  end
135                | (Op.Subscript ty, [seq, idx]) => (case (getLocalDef seq, V.getDef idx)
136                     of (IR.SEQ(vs, _), IR.LIT(Literal.Int i)) => (
137                          ST.tick cntSubscript; decUse seq; decUse idx;
138                          SOME[(lhs, IR.VAR(use (List.nth(vs, Int.fromLarge i))))])
139                      | _ => NONE
140                    (* end case *))
141              | _ => NONE              | _ => NONE
142            (* end case *))            (* end case *))
143        | doAssign _ = NONE        | doAssign _ = NONE

Legend:
Removed from v.3855  
changed lines
  Added in v.3856

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