Merge branch 'fix-c-nested-closures' into develop

This commit is contained in:
Daniel Kochmański 2016-03-10 18:03:02 +01:00
commit 5e397ab50f
9 changed files with 40 additions and 51 deletions

View file

@ -10,8 +10,8 @@ srcdir = ..\src
SHORT_SITE_NAME =
LONG_SITE_NAME =
ECL_VERSION = 16.1.2-dev
ECL_VERSION_NUMBER= 161002
ECL_VERSION = 16.1.3-dev
ECL_VERSION_NUMBER= 160103
ARCHITECTURE = PENTIUM4
SOFTWARE_TYPE = NT
SOFTWARE_VERSION = 5.0

View file

@ -268,7 +268,8 @@
(env nil))
(case (fun-closure fun)
(CLOSURE
(setf env (environment-accessor fun)))
(when (plusp *max-env*)
(setf env (environment-accessor fun))))
(LEXICAL
(let ((lex-lvl (fun-level fun)))
(dotimes (n lex-lvl)

View file

@ -28,8 +28,6 @@
"*CC-OPTIMIZE*"
"*USER-CC-FLAGS*"
"*USER-LD-FLAGS*"
"*SUPPRESS-COMPILER-NOTES*"
"*SUPPRESS-COMPILER-WARNINGS*"
"*SUPPRESS-COMPILER-MESSAGES*"
"BUILD-ECL"
"BUILD-PROGRAM"
@ -46,8 +44,6 @@
"COMPILER-MESSAGE-FILE"
"COMPILER-MESSAGE-FILE-POSITION"
"COMPILER-MESSAGE-FORM"
"*SUPPRESS-COMPILER-WARNINGS*"
"*SUPPRESS-COMPILER-NOTES*"
"*SUPPRESS-COMPILER-MESSAGES*"
"INSTALL-C-COMPILER"
"UPDATE-COMPILER-FEATURES")

View file

@ -436,14 +436,17 @@
;; should definitely keep this in memory.
(when (plusp *max-lex*)
(wt-nl "volatile cl_object lex" *level* "[" *max-lex* "];"))
(when (plusp *max-env*)
(unless (eq closure-type 'CLOSURE)
(wt-nl "cl_object " *volatile* "env0;"))
;; Note that the closure structure has to be marked volatile
;; or else GCC may optimize away writes into it because it
;; does not know it shared with the rest of the world.
(unless (eq closure-type 'CLOSURE)
(wt-nl "cl_object " *volatile* "env0;"))
(when (plusp *max-env*)
;; Closure structure has to be marked volatile or else GCC may
;; optimize away writes into it because it does not know it shared
;; with the rest of the world.
(when *aux-closure*
(wt-nl "volatile struct ecl_cclosure aux_closure;"))
(wt-nl "cl_object " *volatile*)
(loop for i from 0 below *max-env*
for comma = "" then ", "

18
src/configure vendored
View file

@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac Revision.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for ecl 16.1.2-dev.
# Generated by GNU Autoconf 2.69 for ecl 16.1.3-dev.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@ -578,8 +578,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ecl'
PACKAGE_TARNAME='ecl'
PACKAGE_VERSION='16.1.2-dev'
PACKAGE_STRING='ecl 16.1.2-dev'
PACKAGE_VERSION='16.1.3-dev'
PACKAGE_STRING='ecl 16.1.3-dev'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1366,7 +1366,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures ecl 16.1.2-dev to adapt to many kinds of systems.
\`configure' configures ecl 16.1.3-dev to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1435,7 +1435,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of ecl 16.1.2-dev:";;
short | recursive ) echo "Configuration of ecl 16.1.3-dev:";;
esac
cat <<\_ACEOF
@ -1611,7 +1611,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
ecl configure 16.1.2-dev
ecl configure 16.1.3-dev
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -2198,7 +2198,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ecl $as_me 16.1.2-dev, which was
It was created by ecl $as_me 16.1.3-dev, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -10214,7 +10214,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by ecl $as_me 16.1.2-dev, which was
This file was extended by ecl $as_me 16.1.3-dev, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -10276,7 +10276,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
ecl config.status 16.1.2-dev
ecl config.status 16.1.3-dev
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

View file

@ -8,7 +8,7 @@ dnl AUTOCONF configuration for ECL
dnl Giuseppe Attardi 25.1.1994
dnl
AC_INIT([ecl],[16.1.2-dev],[])
AC_INIT([ecl],[16.1.3-dev],[])
AC_REVISION([$Revision$])
AC_CONFIG_SRCDIR([bare.lsp.in])
AC_CONFIG_AUX_DIR([gmp])

View file

@ -290,14 +290,6 @@ filesystem or in the database of ASDF modules."
&aux
(*suppress-compiler-messages* (or *suppress-compiler-messages*
(not *compile-verbose*))))
;; Deprecated, to be removed in next release
(when *suppress-compiler-notes*
(setf *suppress-compiler-messages*
`(or ,*suppress-compiler-messages* compiler-note)))
(when *suppress-compiler-warnings*
(setf *suppress-compiler-messages*
`(or ,*suppress-compiler-messages* compiler-warning)))
;;
;; The epilogue-code can be either a string made of C code, or a
;; lisp form. In the latter case we add some additional C code to
@ -481,13 +473,6 @@ specifies whether to load the generated fasl file after compilation. The
:O-FILE, :C-FILE, :H-FILE, and :DATA-FILE keyword parameters allow you to
control the intermediate files generated by the ECL compiler.If the file was
compiled successfully, returns the pathname of the compiled file"
;; Deprecated, to be removed in next release
(when *suppress-compiler-notes*
(setf *suppress-compiler-messages*
`(or ,*suppress-compiler-messages* compiler-note)))
(when *suppress-compiler-warnings*
(setf *suppress-compiler-messages*
`(or ,*suppress-compiler-messages* compiler-warning)))
#-dlopen
(unless system-p
@ -643,15 +628,6 @@ returned as the value of COMPILE. In any case, COMPILE creates temporary
files, whose filenames begin with \"gazonk\", which are automatically deleted
after compilation."
(unless (symbolp name) (error "~s is not a symbol." name))
;; Deprecated, to be removed in next release
(when *suppress-compiler-notes*
(setf *suppress-compiler-messages*
`(or ,*suppress-compiler-messages* compiler-note)))
(when *suppress-compiler-warnings*
(setf *suppress-compiler-messages*
`(or ,*suppress-compiler-messages* compiler-warning)))
(cond ((and supplied-p def)
(when (functionp def)
(unless (function-lambda-expression def)

View file

@ -27,8 +27,6 @@
"*COMPILE-VERBOSE*"
"*CC*"
"*CC-OPTIMIZE*"
"*SUPPRESS-COMPILER-WARNINGS*"
"*SUPPRESS-COMPILER-NOTES*"
"*SUPPRESS-COMPILER-MESSAGES*"
"PROCLAIMED-ARG-TYPES"
"PROCLAIMED-RETURN-TYPE"
@ -239,8 +237,6 @@
"COMPILER-MESSAGE-FILE"
"COMPILER-MESSAGE-FILE-POSITION"
"COMPILER-MESSAGE-FORM"
"*SUPPRESS-COMPILER-WARNINGS*"
"*SUPPRESS-COMPILER-NOTES*"
"*SUPPRESS-COMPILER-MESSAGES*")
(:import-from "SI" "GET-SYSPROP" "PUT-SYSPROP" "REM-SYSPROP" "MACRO"
"*COMPILER-CONSTANTS*" "REGISTER-GLOBAL" "CMP-ENV-REGISTER-MACROLET"

View file

@ -1150,3 +1150,20 @@
(compile 'check-single-wildcard)
(check-single-wildcard "dan*" 3))
T)
;;; Date: 2016-02-10
;;; Fixed: Daniel Kochmański
;;; Description
;;; Aux closures created by C compiler weren't handled correctly
;;; in respect of the environment and declarations of the
;;; variables
(deftest compiler.0050.cmptop/call.1
(funcall (compile nil '(lambda ()
(labels
((fun-2 () (fun-3 'cool))
(fun-3 (clause-var)
(flet ((fun-4 () clause-var))
(fun-4))))
(let ((fun-1 (lambda () (fun-2))))
(funcall fun-1))))))
cool)