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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/translate/translate-basis.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/translate/translate-basis.sml

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

revision 2382, Mon Jun 10 02:12:47 2013 UTC revision 2383, Thu Jun 13 01:57:34 2013 UTC
# Line 25  Line 25 
25      structure TU = TypeUtil      structure TU = TypeUtil
26      structure MV = MetaVar      structure MV = MetaVar
27      structure VTbl = Var.Tbl      structure VTbl = Var.Tbl
28      structure EinOp= Examples  
29        structure EinOp= Operators
30        structure R=Rewrite
31        structure N=Normalize
32    
33      fun pruneTy tv = (case TU.prune(MV.toType tv)      fun pruneTy tv = (case TU.prune(MV.toType tv)
34             of (ty as Ty.T_Var _) => raise Fail("unresolved type " ^ TU.toString ty)             of (ty as Ty.T_Var _) => raise Fail("unresolved type " ^ TU.toString ty)
# Line 84  Line 87 
87            end            end
88    
89    
90       fun assignEin (y, rator, xs) = [IL.ASSGN(y, IL.OP(rator, xs))]       fun assignEin (y, rator, xs) = [IL.ASSGN(y, R.App(rator, xs))]
91    
92    
93      fun createTenEin(operator, sv)=S.transform(operator,[len(sv), sv])      fun createTenEin(operator, sv)=S.transform(operator,[len(sv), sv])
# Line 121  Line 124 
124                  (BV.add_ii,             ScaGenToEin(EinOp.addScalars)),                  (BV.add_ii,             ScaGenToEin(EinOp.addScalars)),
125                  (BV.add_tt,             GenToEin(EinOp.addTensors)),                  (BV.add_tt,             GenToEin(EinOp.addTensors)),
126    
127                      (*Ein*)  
128                  (BV.add_ff,             fn (y, _, [f, g])                  (BV.add_ff,             fn (y, _, [f, g])
129                                              =>assignEin(y, createFldEin(EinOp.addField,f ), [f, g])),                                              =>assignEin(y, createFldEin(EinOp.addField,f ), [f, g])),
130                  (BV.add_fr,             fn (y, _, [f, s])                  (BV.add_fr,             fn (y, _, [f, s])

Legend:
Removed from v.2382  
changed lines
  Added in v.2383

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