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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/high-to-mid/high-to-mid.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/high-to-mid/high-to-mid.sml

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

revision 3548, Tue Jan 5 20:38:39 2016 UTC revision 3550, Wed Jan 6 15:51:57 2016 UTC
# Line 29  Line 29 
29    
30      fun getRHS x = (case SrcIR.Var.binding x      fun getRHS x = (case SrcIR.Var.binding x
31             of SrcIR.VB_RHS(SrcIR.VAR x') => getRHS x'             of SrcIR.VB_RHS(SrcIR.VAR x') => getRHS x'
32              | SrcIR.VB_RHS(SrcIR.GLOBAL x') => getRHS(SrcIR.GlobalVar.binding x')              | SrcIR.VB_RHS(SrcIR.GLOBAL x') => (case SrcIR.GlobalVar.bindingOf x'
33                     of SOME x'' => getRHS x''
34                      | NONE => raise Fail(concat[
35                            "mutable global ", SrcIR.GlobalVar.toString x',
36                            " encountered"
37                          ])
38                    (* end case *))
39              | SrcIR.VB_RHS rhs => rhs              | SrcIR.VB_RHS rhs => rhs
40              | vb => raise Fail(concat[              | vb => raise Fail(concat[
41                    "expected rhs binding for ", SrcIR.Var.toString x,                    "expected rhs binding for ", SrcIR.Var.toString x,
# Line 217  Line 223 
223      fun expandEINAPP (env, srcy, y, rator, args) = (case SrcIR.Var.ty srcy      fun expandEINAPP (env, srcy, y, rator, args) = (case SrcIR.Var.ty srcy
224             of SrcTy.FieldTy => [DstIR.ASSGN(y, DstIR.LIT(Literal.Int 0))]             of SrcTy.FieldTy => [DstIR.ASSGN(y, DstIR.LIT(Literal.Int 0))]
225              | _ => if (useCount srcy > 0)              | _ => if (useCount srcy > 0)
226                  then HandleEin.expandEinOp (srcy, (y, DstIR.EINAPP(rator, Env.renameList(env, args))))                  then HandleEin.expand (y, rator, Env.renameList(env, args))
227                  else []                  else []
228            (* end case *))            (* end case *))
229  handle ex => (print(concat["error converting: ", MidIR.Var.toString y, " = ",  handle ex => (print(concat["error converting: ", MidIR.Var.toString y, " = ",

Legend:
Removed from v.3548  
changed lines
  Added in v.3550

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