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/mlrisc/codeString.sml
ViewVC logotype

View of /sml/trunk/src/MLRISC/mlrisc/codeString.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 224 - (download) (annotate)
Sat Apr 17 16:27:01 1999 UTC (20 years, 11 months ago) by monnier
File size: 654 byte(s)
This commit was generated by cvs2svn to compensate for changes in r223,
which included commits to RCS files with non-trunk default branches.
(* codeString.sml
 *
 * COPYRIGHT (c) 1996 Bell Laboratories.
 *
 *)

signature CODESTRING = sig
  val init          : int -> unit
  val update        : int * Word8.word -> unit
  val getCodeString : unit -> Word8Vector.vector
end

structure CodeString : CODESTRING = struct
  structure WA=Word8Array

  val code = ref (WA.array(0,0w0))
  fun init n = code := WA.array(n,0w0) 
  fun update(n,v) = WA.update(!code,n,v) 
  fun getCodeString() = let
    val s = WA.extract(!code,0,SOME(WA.length(!code)))
  in
      code:=WA.array(0,0w0); s
  end
end


(*
 * $Log: codeString.sml,v $
 * Revision 1.1.1.1  1998/04/08 18:39:02  george
 * Version 110.5
 *
 *)

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