Commit graph

7458 commits

Author SHA1 Message Date
Marius Gerbershagen
f75a43139b ffi: coerce to base strings automatically in ecl_null_terminated_base_string
Don't coerce symbols to strings, since this would be inconsistent
    with the rest of the ffi interface. Fixes #338. Also fix bad type
    checks.
2018-05-11 22:29:25 +02:00
Daniel Kochmanski
4cddf5b466 Open IO fifo in blocking mode and don't use peek-char in listen
Otherwise we can't connect to X server (unix domain socket):
- it is a binary stream (and we get error when we use listen)
- non-blocking io connection doesn't seem to work
2018-05-11 11:35:01 +02:00
Daniel Kochmanski
e3b9919ffa fixes for windows (S_ISFIFO) 2018-05-08 20:05:34 +02:00
Daniel Kochmanski
11f31beafb Merge branch 'spaghettisalat/ecl-develop' into develop 2018-05-08 19:40:55 +02:00
Daniel Kochmanski
94342d2ea9 add changelog entry about improved C backtraces 2018-05-08 19:40:14 +02:00
Daniel Kochmanski
d4370d1b31 re-add deprecation of rt and profile (rebase thing) 2018-05-08 19:36:11 +02:00
Marius Gerbershagen
b87fc19afb remove no longer needed checks in configure.ac 2018-05-08 19:36:11 +02:00
Marius Gerbershagen
a3a44a0eeb debugger: add C backtrace for windows
Because that needs the DbgHelp library, an additional make
    option has been defined for users, who don't want to link to this
    library. Some msvc Makefile cleanup has also been done.
2018-05-08 19:36:11 +02:00
Marius Gerbershagen
2279361383 debugger: add option to print C backtrace
Split si_dump_c_backtrace up into two functions:
    - _ecl_dump_c_backtrace() (already declared in internal.h, but not
      implemented) using only C functions printing to stderr to be used
      in case of internal errors
    - si_dump_c_backtrace() using lisp functions to be used in the
      debugger
    Remove broken emulation of backtrace and backtrace_symbols
    functions using __builtin_return_address.
2018-05-08 19:36:11 +02:00
Daniel Kochmanski
23d38639b2 define O_NONBLOCK to 0 for non-posix platforms
We use this flag in ecl_open_file to assure that fifos do not block.
2018-05-08 19:33:38 +02:00
Daniel Kochmanski
1972765ab0 fifo files: update documentation, tests and changelog 2018-05-08 19:12:19 +02:00
Daniel Kochmanski
0e84113f84 work better with FIFO files
- file-length always returns nil
- listen returns correct answer on subsequent reads
- open is non-blocking
- doesn't segfault

note that read still may block (not interruptibly!) if we open stream in IO
mode. process will block until other peer writes something to the stream.

Fixes #242.
2018-05-07 22:03:50 +02:00
Daniel Kochmanski
c35f98ef58 ecl_open_stream refactor
We rearrange the code and avoid unnecessary file operations with probe. Some
nesting is removed.
2018-05-07 22:03:50 +02:00
Daniel Kochmanski
d9c4b2a88c Add explicit :TRUNCATE option for :IF-EXISTS in OPEN
In the future we may want to make :SUPERSEDE transaction-like.
2018-05-07 22:03:50 +02:00
Daniel Kochmański
2fa20297b3 Merge branch 'develop' into 'develop'
add missing obj files to msvc Makefile

See merge request embeddable-common-lisp/ecl!107
2018-05-07 06:12:19 +00:00
Yuguo Zhang
008422d75d add missing obj files to msvc Makefile 2018-05-07 11:02:59 +08:00
Daniel Kochmański
7223534c61 Merge branch 'interface-cleanup' into 'develop'
Interface cleanup

See merge request embeddable-common-lisp/ecl!105
2018-05-04 08:41:13 +00:00
Daniel Kochmański
923997f69b Merge branch 'printer-addresses' into 'develop'
Printer addresses

