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 /tests/trunk/bugs/tests.obsolete/bug208.sml
ViewVC logotype

View of /tests/trunk/bugs/tests.obsolete/bug208.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2071 - (download) (annotate)
Tue Oct 31 02:58:12 2006 UTC (12 years, 9 months ago) by blume
Original Path: tests/trunk/bugs/tests/bug208.sml
File size: 628 byte(s)
moved tests trunk
(* bug 208.sml *)
(* Problem: impossible error in cpsopt phase, on MIPS machine,
	 with default optimization settings
*)

functor MipsCoder(val emit : 'a -> unit)  = struct
  fun needs _ = true
  fun pass now =
  let fun gen inst =
	 if now andalso needs() then ()
	 else if now
	    then let fun gen1() = gen(raise Match)
		  in  case inst of
			NONE  => gen1()
		      | SOME b =>
			  let fun bc1f offset = ()
			      fun bc1t offset = ()
			  in  if inst=NONE then 
				   (emit((if b then bc1t else bc1f)
						inst); gen1()) 
			      else ()
			  end
		  end
	    else ()
  in  gen
  end
  val assemble  = pass true
end

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