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

SCM Repository

[smlnj] View of /sml/branches/primop-branch/src/compiler/ElabData/basics/ii.sml
ViewVC logotype

View of /sml/branches/primop-branch/src/compiler/ElabData/basics/ii.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1475 - (download) (annotate)
Fri Apr 9 19:05:33 2004 UTC (15 years, 10 months ago) by macqueen
File size: 720 byte(s)
notes and added comments
(* ii.sml
 *
 * (C) 2001 Lucent Technologies, Bell Labs
 *
 * Framework for passing inlining information around during elaboration.
 * (Uses the "exn-hack" to avoid being even more middle-end specific.)
 *)

(* Are nested lists of Info possible? 
 * What configurations actually occur?
 * [dbm]
 *)

structure II = struct
    datatype ii =
	Info of exn
      | List of ii list
      | Null

    local
	fun bug s = ErrorMsg.impossible ("II: " ^ s)
    in
    fun isSimple (Info _) = true
      | isSimple _ = false

    fun sel (List l, i) =
	(List.nth (l, i) handle Subscript => bug "Wrong field in II.List !")
      | sel (Null, _) = Null
      | sel (Info _, i) = bug "Unexpected selection from II.Info !"
    end
end

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