Closes #440

See merge request embeddable-common-lisp/ecl!104
2018-05-04 08:38:33 +00:00
Daniel Kochmański
ca0962cdb3 Printer addresses 2018-05-04 08:38:33 +00:00
Daniel Kochmanski
0494fb1592 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
2018-05-01 10:16:20 +02:00
Daniel Kochmanski
c3244b0148 Remove deprecated 8-bit opcodes 2018-04-29 13:54:38 +02:00
Marius Gerbershagen
07391b9ced reader: be more ANSI compliant with *read-suppress*
We should not signal an error if we don't find a dispatch macro
    character and *read-suppress* is true. The following example from
    the CLHS documentation on *read-suppress* wrongly signaled an
    error:
      (let ((*read-suppress* t)) (read-from-string "#\garbage"))
    Fixes #431.
2018-04-24 22:42:10 +02:00
Marius Gerbershagen
7955a36b08 reader: signal different error when not finding an external symbol
Most other implementations signal a reader-error instead of a
    simple-error. Closes #438.
2018-04-24 21:28:41 +02:00
Marius Gerbershagen
58c5316ece bytecmp: Unify behaviour of nested eval-when forms with native compiler
The current behaviour may technically be ANSI compliant, but it
    differs from the behaviour of the native compiler and from many
    other Common Lisp implementations (sbcl, ccl, clisp, abcl and cmucl).
2018-04-21 18:14:28 +02:00
Marius Gerbershagen
b00e62f9d3 cmp: Allow for compile time evaluation of inlined forms
The following statement:
    (eval-when (:compile-toplevel :load-toplevel :execute)
      (print "test"))
    resulted in an error, since the compiler would expand the print
    statement in a FFI:C-INLINE form, which can't be evaluated at
    compile time.
2018-04-21 15:34:20 +02:00
Marius Gerbershagen
825c8d2b2e doc: Add section for C compiler configuration options
Closes #218.
2018-04-09 22:23:25 +02:00
Daniel Kochmanski
399b2357a1 remove unused function 2018-04-09 07:53:41 +02:00
Daniel Kochmanski
2c52e278cc Don't ensure GF in method macroexpansion time
Fixes #46.

