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

SCM Repository

[diderot] View of /trunk/src/compiler/IL/gen/high-il.in
ViewVC logotype

View of /trunk/src/compiler/IL/gen/high-il.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 401 - (download) (annotate)
Thu Oct 14 21:08:45 2010 UTC (8 years, 7 months ago) by jhr
File size: 1046 byte(s)
  fixed typo
(* high-il.sml
 *
 * COPYRIGHT (c) 2010 The Diderot Project (http://diderot.cs.uchicago.edu)
 * All rights reserved.
 *
 * High-level version of the Diderot IL.
 *
 * Note: this file is generated from gen/high-il.spec and gen/high-il.in.
 *)

structure HighOps =
  struct

    type ty = HighILTypes.ty

    val samety = HighILTypes.same
    val hashty = HighILTypes.hash
    val tyToString = HighILTypes.toString

  (* required helper functions for the string type *)
    fun samestring (s1 : string, s2) = (s1 = s2)
    val hashstring = HashString.hashString
    fun stringToString s = String.concat["\"", s, "\""]

  (* required helper functions for the mask type *)
    type mask = bool list
    val samemask : (mask * mask -> bool) = (op =)
    fun hashmask m =
	  List.foldl (fn (false, w) => w+w | (true, w) => w+w+0w1)
	    (Word.fromInt(List.length m)) m
    fun maskToString m =
	  String.concat(List.map (fn true => "_" | false => ":") m)

@BODY@

  end

structure HighIL = SSAFn(
  structure Ty = HighILTypes
  structure Op = HighOps)

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