Skip to content

Commit

Permalink
Merge pull request #570 from MatthewFluet/misc-updates
Browse files Browse the repository at this point in the history
Misc updates: LICENSE date; CHANGELOG; WASMTIME to EMULATE in runtime/Makefile
  • Loading branch information
MatthewFluet committed May 23, 2024
2 parents 08b85af + 7f31145 commit 258cb5b
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 11 deletions.
54 changes: 54 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
25 changes: 15 additions & 10 deletions runtime/Makefile
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 $@
Expand All @@ -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 $@
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 258cb5b

Please sign in to comment.