Also some cosmetic fixes and test fix.
2018-04-08 21:05:37 +02:00
Daniel Kochmanski
28d245631e tests: add class-forward-reference regression test (fixed in last commit) 2018-04-08 11:09:11 +02:00
Daniel Kochmanski
ead9ab4f38 validate-superclass: return T when class is a forward-referenced-class
defclass calls indirectly ensure-class-using-class from builtin module which
calls make-instance on metaclass (which could be a forward-referenced
class). That triggers validate-superclass on

  (validate-superclass #<forward-ref-class> #<standard-class standard-object>)

which failed. This commit mitigates this situation. Problem was masked
because of *clos-boot* never been set to T (recently fixed).
2018-04-08 10:56:50 +02:00
Daniel Kochmanski
7f1bb5c59b tests: add two regression tests 2018-04-06 17:51:33 +02:00
Daniel Kochmanski
98f29d34b9 clos: don't allow subclassing builtin classes
This issue was discussed at some point in the past. See
https://gitlab.com/embeddable-common-lisp/ecl/issues/426 for some logs.

Fixes #426.
2018-04-06 17:36:06 +02:00
Daniel Kochmanski
d641c39bd9 clos: invalidate initarg caches when new methods are defined
Closes #425. Fix contributed by Bike from #clasp.
2018-04-06 16:36:36 +02:00
Daniel Kochmanski
3fd005d8df run-program: fix loop in pipe-stream
When we have called something like this

    (ext:run-program "true" nil :wait nil :output *standard-output*)

pipe-stream were running in a loop until someone has called
external-process-wait (or external-process-status). This was a hogging the
processor without a reason. Right now unless some other wait is already called
checks for the process status (and magically removes zombies).

Also always call sleep (not thread-yield), because this loop eats a lot of cpu
otherwise.
2018-04-06 15:56:15 +02:00
Daniel Kochmanski
59f74fc4be run-program: virtual streams: ensure that pipes are empty
After child has terminated we may still have something in pipes to copy. When
pipe-streams loop finishes check active pipes for data.
2018-04-06 13:37:54 +02:00
Daniel Kochmanski
17ce8c98d8 cosmetic: add some barebones comments and docs for bytecmp 2018-04-06 11:03:14 +02:00
Daniel Kochmański
297c4e4250 Merge branch 'develop' into 'develop'
Various changes

Closes #433

See merge request embeddable-common-lisp/ecl!102
2018-04-06 05:54:56 +00:00
Marius Gerbershagen
158cb84715 doc: fix makeinfo invocation failures
Some versions of makeinfo are quite strict about input files and
    don't allow whitespace between @macros and braces or nodes which
    are not referenced in some menu.
2018-04-04 21:27:11 +02:00
Marius Gerbershagen
dcfc987d81 fix wrong encodings reported by ext:all-encodings
:UCS-4LE was not in the list of basic encodings and the keywords
    for other encodings were mistakenly interned in lower
    case. Reported and fixed by Robert Dodier. Fixes #435.
2018-04-04 21:23:14 +02:00
Marius Gerbershagen
b8df7a777c cmp: execute cleanup forms of unwind-protect with interrupts disabled
Unifies behaviour with ECL_UNWIND_PROTECT.
2018-03-27 19:03:03 +02:00
Marius Gerbershagen
55d6367b6c cmp: add blocks around ecl_frs_push in generated C code
Avoids redefinition of __ecl_frs_push_result if e.g. two tagbodies
    follow each other in the same C block. This redefinition is an
    error in C and compilers will not accept the generated code.
2018-03-27 18:49:23 +02:00
Marius Gerbershagen
7b5361613b fix memory leak with bignums
Letting the gmp library use uncollectable allocations leads to
    leaks, if the bignums are not freed with mpz_clear. Since this
    can't be done without a finalizer, we have to use the standard
    allocation mechanism. Fixes #433.
2018-03-26 22:00:55 +02:00
Marius Gerbershagen
1b0ffbe6cc threading: fix race condition in mp_process_enable
Local variables were not declared volatile, so they could be
    changed by the setjmp call in ECL_UNWIND_PROTECT_BEGIN. This could
    lead to execution of the cleanup statements even though the thread
    creation was successfull and thus to segmentation faults.
2018-03-26 22:00:55 +02:00
Marius Gerbershagen
7467c9f0e8 add changelog entries for recent fixes 2018-03-26 22:00:48 +02:00
Marius Gerbershagen
b9c4c3fc90 tests: add stress test suite 2018-03-26 21:11:30 +02:00
Marius Gerbershagen
146b4a6ae1 cosmetic: fixed some typos and style issues 2018-03-26 21:11:11 +02:00
Marius Gerbershagen
9fe9334538 fix rounding error in ecl_stack_set_size
The size of the arguments stack would grow quadratically, instead
    of being rounded to the nearest bigger page size.
2018-03-23 21:57:45 +01:00
Daniel Kochmański
7bfa7e37b6 Merge branch 'develop' into 'develop'
docs: fix a typo in a code example

See merge request embeddable-common-lisp/ecl!101
2018-03-16 15:09:02 +00:00
Daniel Kochmański
c09256866f Merge branch 'threading-fixes' into 'develop'
Threading fixes

Closes #419

See merge request embeddable-common-lisp/ecl!100
2018-03-16 15:08:27 +00:00
Kris Katterjohn
ae2d5e98a3 new-doc: fix a typo in a sffi code example
This changes the incorrect keyword :on-liner to the
correct :one-liner
2018-03-12 15:25:28 -05:00