[MLton-commit] r5461

Matthew Fluet fluet at mlton.org
Wed Mar 21 08:29:30 PST 2007


Merge trunk revisions 5441:5460 into x86_64 branch
----------------------------------------------------------------------

U   mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/ffi.sig
U   mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/ffi.sml
U   mlton/branches/on-20050822-x86_64-branch/benchmark/Makefile
U   mlton/branches/on-20050822-x86_64-branch/bin/mlton-script

----------------------------------------------------------------------

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/ffi.sig
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/ffi.sig	2007-03-21 16:23:04 UTC (rev 5460)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/ffi.sig	2007-03-21 16:29:29 UTC (rev 5461)
@@ -9,6 +9,7 @@
    sig
       val atomicBegin: unit -> unit
       val atomicEnd: unit -> unit
+      val getBool: int -> bool
       val getChar8: int -> Char.char
 (*
       val getChar16: int -> Char16.char
@@ -26,6 +27,7 @@
       val getWord32: int -> Word32.word
       val getWord64: int -> Word64.word
       val register: int * (unit -> unit) -> unit
+      val setBool: bool -> unit
       val setChar8: Char.char -> unit
 (*
       val setChar16: Char16.char -> unit

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/ffi.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/ffi.sml	2007-03-21 16:23:04 UTC (rev 5460)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/ffi.sml	2007-03-21 16:29:29 UTC (rev 5461)
@@ -54,4 +54,10 @@
 val setChar16 = setInt16 o Primitive.Char16.idToInt16
 val setChar32 = setInt32 o Primitive.Char32.idToInt32
 
+(* To the C-world, booleans are 32-bit integers. *)
+fun intToBool (i: Int32.int): bool = i <> 0
+val getBool = intToBool o getInt32
+fun boolToInt (b: bool): Int32.int = if b then 1 else 0
+val setBool = setInt32 o boolToInt
+
 end

Modified: mlton/branches/on-20050822-x86_64-branch/benchmark/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/benchmark/Makefile	2007-03-21 16:23:04 UTC (rev 5460)
+++ mlton/branches/on-20050822-x86_64-branch/benchmark/Makefile	2007-03-21 16:29:29 UTC (rev 5461)
@@ -52,8 +52,8 @@
 	cd tests && ../benchmark $(BFLAGS) $(BENCH)
 
 QBENCH := $(BENCH)
-QBFLAGS := -mlton "mlton{-stable,.cvs.HEAD -detect-overflow {false,true}}"
+QBFLAGS := -mlton "~/devel/mlton/mlton-20051202-1.i386-linux/build/bin/mlton -codegen {native,c} -align {4,8}" -mlton "~/devel/mlton/mlton.svn.trunk/build/bin/mlton -codegen {native,c} -align {4,8}" -mlton "~/devel/mlton/mlton.svn.x86_64/build/bin/mlton -codegen {native,c} -align {4,8}"
 
 .PHONY: qtest
 qtest: $(NAME)
-	export PATH="$(PATH):$$PATH" && cd tests && ../benchmark $(QBFLAGS) $(QBENCH) && $(MAKE) clean
+	cd tests && ../benchmark $(QBFLAGS) $(QBENCH) && $(MAKE) clean

Modified: mlton/branches/on-20050822-x86_64-branch/bin/mlton-script
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/mlton-script	2007-03-21 16:23:04 UTC (rev 5460)
+++ mlton/branches/on-20050822-x86_64-branch/bin/mlton-script	2007-03-21 16:29:29 UTC (rev 5461)
@@ -83,6 +83,7 @@
         -cc-opt '-O1'                                            \
         -cc-opt '-fno-strict-aliasing -fomit-frame-pointer -w'   \
         -link-opt '-lgdtoa -lm -lgmp'                            \
+        -link-opt '-Wl,--hash-style=both'                        \
         -mlb-path-map "$lib/mlb-path-map"                        \
         -target-as-opt amd64 '-m64 -mtune=opteron'               \
         -target-cc-opt amd64 '-m64 -mtune=opteron'               \




More information about the MLton-commit mailing list