[m-rev.] diff: update configure script for the C# grade
Julien Fischer
jfischer at opturion.com
Thu Jan 4 17:47:19 AEDT 2018
Update configure script for C# grade.
Implement thread.yield/2 for the C# grade.
m4/mercury.m4:
Update the C# compiler check to not try the old aliases for the
Mono C# compiler; do not try the DotGNU (which is no longer a going
concern) C# compiler either.
Update the copyright notice for this file.
library/thread.m:
Uncomment and correct the C# implementation of thread.yield/2.
Julien.
diff --git a/library/thread.m b/library/thread.m
index 7a329fc..77505b5 100644
--- a/library/thread.m
+++ b/library/thread.m
@@ -3,7 +3,7 @@
%---------------------------------------------------------------------------%
% Copyright (C) 2000-2001, 2003-2004, 2006-2008, 2010-2011 The University
% of Melbourne.
-% Copyright (C) 2014-2017 The Mercury Team.
+% Copyright (C) 2014-2018 The Mercury Team.
% This file may only be copied under the terms of the GNU Library General
% Public License - see the file COPYING.LIB in the Mercury distribution.
%---------------------------------------------------------------------------%
@@ -405,17 +405,15 @@ spawn_native(Goal, Res, !IO) :-
[promise_pure, will_not_call_mercury, thread_safe, tabled_for_io,
may_not_duplicate],
"
- // Only available in .NET 4.0.
- // System.Threading.Yield();
+ System.Threading.Thread.Yield();
").
:- pragma foreign_proc("Java",
- yield(IO0::di, IO::uo),
+ yield(_IO0::di, _IO::uo),
[promise_pure, will_not_call_mercury, thread_safe, tabled_for_io,
may_not_duplicate],
"
java.lang.Thread.yield();
- IO = IO0;
").
yield(!IO).
diff --git a/m4/mercury.m4 b/m4/mercury.m4
index 7e6cbc2..315f9ae 100644
--- a/m4/mercury.m4
+++ b/m4/mercury.m4
@@ -1,5 +1,6 @@
#-----------------------------------------------------------------------------#
# Copyright (C) 1999,2001-2004, 2006-2012 The University of Melbourne.
+# Copyright (C) 2013-2018 The Mercury team.
# This file may only be copied under the terms of the GNU General
# Public Licence - see the file COPYING in the Mercury distribution.
#-----------------------------------------------------------------------------#
@@ -256,10 +257,10 @@ MS_AL=`basename "$MS_AL"`
AC_PATH_PROGS([CLI_INTERPRETER], [mono])
# Check for the C# (C sharp) compiler.
-# mcs is the Mono C# compiler targetting all runtimes
-# dmcs is the Mono C# compiler targeting the 4.0 runtime
-# gmcs is the Mono C# compiler targeting the 2.0 runtime (with generics).
-# cscc is the DotGNU C# compiler.
+# csc is the Microsoft C# compiler.
+# mcs is the Mono C# compiler targetting all runtime versions.
+# (dmcs and gmcs are older aliases for the Mono C# compiler which we do
+# not use.)
AC_CACHE_SAVE
case "$mercury_cv_with_csharp_compiler" in
@@ -272,7 +273,7 @@ case "$mercury_cv_with_csharp_compiler" in
exit 1
;;
"")
- CSC_COMPILERS="csc mcs dmcs gmcs cscc"
+ CSC_COMPILERS="csc mcs"
;;
*)
CSC_COMPILERS="$mercury_cv_with_csharp_compiler"
@@ -385,14 +386,6 @@ case "$CSC" in
CSHARP_COMPILER_TYPE=mono
;;
- dmcs*)
- CSHARP_COMPILER_TYPE=mono
- ;;
-
- gmcs*)
- CSHARP_COMPILER_TYPE=mono
- ;;
-
*)
CSHARP_COMPILER_TYPE=unknown
;;
More information about the reviews
mailing list