Commit graph

8959 commits

Author SHA1 Message Date
Tarn W. Burton
e001df1589 Add support for gray:stream-file-string-length 2024-03-10 14:48:12 +01:00
Daniel Kochmański
83359fdea0 Merge branch 'stream-line-length' into 'develop'
Add gray:stream-line-length

See merge request embeddable-common-lisp/ecl!309
2024-03-10 14:48:11 +01:00
Daniel Kochmański
d31735ed3e core: argument checking in si:get-limit and si:set-limit
Previously we've falled through all cases and if none matched, we've used the
heap. That said our documentation clearly states, that the type for the heap is
EXT:HEAP-SIZE.
2024-03-10 14:48:11 +01:00
Daniel Kochmański
e799b2972b Update gray-streams.txi (fix typo) 2024-03-10 14:48:11 +01:00
Daniel Kochmański
8d2fb75ee1 manual: include the file gray-streams.txi 2024-03-10 14:48:11 +01:00
Tarn W. Burton
71c0ec4d5b Update docs for gray-streams changes 2024-03-10 14:48:11 +01:00
Daniel Kochmański
e628211be7 Merge branch 'fix-stream-terpri' into 'develop'
Return NIL from stream-terpri

See merge request embeddable-common-lisp/ecl!310
2024-03-10 14:48:11 +01:00
Tarn W. Burton
b212055687 Add gray:stream-line-length 2024-03-10 14:48:11 +01:00
Daniel Kochmański
124e3e793e Merge branch 'fix-typo' into 'develop'
Fix generic definition of stream-file-length

See merge request embeddable-common-lisp/ecl!308
2024-03-10 14:48:11 +01:00
Tarn W. Burton
052411eb9c Return NIL from stream-terpri 2024-03-10 14:48:11 +01:00
Daniel Kochmański
5ffb878705 Merge branch 'gray-file-length' into 'develop'
Add gray:stream-file-length

See merge request embeddable-common-lisp/ecl!307
2024-03-10 14:48:11 +01:00
Tarn W. Burton
1e2cb370c5 Fix generic definition of stream-file-length 2024-03-10 14:48:11 +01:00
Daniel Kochmański
918c389078 Merge branch 'gray-streams-module' into 'develop'
Add gray-streams module to avoid use of redefine-cl-functions

See merge request embeddable-common-lisp/ecl!306
2024-03-10 14:48:11 +01:00
Tarn W. Burton
45af71be53 Add gray:stream-file-length 2024-03-10 14:48:11 +01:00
Daniel Kochmański
26d95e8d4f Merge branch 'develop' into 'develop'
Don't enable GC fork() support on Windows

See merge request embeddable-common-lisp/ecl!305
2024-03-10 14:48:11 +01:00
Tarn W. Burton
239f329ee6 Add gray-streams module to avoid use of redefine-cl-functions 2024-03-10 14:48:11 +01:00
Daniel Kochmański
798e3469e3 Merge branch 'gc-handle-fork' into 'develop'
Enable handle fork by GC

Closes #718

See merge request embeddable-common-lisp/ecl!303
2024-03-10 14:48:11 +01:00
Mark Shroyer
3aab298147 Don't enable GC fork() support on Windows
A previous commit unconditionally configures Boehm GC to support fork.
This breaks the Windows MSVC build, producing an error dialog with the
message "Fatal error in GC: fork() handling unsupported".

This commit restricts the call to GC_set_handle_fork to non-Windows
hosts.
2024-03-10 14:48:11 +01:00
Marius Gerbershagen
13bb247fcf Merge branch 'environ_legacy' into 'develop'
Fix access to environ on Darwin

See merge request embeddable-common-lisp/ecl!301
2024-03-10 14:48:11 +01:00
Kirill A. Korinsky
aac7fa0ca6 Enable handle fork by GC 2024-03-10 14:48:11 +01:00
Daniel Kochmański
660538a843 cosmetic: fix indent 2024-03-10 14:48:11 +01:00
Kirill A. Korinsky
580fe0f092 Fix access to environ on Darwin 2024-03-10 14:48:11 +01:00
Daniel Kochmański
d626f591d0 build: move HAVE_POSIX_RWLOCK to exported config
This is b ecause we use this flag to decide whether the rwlock is implemented
from posix or whether we use our own structure. That influences the size and
offsets in cl_core. Without this commit using

