Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/compiler/CPS/cps/ppcps.sml
ViewVC logotype

Diff of /sml/trunk/compiler/CPS/cps/ppcps.sml

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

revision 651, Thu Jun 1 18:34:03 2000 UTC revision 773, Mon Jan 8 16:18:37 2001 UTC
# Line 3  Line 3 
3    
4  signature PPCPS =  signature PPCPS =
5  sig  sig
6    val printcps : (CPS.function * LtyDef.lty Intmap.intmap) -> unit    val printcps : (CPS.function * LtyDef.lty IntHashTable.hash_table) -> unit
7    val printcps0: CPS.function -> unit    val printcps0: CPS.function -> unit
8    val prcps : CPS.cexp -> unit    val prcps : CPS.cexp -> unit
9    
# Line 33  Line 33 
33    | lookerName P.deflvar = "deflvar"    | lookerName P.deflvar = "deflvar"
34    | lookerName P.getspecial = "getspecial"    | lookerName P.getspecial = "getspecial"
35    | lookerName P.getpseudo = "getpseudo"    | lookerName P.getpseudo = "getpseudo"
36      | lookerName (P.rawload {kind}) = ("rawload" ^ numkindName kind)
37    
38  fun branchName P.boxed = "boxed"  fun branchName P.boxed = "boxed"
39    | branchName P.unboxed = "unboxed"    | branchName P.unboxed = "unboxed"
# Line 83  Line 84 
84    | setterName P.setpseudo = "setpseudo"    | setterName P.setpseudo = "setpseudo"
85    | setterName P.setmark = "setmark"    | setterName P.setmark = "setmark"
86    | setterName P.acclink = "acclink"    | setterName P.acclink = "acclink"
87      | setterName (P.rawstore {kind}) = ("rawstore" ^ numkindName kind)
88    
89  fun cvtParams(from, to) = Int.toString from ^ "_" ^ Int.toString to  fun cvtParams(from, to) = Int.toString from ^ "_" ^ Int.toString to
90    
91  fun arithName (P.arith{oper,kind}) =  fun arithName (P.arith{oper,kind}) =
92      ((case oper of  P.+ => "+" |  P.- => "-" |  P.* => "*"      ((case oper of  P.+ => "+" |  P.- => "-" |  P.* => "*"
93                    | P./ => "/" |  P.~ => "~" | P.abs => "abs"                    | P./ => "/" |  P.~ => "~" | P.abs => "abs"
94                      | P.fsqrt => "fsqrt"
95                      | P.fsin => "sin" | P.fcos => "cos" | P.ftan => "tan"
96                    | P.rshift => "rshift" | P.rshiftl => "rshiftl"                    | P.rshift => "rshift" | P.rshiftl => "rshiftl"
97                    | P.lshift => "lshift" | P.andb => "andb"                    | P.lshift => "lshift" | P.andb => "andb"
98                    | P.orb => "orb" | P.xorb => "xorb" | P.notb => "notb")                    | P.orb => "orb" | P.xorb => "xorb" | P.notb => "notb")
# Line 236  Line 240 
240                      indent (n+3) e1;                      indent (n+3) e1;
241                      space n; say "else\n";                      space n; say "else\n";
242                      indent (n+3) e2)                      indent (n+3) e2)
243                  | RCC(p,vl,w,t,e) =>
244                       (space n; say "rcc("; sayvlist vl; say ") -> "; sayv(VAR w);
245                        sayt(t);nl(); f e)
246           in f           in f
247          end          end
248   in  indent   in  indent
# Line 247  Line 254 
254    
255      val _ = if (!Control.CG.debugRep)      val _ = if (!Control.CG.debugRep)
256              then (say "************************************************\n";              then (say "************************************************\n";
257                    Intmap.app ptv m;                    IntHashTable.appi ptv m;
258                    say "************************************************\n")                    say "************************************************\n")
259              else ()              else ()
260    
# Line 263  Line 270 
270  end  end
271    
272  exception NULLTABLE  exception NULLTABLE
273  val nulltable : LtyDef.lty Intmap.intmap= Intmap.new(8,NULLTABLE)  val nulltable : LtyDef.lty IntHashTable.hash_table =
274        IntHashTable.mkTable(8,NULLTABLE)
275    
276  fun printcps0 f = printcps(f,nulltable)  fun printcps0 f = printcps(f,nulltable)
277    

Legend:
Removed from v.651  
changed lines
  Added in v.773

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