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

Merge branch 'develop'

parents 6b789092 54569bf2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@ cov-int


msvc/help.doc
msvc/*.c
msvc/*.tmp
msvc/*.bat
msvc/*.lsp
msvc/c/*.[ch]
+53 −1
Original line number Diff line number Diff line
@@ -27,7 +27,59 @@
    install ECL on the preferred destination (specified with "--prefix"
    parameter given to configure script).

* Pending changes since 20.4.24
* Pending changes since 21.2.1
* 21.2.1 changes since 20.4.24
** Announcement
Dear Community,

We are announcing a new stable ECL release which fixes a number of bugs
from the previous release. Changes made include amongst others

- working generational and precise garbage collector modes
- support for using precompiled headers to improve compilation speed
- the bytecompiler correctly implements the ANSI specification for load
  time forms of literal objects in compiled files
- fixes for encoding issues when reading in the output of the MSVC compiler
- issues preventing ECL from compiling on Xcode 12 and running on ARM64
  versions of Mac OS have been rectified

More detailed information can be obtained from the CHANGELOG file and git
commit logs. We'd like to thank all people who contributed to this release.
Some of them are listed here (without any particular order): Paul Ruetz,
Karsten Poeck, Eric Timmons, Vladimir Sedach, Dima Pasechnik, Matthias
Köppe, Yuri Lensky, Tobias Hansen, Pritam Baral, Marius Gerbershagen and
Daniel Kochmański.

This release is available for download in a form of a source code archive
(we do not ship prebuilt binaries):

- [ECL 21.2.1 tarball archive](https://common-lisp.net/project/ecl/static/files/release/ecl-21.2.1.tgz)
- [The ECL Manual](https://common-lisp.net/project/ecl/static/manual/)

Happy Hacking,
The ECL Developers

** Enhancements
- less cryptic names in backtraces of C-compiled functions
- ECL can now use precompiled headers to speed up compilation. Use ~(setq
  c::*use-precompiled-headers* t)~ to enable this feature
** Issues fixed
- the generational and precise garbage collector modes work again
- ~serve-event~ extension may be used simultaneously from different threads now
- several Unicode issues have been fixed thanks to Vladimir Sedach
- encoding issues when reading in the output of the MSVC compiler have been fixed
- inlining of a local function which closes over a variable no longer leads
  to miscompilations if a variable with the same name exists at the point
  where the function is inlined
- the bytecompiler handles load time forms from literal objects correctly
  with regards to the evaluation order and to multiple occurrences of the same
  literal object in a single file
- the ECL_C_COMPATIBLE_VARIADIC_DISPATCH option needed for running on Apple
  ARM64 devices is automatically enabled when ECL is compiled for such a
  device, allowing ECL to run on ARM64 Mac OS without any special compile
  flags
** API changes
- a condition ~ext:timeout~ is defined
* 20.4.24 changes since 16.1.3
** Announcement
Dear Community,
+3 −17
Original line number Diff line number Diff line
You will find detailed installation instructions in the ECL manual
       https://common-lisp.net/project/ecl/static/manual/pr01s06.html
       https://common-lisp.net/project/ecl/static/manual/Building-ECL.html
If you do not have access to the online version, follow the following recipies.

* Unix and similar platforms.
@@ -70,7 +70,7 @@ MacPort command:
Hint provided by Pascal J. Bourguignon.


* Cross-compile for the iOS platform
* Cross-compile for the iOS platform (needs Xcode 11 or higher)
1. Build the host ECL
   #+BEGIN_SRC shell-script
     ./configure --prefix=`pwd`/ecl-iOS-host --disable-c99complex
@@ -98,7 +98,7 @@ Hint provided by Pascal J. Bourguignon.
   #+END_SRC
3. Build and install the target library
   #+BEGIN_SRC shell-script
     export CFLAGS="$CFLAGS -DECL_C_COMPATIBLE_VARIADIC_DISPATCH -DGC_DISABLE_INCREMENTAL -DECL_RWLOCK"
     export CFLAGS="$CFLAGS -DGC_DISABLE_INCREMENTAL -DECL_RWLOCK"
     export CXXFLAGS="$CFLAGS"
     ./configure --host=aarch64-apple-darwin \
                 --prefix=`pwd`/ecl-iOS \
@@ -110,17 +110,3 @@ Hint provided by Pascal J. Bourguignon.
   #+END_SRC
4. Library and assets in the ecl-iOS directory are ready to run on
   the iOS system.

** Using ECL on iOS

The Boehm-Demers-Weiser garbage collector cannot find the stack base
automatically on iOS. Therefore, this has to be specified manually. In
the main function, before calling cl_boot, add e.g. (see the garbage
collector documentation for more details):
#+BEGIN_SRC C
  const int size = 256;
  char* ecl_argv[size];
  GC_allow_register_threads();
  GC_register_my_thread((const struct GC_stack_base*)ecl_argv);
  GC_stackbottom = (char*)(ecl_argv + size - 1);
#+END_SRC
 No newline at end of file
+32 −37
Original line number Diff line number Diff line
@@ -49,14 +49,14 @@
                    (warn "COMPILE can not compile C closures")
                    (return-from bc-compile (values definition t nil)))
                   (lexenv (setf definition (si:eval-with-env form lexenv)))
                   (t (setf definition (si:eval-with-env form nil nil nil t))))))
                   (t (setf definition (si:eval-with-env form nil nil nil :execute))))))
         (when name (setf (fdefinition name) definition))
         (return-from bc-compile (values (or name definition) nil nil)))
        ((not (null definition))
         (unless (member (car definition) '(LAMBDA EXT:LAMBDA-BLOCK))
           (format t "~&;;; Error: Not a valid lambda expression: ~s." definition)
           (return-from bc-compile (values nil t t)))
         (setq definition (si:eval-with-env definition nil nil nil t))
         (setq definition (si:eval-with-env definition nil nil nil :execute))
         (when name (setf (fdefinition name) definition))
         (return-from bc-compile (values (or name definition) nil nil)))
        ((not (fboundp name))
@@ -72,7 +72,7 @@
                    (warn "The bytecodes compiler can not compile C closures")
                    (return-from bc-compile (values definition t nil)))
                   (lexenv (setf definition (si:eval-with-env form lexenv)))
                   (t (setf definition (si:eval-with-env form nil nil nil t))))))
                   (t (setf definition (si:eval-with-env form nil nil nil :execute))))))
         (when (null definition)
           (warn "We have lost the original function definition for ~s." name)
           (return-from bc-compile (values name t nil)))
@@ -81,7 +81,7 @@
(defun bc-compile-file-pathname (name &key (output-file name) (type :fasl)
                                        verbose print c-file h-file data-file
                                        shared-data-file system-p load external-format)
  (declare (ignore load c-file h-file data-file shared-data-file system-p verbose print))
  (declare (ignore load c-file h-file data-file shared-data-file system-p verbose print external-format))
  (let ((extension "fasc"))
    (case type
      ((:fasl :fas) (setf extension "fasc"))
@@ -113,16 +113,11 @@
         (with-open-file (sout output-file :direction :output :if-exists :supersede
                               :if-does-not-exist :create
                               :external-format external-format)
	   (let ((binary (loop
			    with *package* = *package*
			    with *readtable* = *readtable*
			    with ext:*bytecodes-compiler* = t
			    for position = (file-position input)
			    for form = (read input nil :EOF)
			    until (eq form :EOF)
			    do (when ext::*source-location*
				 (rplacd ext:*source-location* position))
			    collect (si:eval-with-env form nil nil nil nil))))
           (let ((binary
                  (let ((*package* *package*)
                        (*readtable* *readtable*)
                        (ext:*bytecodes-compiler* t))
                    (si::bc-compile-from-stream input))))
             (sys:with-ecl-io-syntax
                 (write binary :stream sout :circle t :escape t :readably t :pretty nil))
             (terpri sout)))))
+31 −0
Original line number Diff line number Diff line
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Test that serve-event doesn't leak its handlers to other threads
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(require 'serve-event)

(defun test-leak (&aux exit)
  (let ((out *standard-output*))
    (print "Press enter." out)
    (let* ((p1 (mp:process-run-function
                'stdin-2
                (lambda ()
                  (serve-event:with-fd-handler
                      (0 :input #'(lambda (fd)
                                    (declare (ignore fd))
                                    (format out "WRONG!~%")))
                    (sleep most-positive-fixnum)))))
           (p2 (mp:process-run-function
                'stdin-1
                (lambda ()
                  (serve-event:with-fd-handler
                      (0 :input #'(lambda (fd)
                                    (declare (ignore fd))
                                    (format out"GOOD!~%")))
                    (unwind-protect (serve-event:serve-event)
                      (mp:interrupt-process p1 (lambda ()
                                                 (mp:exit-process)))))))))
      (mp:process-join p1)
      (mp:process-join p2))))

(test-leak)
Loading