Commit graph

8554 commits

Author SHA1 Message Date
Daniel Kochmański
ceddb1559b core: add a macro ecl_frs_pop_n 2023-11-23 08:02:38 +01:00
Daniel Kochmański
17f1c5b356 Merge branch 'stream-line-length' into 'develop'
Add gray:stream-line-length

See merge request embeddable-common-lisp/ecl!309
2023-11-22 21:03:29 +00:00
Daniel Kochmański
01322dc986 Update gray-streams.txi (fix typo) 2023-11-22 20:05:27 +00:00
Daniel Kochmański
f62622802c 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.
2023-11-22 13:45:23 +01:00
Tarn W. Burton
e0aa99c610
Update docs for gray-streams changes 2023-11-20 15:21:35 -05:00
Tarn W. Burton
0abaa78feb
Add gray:stream-line-length 2023-11-20 15:21:35 -05:00
Marius Gerbershagen
ac89091af1 Merge branch 'cmpc-separation' into 'develop'
Compiler pass separation

See merge request embeddable-common-lisp/ecl!292
2023-11-20 19:28:58 +00:00
Daniel Kochmański
931853d186 manual: include the file gray-streams.txi 2023-11-20 16:38:41 +01:00
Daniel Kochmański
ff136c7df6 Merge branch 'fix-stream-terpri' into 'develop'
Return NIL from stream-terpri

See merge request embeddable-common-lisp/ecl!310
2023-11-20 14:50:14 +00:00
Daniel Kochmański
d308c5cdfb cmp: object-type: do not depend on an exact type name
Previously object-type first called (TYPE-OF THING) and then matched it with
exact type names. This fails when we have a more precise type, i.e

   (type-of 3)                 -> (integer 3 3)
   (eq 'fixnum '(integer 3 3)) -> nil
   =>
   (object-type 3)             -> T

and that left us with subpar optimizations down the road.
2023-11-20 12:22:30 +01:00
Daniel Kochmański
6e161b5f44 cmp: add a comment that explains the purpose of the structure VV 2023-11-20 12:22:22 +01:00
Tarn W. Burton
a597fc07b1
Return NIL from stream-terpri 2023-11-19 14:27:35 -05:00
Daniel Kochmański
edfaec9a6b cmp: add a comment that explains the purpose of OPTIMIZE-CXX-DATA 2023-11-17 11:21:21 +01:00
Daniel Kochmański
1b8d1041dd cmp: optimize-cxx-data: reorder optimizations
Previously we've tried first to add-static-constnat, although that led to a
situation where we've created static constant even if we had that value in the
core. Right now a static constant is the last thing to try when we attempt to
optimize the object. The order is quite arbitrary - the comment before the
function explains that we could avoid coercion with some additional work.
2023-11-17 11:21:21 +01:00
Daniel Kochmański
3628a843ab cmp: rename c1form VAR to VARIABLE
This is more consistent with LOCATION and is less likely to be confused with
arguments named var.
2023-11-17 11:21:21 +01:00
Daniel Kochmański
16a6ef5e04 cmp: group c1form types in a more readable order 2023-11-17 11:21:21 +01:00
Daniel Kochmański
b70fac0112 cosmetic: minor fixes to the compiler 2023-11-17 11:21:21 +01:00
Daniel Kochmański
29d038a93c cmpc: fix the inliner for cl:expt to return 1 (not 0) for (expt 0 0)
The CL standard expects to always return 1 in that case.
2023-11-17 11:21:21 +01:00
Daniel Kochmański
7e63354631 cmpc: constant optimizers: don't create an intermediate location
We use now constant optimizers to update existing VV and there is no need to
box them in a location node.
2023-11-17 11:21:21 +01:00
Daniel Kochmański
2e732782ac cmp: move data inlining to the second pass
c1constant-value etc does not attempt to create inlined vv - it is the
responsibility of the data pre-processing pass.
2023-11-17 11:21:21 +01:00
Daniel Kochmański
fb4cd1ef26 cmpc: move more variables to the cxx backend 2023-11-17 11:21:21 +01:00
Daniel Kochmański
2304da9a83 cmpc: separate the data segment creation passes 2023-11-17 11:21:21 +01:00
Daniel Kochmański
debec42950 cmp: cleanup: move the function NEW-LOCAL to cmppass2-fun 2023-11-17 11:21:21 +01:00
Daniel Kochmański
e8f3609078 cmpc: split CALL-UNKNOWN-GLOBAL-LOC to -LOC and -FUN
Both variants have distinct and mutually exclusive (based on the code) usages.
Moreover, when dealing with a function name, always use FDEFINITION location.

