From e73f438abb16a80868fe6d194d522dd01cd8ee59 Mon Sep 17 00:00:00 2001 From: Matthew Fluet Date: Wed, 22 May 2024 17:02:17 -0400 Subject: [PATCH 1/3] Update LICENSE date --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 753faf18e..2a29f6c7e 100644 --- a/LICENSE +++ b/LICENSE @@ -7,7 +7,7 @@ license. Send comments and questions to MLton@mlton.org. MLton COPYRIGHT NOTICE, LICENSE AND DISCLAIMER. -Copyright (C) 1999-2023 Henry Cejtin, Matthew Fluet, Suresh +Copyright (C) 1999-2024 Henry Cejtin, Matthew Fluet, Suresh Jagannathan, and Stephen Weeks. Copyright (C) 1997-2000 by the NEC Research Institute From c66ecc11d95b441f612c6d8cb21211818fa776ce Mon Sep 17 00:00:00 2001 From: Matthew Fluet Date: Wed, 22 May 2024 18:25:18 -0400 Subject: [PATCH 2/3] Update CHANGELOG --- CHANGELOG.adoc | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 6ec66901b..5b6b2f48d 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -8,11 +8,57 @@ Here are the changes from version 20210117 to YYYYMMDD. === Details +* 2024-05-22 + ** Optimize representation of sequences in `Useless` SSA + optimization. + +* 2024-05-21 + ** Add support for WebAssembly architecture (`wasm32`) and WASI + "operating system", available together as the `wasm32-wasi` + platform. Thanks to Adam Goode for the pull request. + +* 2024-05-16 + ** Fix bug in heap resizing that could lead to segmentation fault. + Thanks to Humza Shahid (hummy123) for the bug report. + +* 2024-05-15 + ** Fix bug in handling of `WordXVector` constants in `Useless` SSA + optimization that could lead to internal compiler errors. Thanks to + Humza Shahid (hummy123) for the bug report. + * 2024-05-13 ** Fix bug in `#line` directives that fails to acceptable `(*#line line *"file" )`, which should be accepted with a default column of 1. Thanks to Norman Ramsey for the bug report. +* 2024-03-17 + ** Update elaboration error messages involving constants and infix + patterns and expressions. + +* 2024-01-19 + ** Add support for LoongArch64 architecture. Thanks to JiaLing + Zhang for the pull request. + +* 2023-11-22 + ** Fix bug in `ImperativeIO.getInstream`. Thanks to Murray Calavera + (ii8) for the bug report. + +* 2023-11-17 + ** Fix bug with `-align 4` and mark-compact GC. + +* 2023-11-11 + ** Fix bug/inefficiency in register allocation for x86 + floating-point stack. + +* 2023-11-09 + ** Fix bug in frame allocation of handler offset and args that + could, in rare circumstances, lead to a `Machine.typeCheck` internal + compiler error. + +* 2023-11-08 + ** Eliminate ``bash``isms from `bin/mlton` script. Thanks to Murray + Calavera (ii8) for the pull request. + * 2023-08-31 ** Fix bug in x86 and amd64 native codegens leading to an internal compiler error @@ -24,6 +70,10 @@ Here are the changes from version 20210117 to YYYYMMDD. meridian. Thanks to Arata Mizuki (minoki) for the bug report and suggested fix. +* 2023-07-21 + ** Update default `-cc-opt` and `-link-opt` options for + `powerpc-darwin` and `powerpc64-darwin` platforms. + * 2023-05-29 ** Fix bugs in `WORD.scan` when `0` is followed by `w` or `x` or `wx` but not by more digits. Thanks to Arata Mizuki (minoki) for @@ -32,6 +82,10 @@ Here are the changes from version 20210117 to YYYYMMDD. * 2023-05-26 ** Update SML/NJ libraries to SML/NJ 110.99.3. +* 2023-05-22 + ** Adapt default `-llvm-opt-opt` options to LLVM's "New Pass + Manager"; using the LLVM codegen requires LLVM 14 (or higher). + * 2022-11-16 ** Fix bug in `GC_sequenceCopy` failing to update card map when copying object pointers. Thanks to Chris Cannam for the bug report From 7f31145f215cea489828e4906c31a9424c4a5518 Mon Sep 17 00:00:00 2001 From: Matthew Fluet Date: Wed, 22 May 2024 18:27:50 -0400 Subject: [PATCH 3/3] Change `WASMTIME` variable to `EMULATE` in `runtime/Makefile` --- runtime/Makefile | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/runtime/Makefile b/runtime/Makefile index 89767521c..5f52ec54f 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -1,4 +1,4 @@ -## Copyright (C) 2010-2013,2018,2019-2022 Matthew Fluet. +## Copyright (C) 2010-2013,2018,2019-2022,2024 Matthew Fluet. # Copyright (C) 1999-2009 Henry Cejtin, Matthew Fluet, Suresh # Jagannathan, and Stephen Weeks. # Copyright (C) 1997-2000 NEC Research Institute. @@ -20,7 +20,12 @@ endif EXE := -WASMTIME := +# Building the runtime for a target platform requires executing target-platform +# executables (eg., `gen/gen-types` to determine the sizes of C types). +# When cross compiling, it may be possible/necessary to emulate/execute the +# target-platform executable on the host platform (e.g., Wasmtime to execute +# WebAssembly programs). +EMULATE := MDVARIANTS := OPT DBG PIVARIANTS := DPI NPI PIC PIE @@ -113,7 +118,7 @@ EXE := .exe endif ifeq ($(TARGET_OS), wasi) -WASMTIME := wasmtime +EMULATE := wasmtime XCPPFLAGS += -D_WASI_EMULATED_SIGNAL \ -D_WASI_EMULATED_PROCESS_CLOCKS \ -D_WASI_EMULATED_GETPID @@ -251,11 +256,11 @@ ml-types.h: gen/ml-types.h $(CP) $< $@ gen/ml-types.h: gen/gen-types$(EXE) - $(WASMTIME) ./gen/gen-types$(EXE) ml-types.h > gen/ml-types.h + $(EMULATE) ./gen/gen-types$(EXE) ml-types.h > gen/ml-types.h gen/c-types.h: gen/gen-types$(EXE) - $(WASMTIME) ./gen/gen-types$(EXE) c-types.h > gen/c-types.h + $(EMULATE) ./gen/gen-types$(EXE) c-types.h > gen/c-types.h gen/c-types.sml: gen/gen-types$(EXE) - $(WASMTIME) ./gen/gen-types$(EXE) c-types.sml > gen/c-types.sml + $(EMULATE) ./gen/gen-types$(EXE) c-types.sml > gen/c-types.sml ifneq ($(MAKECMDGOALS),clean) -include gen/gen-types.d @@ -274,7 +279,7 @@ gen/$(1): gen/gen-basis-ffi.sml gen/basis-ffi.def touch gen/$(1) else gen/$(1): gen/gen-basis-ffi$(EXE) gen/basis-ffi.def - $(WASMTIME) ./gen/gen-basis-ffi$(EXE) $(1) < gen/basis-ffi.def > gen/$(1) + $(EMULATE) ./gen/gen-basis-ffi$(EXE) $(1) < gen/basis-ffi.def > gen/$(1) $(CAT) gen/gen-basis-ffi.sml gen/basis-ffi.def gen/$(1) | $(SHA1DGST) > gen/$(1).chk endif endef @@ -319,7 +324,7 @@ gdtoa/README: gdtoa.tgz gdtoa.may_alias-unions.patch gdtoa.rename-public-fns.pat @touch $@ gdtoa/arith.h: gdtoa/arithchk$(EXE) - $(WASMTIME) ./gdtoa/arithchk$(EXE) > gdtoa/arith.h + $(EMULATE) ./gdtoa/arithchk$(EXE) > gdtoa/arith.h gdtoa/arithchk.c: gdtoa/README @touch $@ @@ -331,7 +336,7 @@ ifneq ($(MAKECMDGOALS),clean) endif gdtoa/gd_qnan.h: gdtoa/qnan$(EXE) - $(WASMTIME) ./gdtoa/qnan$(EXE) > gdtoa/gd_qnan.h + $(EMULATE) ./gdtoa/qnan$(EXE) > gdtoa/gd_qnan.h gdtoa/qnan.c: gdtoa/README @touch $@ @@ -360,7 +365,7 @@ $(eval $(call A_TEMPLATE,mlton,MLTON)) ### gen/constants ### gen/constants: gen/gen-constants$(EXE) - $(WASMTIME) ./gen/gen-constants > gen/constants + $(EMULATE) ./gen/gen-constants > gen/constants ifneq ($(MAKECMDGOALS),clean) -include gen/gen-constants.d