(defun known-signals ()
  (ffi:c-inline nil nil :object "cl_core.known_signals"
                        :one-liner t :side-effects nil))

While HAVE_POSIX_RWLOCK was true during the build returns garbage. The same
applies to other members after the processes group.
2024-03-10 14:48:11 +01:00
Daniel Kochmański
142cb47f47 cosmetic: reindent file unixint.d 2024-03-10 14:48:11 +01:00
Daniel Kochmański
d3e4cb5442 main: fix ECL_OPT_SIGNAL_HANDLING_THREAD to be adequate
unixint ignores the flag that enables the signal handling thread when it can't
create one.
2024-03-10 14:48:11 +01:00
Marius Gerbershagen
d336b3053d implement faster function calls
The previous function call sequence for ordinary global functions
looked as follows.

1. check whether the function is defined, i.e. whether
   symbol->symbol.gfdef is not NULL
2. set the_env->function to symbol->symbol.gfdef
3. call the function pointer symbol->symbol.gfdef->cfun.entry

This commit implements a performance optimization that enables us to
skip the first step. The basic idea is to replace symbol->symbol.gfdef
with a closure that signals an undefined-function condition.

However, straightforwardly implementing this would have the
disadvantage that it would consume a larger amount of memory for each
symbol without a function definition. To get around this, we reorder
the fields of the ecl_symbol struct such that the symbol can serve as
the function object itself, introducing an entry point that is only
used for undefined functions.