This is a speculation, but only basic cases were handled with FDEFINITION
because WT-FDEFINITION could only handle symbols in CL package and otherwise a
slower method was used. WT-FDEFINITION can handle now all valid function names
including (SETF FOO) and function names not contained in core packages.
2023-11-17 11:21:21 +01:00
Daniel Kochmański
c7f0ed8bb5 cmp: data segment: add function names with ADD-FNAME
Instead of ADD-SYMBOL. The latter now asserts that the argument is a symbol. The
function name on the other hand may be a SYMBOL or (SETF SYMBOL).
2023-11-17 11:21:21 +01:00
Daniel Kochmański
8fd7a81f87 cmp: inline constants in the second pass
Also revert a kludge from the commit 8e3f1f0a36:
"cmp: add a kludge for C1CONSTANT-VALUE using *OPTIMIZABLE-CONSTANTS*".
2023-11-17 11:21:21 +01:00
Daniel Kochmański
05d7516691 cmp: c2var: take a vv as a second argument for constants 2023-11-17 11:21:21 +01:00
Daniel Kochmański
222ab1bfa4 cmp: don't pass "raw" boolean values in the second pass
T and NIL are expected to be wrapped in an intermediate structure representing
the value. This improves the separation between the host and the target language.
2023-11-17 11:21:21 +01:00
Daniel Kochmański
ba3afa81f3 cmp: constants: get rid of an edge case where we return a list 2023-11-17 11:21:21 +01:00
Daniel Kochmański
5427ba657b cmp: don't resolve floats and complex floats in the first pass
We remove *-VALUE location in favor of VV instances.
2023-11-17 11:21:21 +01:00
Daniel Kochmański
d2cda52d26 cmp: don't resolve characters in the first pass
We remove CHARACTER-VALUE location in favor of VV instances that does not have a
location.
2023-11-17 11:21:21 +01:00
Daniel Kochmański
3282f17b11 cmp: don't resolve fixnums in the first pass
We remove FIXNUM-VALUE location in favor of VV instances that does not have a
location.
2023-11-17 11:21:21 +01:00
Daniel Kochmański
0ee8c94894 cmp: handle-compiler-error: respect *compiler-break-enable* flag 2023-11-17 11:21:21 +01:00
Daniel Kochmański
2414e829cc tests: cmp: add regression tests for this branch 2023-11-17 11:21:21 +01:00
Daniel Kochmański
ad4002e578 Merge branch 'fix-typo' into 'develop'
Fix generic definition of stream-file-length

See merge request embeddable-common-lisp/ecl!308
2023-11-16 17:28:43 +00:00
Tarn W. Burton
dda901a394
Fix generic definition of stream-file-length 2023-11-16 12:26:40 -05:00
Daniel Kochmański
9c7c62ed7f Merge branch 'gray-file-length' into 'develop'
Add gray:stream-file-length

See merge request embeddable-common-lisp/ecl!307
2023-11-16 16:00:33 +00:00
Daniel Kochmański
2fb0e7d42c 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
2023-11-16 13:34:25 +00:00
Tarn W. Burton
edd88aac45
Add gray-streams module to avoid use of redefine-cl-functions 2023-11-15 12:30:08 -05:00
Tarn W. Burton
b9a7d06635
Add gray:stream-file-length 2023-11-12 16:14:34 -05:00
Daniel Kochmański
2eb24b09d7 Merge branch 'various-compiler-improvements' into develop 2023-10-30 12:02:50 +01:00
Marius Gerbershagen
3f03a0c686 cmp: fix caching of type specifiers
We cannot compare with (equal) here because subtype relations can
differ for member and eql types even if the type specifiers are the
same under equal.
2023-10-30 12:01:21 +01:00
Marius Gerbershagen
b65b7d3825 cmp: expand compiler macros for callsites in the same source file as the compiler macro definition 2023-10-30 12:01:21 +01:00
Marius Gerbershagen
1bbae5a0bc cmp: fix incorrect type proclamations 2023-10-30 12:01:20 +01:00
Marius Gerbershagen
58c5782fe7 cmp: also perform type propagation in disassemble 2023-10-30 12:01:20 +01:00
Marius Gerbershagen
8ef84d3a9b cmp: improve error message for wrong number of arguments
Mention the function name if available. Also refactor the code a bit.
2023-10-30 12:01:18 +01:00
Marius Gerbershagen
d437bd0779 speed up looking up and setting values of dynamic variables
Introduce ecl_cmp_symbol_value and ecl_cmp_setq which do the minimal
amount of work needed to implement symbol-value and setq for dynamic
variables which we have checked to be non-null and of type symbol in
the compiler.

Also introduce a type check in ecl_symbol_value to be consistent with
ecl_setq which also checks the type. These two functions are mainly
used for the embedding interface now, so for that reason it is also
useful to have a type check in there.
2023-10-30 12:01:18 +01:00
Marius Gerbershagen
52e62805dd remove ECL_SAFE option
This is inconsistently implemented in that only very few places
actually check for proper lists. Moreover, it slows down code that
uses those functions a lot.
2023-10-30 12:01:18 +01:00
Daniel Kochmański
27b7c9f8d8 Merge branch 'develop' into 'develop'
Don't enable GC fork() support on Windows

See merge request embeddable-common-lisp/ecl!305
2023-10-23 05:27:34 +00:00
Mark Shroyer
fcaab573cc 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.
2023-10-22 20:22:09 -07:00