Commit graph

6683 commits

Author SHA1 Message Date
Exaybachay
eaea424f7c Revert "fix header argument names for C++ compilation"
This reverts commit 1ab9f00744.
2018-11-02 17:09:56 +08:00
Exaybachay
1ab9f00744 fix header argument names for C++ compilation 2018-11-02 13:32:35 +08:00
Marius Gerbershagen
ba573abf9e defstruct: don't use eval in define-structure 2018-10-30 11:58:19 +01:00
Marius Gerbershagen
e3cda73965 Merge branch 'develop' into 'develop'
Fix ECL_LINEFEED_MODE test with -Werror=format-security

See merge request embeddable-common-lisp/ecl!124
2018-10-29 19:40:33 +01:00
Sébastien Villemot
2ef5d11cf9 Fix ECL_LINEFEED_MODE test with -Werror=format-security
In Debian, the -Werror=format-security flag is now passed by default to gcc.
This makes the ECL_LINEFEED_MODE test fail.

The fix is to replace the call to fprintf() by fputs().
2018-10-29 19:38:17 +01:00
Marius Gerbershagen
8a1e7f5c92 cmp: don't mark all lexical variables as crossing function boundaries
The compiler refactor of commit
    7ec2f4a939 introduced an error where
    all lexical variables where marked to cross function boundaries,
    leading them to be stored in volatile variables on the stack.
2018-10-29 19:15:49 +01:00
Marius Gerbershagen
57a0346a52 doc: document behaviour of declaim and proclaim 2018-10-28 16:32:55 +01:00
Marius Gerbershagen
892e21012a cmp: make behaviour of declaim inline more sensible
ECL needs the definition of a function to inline it. Previously,
    this definition would only be saved in the file local environment
    (*cmp-env-root*) but not in the global environment used by
    proclaim. Hence, ECL could only inline functions in the same file.
    Now, we also put the definition of inline functions in the global
    environment during load time. This leads to a behaviour of declaim
    for inline functions, which is consistent with other declarations
    (meaning that the declarations stay only in force during
    compilation, but are proclaimed again at load time of the compiled
    file).
    Fixes #451.
2018-10-28 16:32:55 +01:00
Marius Gerbershagen
8812ba2189 doc: fix various typos and remove use of legacy names in examples 2018-10-26 17:54:08 +02:00
Marius Gerbershagen
cd86ac5019 doc: use category name for @defvar 2018-10-23 21:14:50 +02:00
Marius Gerbershagen
3df0a69785 doc: document floating point exceptions and infinity/NaN 2018-10-23 21:12:46 +02:00
Marius Gerbershagen
2a9084b105 prevent floating point exception signals if ECL_OPT_TRAP_SIGFPE is false
Fixes #347.
2018-10-23 21:11:02 +02:00
Marius Gerbershagen
7ff23cbb92 cmp: fix inline definition for mp:lock-count 2018-10-17 22:07:53 +02:00
Marius Gerbershagen
8676abe519 cmp: add proclamations for multithreading functions 2018-10-17 22:07:19 +02:00
Marius Gerbershagen
8ad10cec50 doc: fix some typos and errors in the multithreading documentation 2018-10-17 21:52:19 +02:00
Daniel Kochmański
4021fbdcf8 Merge branch 'atomic-ops' into 'develop'
Add support for atomic operations

Closes #278

See merge request embeddable-common-lisp/ecl!122
2018-10-15 19:23:52 +00:00
Marius Gerbershagen
46d74c5a66 cosmetic changes in assignment.d and clos/instance.d 2018-10-15 19:55:39 +02:00
Marius Gerbershagen
c45098e17a doc: add documentation for atomic operations 2018-10-15 19:55:39 +02:00
Marius Gerbershagen
239a2aa4f1 threading: add support for atomic operations
We support both compare-and-swap and fetch-and-add (via
    atomic-incf/decf) on the most common places and define an
    extension interface for compare-and-swap similiar to the one in
    SBCL.

    These changes introduce new dependencies on the libatomic_ops
    macros AO_fetch_compare_and_swap and AO_fetch_and_add.
2018-10-15 19:55:39 +02:00
Marius Gerbershagen
7272aff008 Merge branch 'stream-fixes' into 'develop'
ansi: file-string-length and broadcast-stream fies

Closes #452

See merge request embeddable-common-lisp/ecl!121
2018-10-01 19:12:41 +00:00
Daniel Kochmanski
b22dcd5e3e file-string-length: revert behavior change for string-output-stream.
We signal an error if the stream is not a file stream (like before). We provide
note in the tests that this is an undefined behavior.
2018-10-01 20:46:50 +02:00
Daniel Kochmanski
30c4120b15 tests: improve ansi.21-2.last-component test 2018-09-23 17:27:55 +02:00
Daniel Kochmanski
23753207aa defpackage: standard mandates error if :SIZE is passed twice
While we do ignore it for all practical purposes it is explicitly said in
standard that we should signal error. Also :SIZE  is not an extension (but may
be not used since it is just a hint).
2018-09-23 17:26:32 +02:00
ZhangYuguo
5eeae0d823 build system: suppress some logo(copyright) information for msvc toolchains. 2018-09-23 13:41:22 +00:00
Daniel Kochmanski
a1875da85a ansi: return NIL for file-string-length if can't determine it.
Previously we returned error for streams which are not file streams. We could
try to loose this test for ECL_ANSI_STREAM_P, but that would require confirming,
that all ECL's ANSI streams have string encoders defined.
2018-09-23 15:28:34 +02:00
Daniel Kochmanski
e10802b5e8 broadcast-stream: delegate file-* functions to the last component.
Fixes #452.
2018-09-23 15:28:34 +02:00
Daniel Kochmanski
3f8a78ca63 tests: add regression test for broadcast stream and file-* functions 2018-09-23 15:28:34 +02:00
Marius Gerbershagen
02b501e5a6 doc: fix typos and errors in ffi documentation 2018-09-18 19:59:40 +02:00
Marius Gerbershagen
2192e63e59 ffi: protect with-foreign-string and with-foreign-object against interrupts 2018-09-18 18:47:01 +02:00
Marius Gerbershagen
a34b6d0ca4 threading: proctect with-rwlock against interrupts 2018-09-18 18:45:41 +02:00
Marius Gerbershagen
3824e1b6da doc: fix documentation for mp:without-interrupts 2018-09-15 19:59:06 +02:00
Marius Gerbershagen
198f051369 export with-restored-interrupts from mp package 2018-09-15 19:54:51 +02:00
Marius Gerbershagen
95b0523bfe top.lsp: make with-grabbed-console interrupt safe 2018-09-15 19:53:42 +02:00
Marius Gerbershagen
b5194ca774 threading: fix interrupt safety of out_of_memory function
This function used writes in the thread local environment while
    interrupts where disabled with the env->disable_interrupts
    mechanism, which causes problems with the mprotect() mechanism for
    fast interrupt dispatch.