Benchmarking shows an improvement of about 10% in thight loops
compared to the old method.
2024-03-03 18:26:47 +01:00
Marius Gerbershagen
3b4aeb6e2b cmp: don't create an unnecessary function object for local calls
This prevents further optimizations down the line. By processing
`(function ,fname) with C1EXPR we treat the function as having been
referenced via a function object. Among other things this will prevent
the function from being a lexical closure as the compiler doesn't know
that this function object is unused.
2024-03-03 18:25:28 +01:00
Marius Gerbershagen
9943a7ee21 Merge branch 'partmedia/manual' into 'develop'
Improve examples in the manual

See merge request embeddable-common-lisp/ecl!323
2024-03-02 15:14:10 +00:00
Kevin Zheng
a0e02e81ba Improve examples in the manual 2024-02-28 11:10:27 -08:00
Daniel Kochmański
38a2e31e45 Merge branch 'emscripten-shared-library-build' into 'develop'
Improvements for emscripten target

See merge request embeddable-common-lisp/ecl!321
2024-02-25 10:19:15 +00:00
Marius Gerbershagen
bca56f7d2f use flatinstall as install target for emscripten 2024-02-24 22:30:16 +01:00
Marius Gerbershagen
dccecf683d Makefile: allow both install and flatinstall targets 2024-02-24 22:30:16 +01:00
Marius Gerbershagen
693761a9f6 support shared libraries for the emscripten target 2024-02-24 22:30:16 +01:00
Daniel Kochmański
9f27c69db7 Merge branch 'win-scripts-update' into 'develop'
Fix Windows scripts (quotes missing)

See merge request embeddable-common-lisp/ecl!322
2024-02-03 10:56:33 +00:00
Dmitry Solomennikov
e5e03bfa59 Fix Windows scripts (quotes missing)
Signed-off-by: Dmitry Solomennikov <dmitrys99@mail.ru>
2024-02-03 13:49:49 +03:00
Daniel Kochmański
58658ddb22 manual: fix typo 2024-02-01 20:13:21 +01:00
Daniel Kochmański
bcc8bf1769 manual: rewrite confusing section in the documentation 2024-02-01 20:05:15 +01:00
Marius Gerbershagen
f95fa099b3 ecl_homedir_pathname: fix error message for unknown user
Fixes #724
2024-01-28 11:50:31 +01:00
Marius Gerbershagen
082c5cefac Merge branch 'cmpc-rework-inline-args' into 'develop'
Remove friction between inlined args and normal locations

See merge request embeddable-common-lisp/ecl!314
2024-01-27 15:21:53 +00:00
Daniel Kochmański
076d0d07ae cmp: set-loc: explain how values are handled and remove INLINE-ARG0 2024-01-26 13:20:14 +01:00
Daniel Kochmański
3ae6fadac7 cmp: small changes to c1form-*-p
c1form-movable-p uses c1form-pure-p

  The predicate opencoded the exact body of the latter.

c1form-unmodified-p does not explicitly check for global-var-p

  The function VAR-CHANGED-IN-FORM-LIST takes care of special and global
  variables, so there is no need for an explicit check. When the variable is
  global and no form has sp-change, then it is still unmodified.
2024-01-26 12:07:20 +01:00
Daniel Kochmański
63ca129a79 cmp: cleanup: use with-c1form-env in applicable places
c2expr, t2expr, t3function all uses the macro now. That yields gives better
introspection environment and more regular handling.

Additionally bind a new variable *CURRENT-C1FORM*.
2024-01-26 12:07:20 +01:00
Daniel Kochmański
c69963f47c cmp: add a function coerce-loc and don't call directly wt-coerce-loc
This allows to inline coerce-loc inside a wt statement:

    (wt "value0=" (coerce-loc loc :object) ";")
2024-01-26 12:07:20 +01:00
Daniel Kochmański
2690dde0d3 cmp: inl: tighter type bounds for inlined arguments
Also improve PRECISE-LOC-LISP-TYPE to AND both types instead of picking the "new
type".
2024-01-26 12:07:20 +01:00
Daniel Kochmański
e97d3c6219 cmp: rework loc types and rename functions
loc-type -> loc-lisp-type (mirrors loc-host-type)
precise-loc-type -> precise-loc-lisp-type (consistency)

Introduce a new WT element in the table FRAME++, with this we don't need to
consider raw strings as locations.

LOC-LISP-TYPE and LOC-HOST-TYPE has tighter checks for types that bark on
unknown location types. When the location is a symbol, we check against all
known atomic locations (cons checks are more lax at the moment).
2024-01-26 12:07:20 +01:00
Daniel Kochmański
73605c9ba9 cmp: inl: rewrite c2psetq for consistency
This function is now written in the same spirit as EMIT-INLINE-FORM and uses
WITH-INLINE-BLOCKS.
2024-01-26 12:07:20 +01:00
Daniel Kochmański
cae5241a8b cmp: inl: add a new function coerce-args derived from coerce-locs
COERCE-LOCS optional parameters were used only by produce-inline-loc. All other
uses were much simpler, so we've spinned a separate function and removed
optionality of arguments in coerce-locs.
2024-01-26 12:07:20 +01:00
Daniel Kochmański
44088b8886 cmp: inl: use the most specific location type for argument inlining
This commit effectively retires the function MAKE-INLINE-ARG in favor of more
specific location `(THE ...).
2024-01-26 12:07:20 +01:00
Daniel Kochmański
b1bebbdb2c cmp: inl: remove the friction between inlined args and locations
Previously inlined args were not treated as locations (they were CONS, and later
INLINED-ARG). This commit makes inlined args VV instances with an appropriate
type assigned. Thanks to that we may use location operations directly on
arguments.
2024-01-26 12:07:20 +01:00
Daniel Kochmański
c7da5bc919 cmp: inl: remove dead code
SI:STRUCTURE-REF, SI:STRUCTURE-SET, SI:INSTANCE-REF, SI:CALL-GLOBAL were all
removed or merged with other operators.

SI:CALL-GLOBAL was incorporated recently to FCALL. In upcoming commits we will
sort this out in a more regular way (by introducing an FCALL-ARG destination).
2024-01-26 12:07:20 +01:00