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

SCM Repository

[diderot] View of /trunk/src/compiler/codegen/codegen-fn.sml
ViewVC logotype

View of /trunk/src/compiler/codegen/codegen-fn.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 454 - (download) (annotate)
Mon Oct 25 19:59:47 2010 UTC (9 years, 2 months ago) by jhr
File size: 891 byte(s)
  Working on coed generation
(* codegen-fn.sml
 *
 * COPYRIGHT (c) 2010 The Diderot Project (http://diderot-language.cs.uchicago.edu)
 * All rights reserved.
 *)

functor CodeGenFn (T : TARGET) : sig

    val generate : LowIL.program -> T.program

  end = struct

    structure Src = LowIL
    structure SrcV = LowIL.Var

  (* a mapping from LowIL variables to target expressions.  Variables get
   * removed when the expressions are used as arguments.
   *)
    structure VDefTbl : sig
	type tbl

	val newTbl : unit -> tbl
	val getDefOf : tbl -> SrcV.var -> T.exp
	val useDefOf : tbl -> SrcV.var -> T.exp
	val setDefOf : tbl -> (SrcV.var * T.exp) -> unit

	val clear : tbl -> unit

	val bind : var_def_tbl -> (CFG.var * MTy.mlrisc_tree) -> MTy.T.stm list

      (* force all pending expressions into registers *)
	val flushLoads : var_def_tbl -> MTy.T.stm list
      end = struct

      end (*  VDefTbl *)

end

  end


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