2018-09-09 17:06:32 +02:00
Marius Gerbershagen
57f6637902 threading: introduce thread safe ECL_UNWIND_PROTECT macro and use where needed
Disabling interrupts during execution of cleanup forms of
    unwind-protect caused problems in some cases. Hence only do this
    where needed, i.e. for freeing resources (such as locks or files)
    shared between multiple threads or processes.
2018-09-09 17:00:38 +02:00
Marius Gerbershagen
dfd24e45c5 Revert "threading: block interrupts during execution of cleanup forms in unwind-protect"
This reverts commit 24e4c13d58.
2018-09-08 17:46:55 +02:00
Daniel Kochmanski
703771fc3d Revert "cmp: execute cleanup forms of unwind-protect with interrupts disabled"
This reverts commit b8df7a777c.
2018-09-04 17:53:30 +02:00
Marius Gerbershagen
30fa0cd7a5 reader: fix do_patch_sharp for bclosures
do_patch_sharp was erroneously returning only the bytecode,
    stripping away the lexical environment.
2018-09-01 17:32:45 +02:00
Marius Gerbershagen
741a01da09 reader: fix reading of bclosures
The syntax had been changed in commit
    991bc3ab78, but the reader macro
    became broken in the process and commit
    835e85bc99 removed the broken
    parts. Since the reason for the change in the syntax is unclear,
    go back to the old syntax.
2018-09-01 17:31:19 +02:00
Marius Gerbershagen
ba6e6ddde7 reader: don't treat -. and +. as a number
CLHS section 2.3.1 mandates that all numbers must contain at least
    one digit. Fixes #427.
2018-08-23 22:55:23 +02:00
Marius Gerbershagen
3201b545e1 reader: don't allow a package prefix in an uninterned symbol
Fixes #439.
2018-08-21 20:08:00 +02:00
Marcin Kolenda
f9b371ddbf rm rsym from util Makefile -- rsym.c doesn't exist
Checked with ack-grep if it isn't mentioned in other places - it isn't.

Looked in repo history what is rsym.c - haven't found anything
2018-08-10 07:53:25 +02:00
Marius Gerbershagen
a7353369ea threading: faster interrupt safe frame/binding stack manipulations
Only use one memory barrier for pushing in the frame/binding stack
    and ensure interrupt safety by saving/restoring the stack frame in
    which writes could happen during an interrupt.
2018-08-04 17:21:16 +02:00
Marius Gerbershagen
319b7ef79b doc: document :object and :long-double ffi types 2018-07-29 15:41:20 +02:00
Marius Gerbershagen
abd4e66f48 stop ecl_frs_push from setting frs_val to often
The following code `(LOOP (BLOCK NIL (RETURN)))` would produce an
    error. ecl_frs_push would correctly set __frame->frs_val the first
    time, however later on control would jump to the statement after
    ecl_setjmp and __frame->frs_val would be set again, this time to a
    wrong value. Fixes #446.
    Also, we don't need to pass val to _ecl_frs_push anymore, so this
    argument has been removed.
2018-07-22 11:10:22 +02:00
Yuguo Zhang
5db3a78208 ecl_open_stream, close invalid fd cause crash on windows platform.
actually, the build process will terminated when loading
cmp/cmpos-features.lsp

related function is:

(with-open-file (s fc :direction :output :if-exists :overwrite
                      :if-does-not-exists :create)

it's a MS feature called security-enhanced CRT.
2018-07-22 14:12:59 +08:00
Yuguo Zhang
2283656b24 ecl_open_stream: treat new file as exists after been created. 2018-07-10 09:26:30 +08:00
Marius Gerbershagen
a3e1cf7c78 cmp: correctly restore compile-file(-pathname) in ext:install-c-compiler
After a call to ext:install-c-compiler while the bytecodes compiler
    is installed, compile-file and compile-file-pathname still point
    to bc-compile-file and bc-compile-file-pathname. Reported and
    fixed by gitlab user pouar. Fixes #444.
2018-07-08 17:33:09 +02:00
Marius Gerbershagen
aad6d252d6 tests: fix embedding tests on mingw
We need to set the path environment variable for the test programs to
    find ecl.dll
2018-07-07 22:16:50 +02:00
Marius Gerbershagen
2ad7cef5dd fix exit code of processes in si_waitpid on windows
GetExitCodeProcess returns the exit code in a DWORD, which is an
    unsigned integer, however main functions usually return a signed int, so
    we need put in an explicit type cast.
2018-07-07 22:16:50 +02:00