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/trunk/src/MLRISC/emit/asmStream.sml
ViewVC logotype

View of /sml/trunk/src/MLRISC/emit/asmStream.sml

Parent Directory Parent Directory | Revision Log Revision Log

Revision 412 - (download) (annotate)
Fri Sep 3 00:25:03 1999 UTC (19 years, 11 months ago) by monnier
File size: 611 byte(s)
This commit was generated by cvs2svn to compensate for changes in r411,
which included commits to RCS files with non-trunk default branches.
(* asmStream.sml
 * COPYRIGHT (c) 1996 Bell Laboratories.

(* AsmStream - this structure is available to all codegenerators.
 *             Typically asmOutStream is rebound to a file.
signature ASM_STREAM = sig
  val asmOutStream : TextIO.outstream ref
  val withStream : TextIO.outstream -> ('a -> 'b) -> 'a -> 'b

structure AsmStream = struct
  val asmOutStream = ref TextIO.stdOut
  fun withStream stream body x = let
     val s = !asmOutStream 
     val _ = asmOutStream := stream
    (body x before asmOutStream := s)
       handle e => (asmOutStream := s; raise e)

ViewVC Help
Powered by ViewVC 1.0.0