[MLton-commit] r7105
Matthew Fluet
fluet at mlton.org
Wed Jun 10 20:22:43 PDT 2009
Removed command line options -keep sml and -stop sml.
----------------------------------------------------------------------
U mlton/trunk/doc/changelog
U mlton/trunk/mlton/main/main.fun
----------------------------------------------------------------------
Modified: mlton/trunk/doc/changelog
===================================================================
--- mlton/trunk/doc/changelog 2009-05-31 12:59:20 UTC (rev 7104)
+++ mlton/trunk/doc/changelog 2009-06-11 03:22:42 UTC (rev 7105)
@@ -1,5 +1,10 @@
Here are the changes from version 20070826 to version YYYYMMDD.
+* 2009-04-18
+ - Removed command line switches -keep sml and -stop sml. Their
+ meaning was unclear with .mlb files; their effect with .cm files
+ can be achieved with -stop f.
+
* 2009-04-16
- Fixed bug in IntInf.~>> that could cause a glibc assertion
failure.
Modified: mlton/trunk/mlton/main/main.fun
===================================================================
--- mlton/trunk/mlton/main/main.fun 2009-05-31 12:59:20 UTC (rev 7104)
+++ mlton/trunk/mlton/main/main.fun 2009-06-11 03:22:42 UTC (rev 7105)
@@ -18,10 +18,10 @@
datatype t = CM | Files | Generated | MLB | O | OUT | SML | TypeCheck
val toInt: t -> int =
- fn MLB => 1
- | CM => 1
+ fn CM => 1
+ | MLB => 1
+ | SML => 1
| Files => 2
- | SML => 3
| TypeCheck => 4
| Generated => 5
| O => 6
@@ -69,7 +69,6 @@
val explicitCodegen: explicitCodegen option ref = ref NONE
val keepGenerated = ref false
val keepO = ref false
-val keepSML = ref false
val output: string option ref = ref NONE
val profileSet: bool ref = ref false
val profileTimeSet: bool ref = ref false
@@ -480,7 +479,6 @@
| "machine" => keepMachine := true
| "o" => keepO := true
| "rssa" => keepRSSA := true
- | "sml" => keepSML := true
| "ssa" => keepSSA := true
| "ssa2" => keepSSA2 := true
| "sxml" => keepSXML := true
@@ -731,7 +729,6 @@
"f" => Place.Files
| "g" => Place.Generated
| "o" => Place.O
- | "sml" => Place.SML
| "tc" => Place.TypeCheck
| _ => usage (concat ["invalid -stop arg: ", s])))),
(Expert, "sxml-passes", " <passes>", "sxml optimization passes",
@@ -1421,25 +1418,11 @@
fun compileCM input =
let
val files = CM.cm {cmfile = input}
- fun saveSML smlFile =
- File.withOut
- (smlFile, fn out =>
- (outputHeader' (ML, out)
- ; (List.foreach
- (files, fn f =>
- (Out.output
- (out, concat ["(*#line 0.0 \"", f, "\"*)\n"])
- ; File.outputContents (f, out))))))
in
case stop of
Place.Files =>
showFiles (Vector.fromList files)
- | Place.SML => saveSML (maybeOut ".sml")
- | _ =>
- (if !keepSML
- then saveSML (suffix ".sml")
- else ()
- ; compileSml files)
+ | _ => compileSml files
end
fun compileMLB file =
let
@@ -1474,21 +1457,11 @@
in Layout.output (l, out)
; Out.newline out
end)
- fun saveSML smlFile =
- File.withOut
- (smlFile, fn out =>
- (outputHeader' (ML, out)
- ; (Vector.foreach
- (Compile.sourceFilesMLB {input = file}, fn f =>
- (Out.output
- (out, concat ["(*#line 0.0 \"", f, "\"*)\n"])
- ; File.outputContents (f, out))))))
val _ =
case stop of
Place.Files =>
showFiles
(Compile.sourceFilesMLB {input = file})
- | Place.SML => saveSML (maybeOut ".sml")
| Place.TypeCheck =>
trace (Top, "Type Check SML")
Compile.elaborateMLB {input = file}
@@ -1501,7 +1474,6 @@
in
case stop of
Place.Files => ()
- | Place.SML => ()
| Place.TypeCheck => ()
| Place.Generated => ()
| _ =>
More information about the MLton-commit
mailing list