Commit graph

8681 commits

Author SHA1 Message Date
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
Daniel Kochmański
2f8f7c0ada cmp: inl: fix a braino in emit-inlined-call-global 2024-01-26 12:07:20 +01:00
Daniel Kochmański
f68c911ece cmp: allow specifying the type of vv
This will be useful for inline locations where we don't know the real value, but
we can infer the type.
2024-01-26 12:07:20 +01:00
Daniel Kochmański
7dc7bda980 cmp: rename predicates to conform to the common style
local   -> local-var-p
unboxed -> unboxed-var-p
2024-01-26 12:07:20 +01:00
Daniel Kochmański
a07b39ad65 cmp: cleanup: rename REP-TYPE to HOST-TYPE
The name HOST-TYPE is less ambiguous.
2024-01-26 12:07:20 +01:00
Daniel Kochmański
00f96d34b0 tests: make ansi-test a separate target not triggered by make check 2024-01-26 12:06:19 +01:00
Daniel Kochmański
ba45731c19 Merge branch 'gray-path' into 'develop'
Add generic PATHNAME and TRUENAME

See merge request embeddable-common-lisp/ecl!320
2024-01-26 08:15:53 +00:00
Daniel Kochmański
e851458058 Merge branch 'type-check-init-forms' into 'develop'
cmp: check that the type of init-forms for optional and keyword arguments matches their proclaimed types

See merge request embeddable-common-lisp/ecl!316
2024-01-26 08:14:20 +00:00
Tarn W. Burton
47c2663955
Update changelog for generic pathname/truename 2024-01-25 14:06:37 -05:00
Tarn W. Burton
bc6e31f926
Add generic pathname/truename 2024-01-25 14:05:27 -05:00
Daniel Kochmański
3850dcf5d7 Merge branch 'gray-string-length' into 'develop'
Add Gray extension for file-string-length

See merge request embeddable-common-lisp/ecl!318
2024-01-24 12:47:38 +00:00
Daniel Kochmański
4649258796 Merge branch 'ansi-test' into 'develop'
Add ansi-test to tests

See merge request embeddable-common-lisp/ecl!319
2024-01-24 12:45:10 +00:00
Tarn W. Burton
417cf25bc4
Add ansi-test to tests 2024-01-14 13:30:49 -05:00
Daniel Kochmański
5b4e355697 Merge branch 'update-license-to-lgpl-2.1-or-later' into 'develop'
cleanup: update license to lgpl-2.1+ in both headers and text

See merge request embeddable-common-lisp/ecl!317
2024-01-14 11:57:08 +00:00
Daniel Kochmański
3e37843a33 cleanup: update license to lgpl-2.1+ in both headers and text 2024-01-14 12:22:27 +01:00
Tarn W. Burton
10fa901e98
Update for gray:stream-file-string-length 2024-01-13 10:32:59 -05:00
Tarn W. Burton
e554673006
Add support for gray:stream-file-string-length 2024-01-13 10:26:35 -05:00
Marius Gerbershagen
0be6cd09a6 cmp: don't forget the type check for keyword arguments initialized to nil
For keyword arguments initialized to nil, we were previously not
checking the type of the argument at all.
2023-12-30 18:47:46 +01:00
Marius Gerbershagen
561b09a8ce cmp: check that the type of init-forms for optional and keyword arguments matches their proclaimed types
For now, we only check constant init forms where we can do the check
at compile time.
2023-12-30 18:41:15 +01:00
Daniel Kochmański
db4e3a0013 Merge branch 'dead-code-elimination' into 'develop'
Better dead code elimination and type propagation

See merge request embeddable-common-lisp/ecl!315
2023-12-30 13:06:29 +00:00
Marius Gerbershagen
d500109d07 cmp: fix a few type declarations 2023-12-30 13:31:55 +01:00
Marius Gerbershagen
49ea8975ee Makefile.in: add cmp/cmpbackend-cxx files 2023-12-30 13:31:55 +01:00
Marius Gerbershagen
fdcbe9458d cmp: better dead code elimination
Eliminate dead branches in IF/AND/OR forms if the type of the object
returned by the test form is known to be null or non-null. Get rid of
unnecessary tests in AND/OR forms if we know that a clause cannot
short-circuit the evaluation. Replace NOT forms by T or NIL constants
if we know that the argument is null or non-null.
2023-12-30 13:31:55 +01:00
Marius Gerbershagen
b5dbba1f68 cmp: improvements for (c1nil) and (c1t)
Make the types more precise to improve type propagation. We will fall
back to using object-type as appropriate in later stages of the
compilation.

Also return a new copy for each invocation instead of the same *c1nil*
and *c1t* since we may later set the type of the c1form (e.g. in
enforce-types). This can happen for invalid code which can permanently
set the type of *c1nil* to NIL, leading to miscompilations later on
for unrelated valid code.
2023-12-30 12:39:49 +01:00
Marius Gerbershagen
c474f33fa9 cmp: object-type: nil should have type NULL instead of SYMBOL 2023-12-30 12:39:49 +01:00
Marius Gerbershagen
8cd985961c cmp: improve type propagation for (and), (or), (if) and (not)
Fix errors in handling values types for (and) and (or) (all forms but
the last form return only the primary value). Also be more precise if
branches are not taken or the evaluation is known to short circuit.
2023-12-30 12:39:48 +01:00
Marius Gerbershagen
e0cd45299d Merge branch 'cmpc-refactor-next' into 'develop'
Futher refactor of the compiler

See merge request embeddable-common-lisp/ecl!313
2023-12-28 13:31:03 +00:00
Daniel Kochmański
a230243c97 cmp: loc-refers-to-special-p: more precise check for BIND 2023-12-28 12:50:37 +01:00
Daniel Kochmański
6fb6c7790f cmp: variable holding function has gensym as a name
Previously we've named the function's variable with the function name. That
could lead to a varible named (SETF FOO), and that can break down the road
because variable names are assumed to be symbols.

Moreover this change will prevent a possible fail scenario where we inline a
constant value with a known name instead of the function with the same name.
2023-12-28 12:46:24 +01:00