Commit 0494fb15 authored by Daniel Kochmański's avatar Daniel Kochmański
Browse files

Moderate interface cleanup

- unicode name tables are always compiled in when we have unicode support
- thread local variables support is removed
- profile and rt contribs are deprecated
parent c3244b01
......@@ -29,6 +29,7 @@
* Pending changes since 16.1.3
** Enhancements
- unicode names are always linked for unicode builds (~--with-unicode-names~ removed)
- numerous bytecodes compiler enhancements
- ~ext:run-program~: process streams may be virtual streams (for instance
~*standard-output*~ in slime, or a string-output-stream)
......@@ -67,6 +68,9 @@
- buildsystem parallel builds work (i.e make -j999)
- ECL builds on consoles with unusual encodings on Windows (i.e cp936)
** API changes
- no-op ~--enable-asmapply~ configure option has been removed
- ~profile~ and ~rt~ contribs are now deprecated and disabled by default
- thread-local variable support has been removed (~--with___thread~)
- deprecated configure option ~--enable-opcode8~ has been removed
- mk-defsystem is not build by default (enable by ~--with-defsystem=yes~)
- asdf:make-build accepts ~:init-name~ argument for libraries
......
......@@ -62,9 +62,6 @@
# undef ECL_THREADS
#endif
/* __thread thread-local variables? */
/* #undef WITH___THREAD */
/* Use Windows's interlocked operations to define compare-and-swap */
#define AO_ASSUME_WINDOWS98
......
......@@ -831,17 +831,6 @@ AC_MSG_CHECKING([Linker flags])
AC_MSG_RESULT([${LDFLAGS}])
])
dnl --------------------------------------------------------------
dnl Provides a test for the existance of the __thread declaration and
dnl defines WITH___THREAD if it is found
AC_DEFUN([ECL___THREAD],[
AC_CACHE_CHECK(for __thread local data, ac_cv_ecl___thread,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[static __thread void *data;]])],
ac_cv_ecl___thread=yes,
ac_cv_ecl___thread=no))
dnl We deactivate this test because it seems to slow down ECL A LOT!!!
])
dnl --------------------------------------------------------------
dnl Determine whether GCC supports backtraces
dnl
......
......@@ -487,13 +487,9 @@ cl_char_name(cl_object c)
cl_object output;
if (code <= 127) {
output = ecl_gethash_safe(ecl_make_fixnum(code), cl_core.char_names, ECL_NIL);
}
#ifdef ECL_UNICODE_NAMES
else if (!Null(output = _ecl_ucd_code_to_name(code))) {
} else if (!Null(output = _ecl_ucd_code_to_name(code))) {
(void)0;
}
#endif
else {
} else {
ecl_base_char name[8];
ecl_base_char *start;
name[7] = 0;
......@@ -525,12 +521,10 @@ cl_name_char(cl_object name)
if (c != ECL_NIL) {
ecl_return1(the_env, ECL_CODE_CHAR(ecl_fixnum(c)));
}
#ifdef ECL_UNICODE_NAMES
c = _ecl_ucd_name_to_code(name);
if (c != ECL_NIL) {
ecl_return1(the_env, cl_code_char(c));
}
#endif
if (ecl_stringp(name) && (l = ecl_length(name))) {
c = cl_char(name, ecl_make_fixnum(0));
if (l == 1) {
......
......@@ -50,8 +50,6 @@
#if !defined(ECL_THREADS)
cl_env_ptr cl_env_p = NULL;
#elif defined(WITH___THREAD)
__thread cl_env_ptr cl_env_p = NULL;
#endif
const char *ecl_self;
......
......@@ -31,18 +31,13 @@
#include "threads/ecl_atomics.h"
#ifdef ECL_WINDOWS_THREADS
# ifndef WITH___THREAD
DWORD cl_env_key;
# endif
#else
# ifndef WITH___THREAD
static pthread_key_t cl_env_key;
# endif
#endif /* ECL_WINDOWS_THREADS */
extern void ecl_init_env(struct cl_env_struct *env);
#if !defined(WITH___THREAD)
cl_env_ptr
ecl_process_env_unsafe(void)
{
......@@ -66,21 +61,16 @@ ecl_process_env(void)
return NULL;
#endif
}
#endif
static void
ecl_set_process_env(cl_env_ptr env)
{
#ifdef WITH___THREAD
cl_env_p = env;
#else
# ifdef ECL_WINDOWS_THREADS
#ifdef ECL_WINDOWS_THREADS
TlsSetValue(cl_env_key, env);
# else
#else
if (pthread_setspecific(cl_env_key, env)) {
ecl_thread_internal_error("pthread_setspecific() failed.");
}
# endif
#endif
}
......@@ -794,12 +784,10 @@ init_threads(cl_env_ptr env)
/* We have to set the environment before any allocation takes place,
* so that the interrupt handling code works. */
#if !defined(WITH___THREAD)
# if defined(ECL_WINDOWS_THREADS)
#if defined(ECL_WINDOWS_THREADS)
cl_env_key = TlsAlloc();
# else
#else
pthread_key_create(&cl_env_key, NULL);
# endif
#endif
ecl_set_process_env(env);
......
......@@ -781,7 +781,6 @@ with_libffi_libdir
with_libgc_prefix
with_libgc_incdir
with_libgc_libdir
with___thread
with_cxx
with_tcp
with_serve_event
......@@ -801,7 +800,6 @@ with_sse
enable_unicode
enable_longdouble
enable_c99complex
enable_asmapply
enable_smallcons
enable_gengc
enable_precisegc
......@@ -810,7 +808,6 @@ with_debug_cflags
with_profile_cflags
with_extra_files
with_init_form
with_unicode_names
with_x
'
ac_precious_vars='build_alias
......@@ -1469,13 +1466,11 @@ Optional Features:
(no|yes, default=yes)
--enable-gmp version of the GMP library
(portable|included|system|auto, default=auto)
--enable-unicode={yes|no|32}
enable support for unicode (default=YES)
--enable-unicode={32|16|no}
enable support for unicode (default=32)
--enable-longdouble include support for long double (yes|no|auto,
default=AUTO)
--enable-c99complex include support for C complex type (default=NO)
--enable-asmapply enable optimizations written in assembler,
EXPERIMENTAL (default=NO)
--enable-smallcons use small (2 words) cons types. Requires
Boehm-Weiser gc. (default=YES)
--enable-gengc use generational garbage collection. Requires
......@@ -1508,8 +1503,6 @@ Optional Packages:
path to system LIBGC includes (overrides prefix)
--with-libgc-libdir=path
path to system LIBGC libraries (overrides prefix)
--with-__thread Enable __thread thread-local variables (yes|NO|auto)
(supported by NPTL-aware glibc and maybe Windows)
--with-cxx build ECL using C++ compiler (default=NO)
--with-tcp include socket interface (yes|builtin|no,
default=YES)
......@@ -1525,10 +1518,11 @@ Optional Packages:
--with-cmp build the compiler (yes|builtin|no, default=YES)
--with-bytecmp build the bytecodes compiler (yes|builtin|no,
default=YES)
--with-rt include MIT-RT testing environment (yes|builtin|no,
default=YES)
--with-profile include CMUCL's simple profiler (yes|builtin|no,
default=YES if Boehm-Weiser garbage collector used)
--with-rt Deprecated! include MIT-RT testing environment
(yes|builtin|no, default=NO)
--with-profile Deprecated! include CMUCL's simple profiler
(yes|builtin|no, default=YES if Boehm-Weiser garbage
collector used)
--with-dffi dynamic foreign function interface
(system|included|auto|no, default=AUTO if libffi
available)
......@@ -1547,7 +1541,6 @@ Optional Packages:
--with-extra-files list of additional source files (default="")
--with-init-form lisp forms to execute at startup
(default="(si::top-level t)")
--with-unicode-names link in the database of Unicode names (YES,no)
--with-x use the X Window System
Some influential environment variables:
......@@ -2772,15 +2765,6 @@ fi
# Check whether --with-__thread was given.
if test "${with___thread+set}" = set; then :
withval=$with___thread;
else
with___thread=no
fi
# Check whether --with-cxx was given.
if test "${with_cxx+set}" = set; then :
withval=$with_cxx;
......@@ -2866,7 +2850,7 @@ fi
if test "${with_rt+set}" = set; then :
withval=$with_rt;
else
with_rt=yes
with_rt=no
fi
......@@ -2875,7 +2859,7 @@ fi
if test "${with_profile+set}" = set; then :
withval=$with_profile;
else
with_profile=yes
with_profile=NO
fi
......@@ -2928,7 +2912,7 @@ fi
if test "${enable_unicode+set}" = set; then :
enableval=$enable_unicode;
else
enable_unicode=yes
enable_unicode=32
fi
......@@ -2948,14 +2932,6 @@ else
fi
# Check whether --enable-asmapply was given.
if test "${enable_asmapply+set}" = set; then :
enableval=$enable_asmapply; enable_asmapply=${enableval}
else
enable_asmapply=no
fi
# Check whether --enable-smallcons was given.
if test "${enable_smallcons+set}" = set; then :
enableval=$enable_smallcons; enable_smallcons=${enableval}
......@@ -3023,15 +2999,6 @@ fi
# Check whether --with-unicode-names was given.
if test "${with_unicode_names+set}" = set; then :
withval=$with_unicode_names;
else
with_unicode_names="yes"
fi
test -z "${ecldir}" && ecldir="${libdir}/ecl-${PACKAGE_VERSION}"
......@@ -3041,7 +3008,7 @@ test -z "${docdir}" && docdir="${datadir}/doc/ecl-${PACKAGE_VERSION}"
boehm_configure_flags=""
TARGETS='bin/ecl$(EXE)'
TARGETS='bin/ecl$(EXE)'
SUBDIRS=c
LSP_FEATURES='*features*'
......@@ -5232,34 +5199,6 @@ SOFTWARE_VERSION=""
$as_echo "${SOFTWARE_TYPE} / ${SOFTWARE_VERSION}" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread local data" >&5
$as_echo_n "checking for __thread local data... " >&6; }
if ${ac_cv_ecl___thread+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
static __thread void *data;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_ecl___thread=yes
else
ac_cv_ecl___thread=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ecl___thread" >&5
$as_echo "$ac_cv_ecl___thread" >&6; }
# Extract the first word of "install-info", so it can be a program name with args.
......@@ -5324,6 +5263,7 @@ fi
CPPFLAGS="$CPPFLAGS $GMP_CPPFLAGS"
LDFLAGS="$LDFLAGS $GMP_LDFLAGS"
case ${enable_gmp} in #(
portable) :
with_system_gmp=no; with_c_gmp=yes ;; #(
......@@ -5983,21 +5923,6 @@ $as_echo "${THREAD_OBJ}" >&6; }
$as_echo "#define ECL_THREADS 1" >>confdefs.h
if test "${with___thread}" = "auto"; then
with___thread=${ac_cv_ecl___thread}
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use of __thread" >&5
$as_echo_n "checking for use of __thread... " >&6; }
if test "${with___thread}" = "yes"; then
$as_echo "#define WITH___THREAD 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
else
boehm_configure_flags="${boehm_configure_flags} --disable-threads"
......@@ -9766,12 +9691,10 @@ $as_echo "#define ECL_UNICODE 21" >>confdefs.h
ECL_CHARACTER=$ECL_INT32_T
EXTRA_OBJS="$EXTRA_OBJS unicode/ucd.o unicode/ucd-0000.o unicode/ucd-0016.o unicode/ucd-0032.o unicode/ucd-0048.o unicode/ucd-0064.o unicode/ucd-0080.o unicode/ucd-0096.o"
fi
if test "${with_unicode_names}" = "yes"; then
$as_echo "#define ECL_UNICODE_NAMES 1" >>confdefs.h
EXTRA_OBJS="$EXTRA_OBJS unicode/ucd_names_char.o unicode/ucd_names_codes.o unicode/ucd_names_pair.o unicode/ucd_names_str.o"
fi
EXTRA_OBJS="$EXTRA_OBJS unicode/ucd_names_char.o unicode/ucd_names_codes.o unicode/ucd_names_pair.o unicode/ucd_names_str.o"
else
CHAR_CODE_LIMIT=256
ECL_CHARACTER="int"
......
......@@ -136,13 +136,6 @@ AC_ARG_WITH(libgc-libdir,
[path to system LIBGC libraries (overrides prefix)] ),
[LIBGC_LIBDIR="$withval"], [])
dnl
AC_ARG_WITH(__thread,
AS_HELP_STRING( [--with-__thread],
[Enable __thread thread-local variables (yes|NO|auto)]
[(supported by NPTL-aware glibc and maybe Windows)] ),
[], [with___thread=no])
AC_ARG_WITH(cxx,
AS_HELP_STRING( [--with-cxx],
[build ECL using C++ compiler (default=NO)]),
......@@ -192,15 +185,15 @@ AC_ARG_WITH(bytecmp,
AC_ARG_WITH(rt,
AS_HELP_STRING( [--with-rt],
[include MIT-RT testing environment]
[(yes|builtin|no, default=YES)]),
[], [with_rt=yes])
[Deprecated! include MIT-RT testing environment]
[(yes|builtin|no, default=NO)]),
[], [with_rt=no])
AC_ARG_WITH(profile,
AS_HELP_STRING( [--with-profile],
[include CMUCL's simple profiler]
[Deprecated! include CMUCL's simple profiler]
[(yes|builtin|no, default=YES if Boehm-Weiser garbage collector used)]),
[], [with_profile=yes])
[], [with_profile=NO])
AC_ARG_WITH(dffi,
AS_HELP_STRING( [--with-dffi],
......@@ -232,9 +225,9 @@ AC_ARG_WITH(sse,
[], [with_sse="no"])
AC_ARG_ENABLE(unicode,
AS_HELP_STRING( [--enable-unicode={yes|no|32}],
[enable support for unicode (default=YES)]),
[], [enable_unicode=yes])
AS_HELP_STRING( [--enable-unicode={32|16|no}],
[enable support for unicode (default=32)]),
[], [enable_unicode=32])
AC_ARG_ENABLE(longdouble,
AS_HELP_STRING( [--enable-longdouble],
......@@ -248,12 +241,6 @@ AC_ARG_ENABLE(c99complex,
[(default=NO)]),
[enable_c99complex=${enableval}], [enable_c99complex=no])
AC_ARG_ENABLE(asmapply,
AS_HELP_STRING( [--enable-asmapply],
[enable optimizations written in assembler, EXPERIMENTAL]
[(default=NO)]),
[enable_asmapply=${enableval}],[enable_asmapply=no])
AC_ARG_ENABLE(smallcons,
AS_HELP_STRING( [--enable-smallcons],
[use small (2 words) cons types. Requires Boehm-Weiser gc.]
......@@ -300,12 +287,6 @@ AC_ARG_WITH(init-form,
[lisp forms to execute at startup (default="(si::top-level t)")]),
[with_init_form="${withval}"], [with_init_form=""])
AC_ARG_WITH(unicode-names,
AS_HELP_STRING( [--with-unicode-names],
[link in the database of Unicode names]
[(YES,no)]),
[],[with_unicode_names="yes"])
dnl -----------------------------------------------------------------------
dnl Installation directories
AC_ARG_VAR([ecldir], [the directory where *.fas files are installed])
......@@ -325,7 +306,7 @@ AC_SUBST(ECL_CFLAGS) dnl Similar, but specific to ECL (see src/util/e
AC_SUBST(DEBUG_CFLAGS)
AC_SUBST(GMP_CPPFLAGS) dnl CFLAGS needed for compiling with system GMP library
AC_SUBST(GMP_LDFLAGS) dnl LDFLAGS needed for compiling with system GMP library
AC_SUBST(LIBFFI_LDFLAGS) dnl LDFLAGS needed for compiling with system LIBFFI library
AC_SUBST(LIBFFI_LDFLAGS) dnl LDFLAGS needed for compiling with system LIBFFI library
AC_SUBST(FASL_LIBS) dnl Libraries to link into all ecl code but not
dnl into helper programs.
AC_SUBST(CORE_LIBS, []) dnl Locally compiled libs to link into
......@@ -365,7 +346,6 @@ dnl Checks which do not come with autoconf (must be after AC_PROG_CC)
ECL_MAKE_ABSOLUTE_SRCDIR
ECL_CROSS_CONFIG
ECL_GUESS_HOST_OS
ECL___THREAD
AC_SUBST(INFOEXT)
AC_SUBST(INSTALL_INFO)
......@@ -566,16 +546,6 @@ if test "${enable_threads}" = "yes" ; then
AC_MSG_CHECKING([for thread object files])
AC_MSG_RESULT([${THREAD_OBJ}])
AC_DEFINE( [ECL_THREADS], [1], [Userland threads?])
if test "${with___thread}" = "auto"; then
with___thread=${ac_cv_ecl___thread}
fi
AC_MSG_CHECKING([for use of __thread])
if test "${with___thread}" = "yes"; then
AC_DEFINE( [WITH___THREAD], [1], [__thread thread-local variables?] )
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
fi
else
boehm_configure_flags="${boehm_configure_flags} --disable-threads"
......@@ -897,10 +867,8 @@ if test "x${enable_unicode}" != "xno"; then
ECL_CHARACTER=$ECL_INT32_T
EXTRA_OBJS="$EXTRA_OBJS unicode/ucd.o unicode/ucd-0000.o unicode/ucd-0016.o unicode/ucd-0032.o unicode/ucd-0048.o unicode/ucd-0064.o unicode/ucd-0080.o unicode/ucd-0096.o"
fi
if test "${with_unicode_names}" = "yes"; then
AC_DEFINE([ECL_UNICODE_NAMES], [1], [Link in the database of Unicode names])
EXTRA_OBJS="$EXTRA_OBJS unicode/ucd_names_char.o unicode/ucd_names_codes.o unicode/ucd_names_pair.o unicode/ucd_names_str.o"
fi
AC_DEFINE([ECL_UNICODE_NAMES], [1], [Link in the database of Unicode names])
EXTRA_OBJS="$EXTRA_OBJS unicode/ucd_names_char.o unicode/ucd_names_codes.o unicode/ucd_names_pair.o unicode/ucd_names_str.o"
else
CHAR_CODE_LIMIT=256
ECL_CHARACTER="int"
......
......@@ -367,11 +367,12 @@ appropriate size. Signals an error if @var{o} is not of fixnum type.
@subheading Characters
@cfindex --enable-unicode [YES|no|32]
@cfindex --enable-unicode [32|16|no]
ECL has two types of characters – one fits in the C type char, while the
other is used when ECL is built with a configure option
@code{--enable-unicode}.
ECL has two types of characters – one fits in the C type char, while
the other is used when ECL is built with a configure option
@code{--enable-unicode} which defaults to 32 (characters are stored in
32bit variable and codepoints have 21-bits).
@cppindex ecl_character
@cppindex ecl_base_char
......
......@@ -59,3 +59,11 @@ module (logic programming) from EcoLisp times.
@subheading Hierarchical packages
Commit @code{72e422f1b3c4b3c52fa273b961517db943749a8f}. Partially
broken. Tests left in package-extensions.lsp.
@subheading 8-bit opcodes in bytecodes interpreter
Commit @code{c3244b0148ed352808779b07b25c3edddf9d7349}. Works fine but
provides no real gain and is limited to intel.
@subheading thread local variables
Commit @code{618f6e92e8144f7b95bc36b42a337c212bacc8e7}. Disabled by
default, practically not tested, works on limited number of platforms.
......@@ -480,9 +480,6 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
/* __thread thread-local variables? */
#undef WITH___THREAD
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
......
......@@ -68,11 +68,6 @@
#undef ECL_RWLOCK
#endif
/* __thread thread-local variables? */
#ifndef openbsd
#undef WITH___THREAD
#endif
/* Use Boehm's garbage collector */
#undef GBC_BOEHM
#ifdef GBC_BOEHM
......@@ -103,8 +98,6 @@
/* Support for Unicode strings */
#undef ECL_UNICODE
/* Link in the Unicode names for all characters (takes ~0.5 Mb) */
#undef ECL_UNICODE_NAMES
/* Allow STREAM operations to work on arbitrary objects */
#undef ECL_CLOS_STREAMS
......
......@@ -158,16 +158,9 @@ struct ecl_interrupt_struct {
#define __attribute__(x)
#endif
#if defined(ECL_THREADS)
# ifdef WITH___THREAD
# define cl_env (*cl_env_p)
# define ecl_process_env() cl_env_p
# define ecl_process_env_unsafe() cl_env_p
extern __thread cl_env_ptr cl_env_p;
# else
# define cl_env (*ecl_process_env())
extern ECL_API cl_env_ptr ecl_process_env(void) __attribute__((const));
extern ECL_API cl_env_ptr ecl_process_env_unsafe(void) __attribute__((const));
# endif
# define cl_env (*ecl_process_env())
extern ECL_API cl_env_ptr ecl_process_env(void) __attribute__((const));
extern ECL_API cl_env_ptr ecl_process_env_unsafe(void) __attribute__((const));
#else
# define cl_env (*cl_env_p)
# define ecl_process_env() cl_env_p
......@@ -1927,10 +1920,8 @@ extern ECL_API cl_object si_coerce_to_base_string(cl_object x);
extern ECL_API cl_object si_coerce_to_extended_string(cl_object x);
#define ecl_alloc_simple_extended_string(l) ecl_alloc_simple_vector((l),ecl_aet_ch)
extern ECL_API cl_object ecl_alloc_adjustable_extended_string(cl_index l);
# ifdef ECL_UNICODE_NAMES
extern ECL_API cl_object _ecl_ucd_code_to_name(ecl_character c);
extern ECL_API cl_object _ecl_ucd_name_to_code(cl_object name);
# endif
#else
#define si_base_char_p cl_characterp
#define si_base_string_p cl_stringp
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment