Daniel Kochmański
77f0810d22
cmp: c2catch uses GENSYM instead of incrementing *last-label*
...
The assigned "code" is only part of the comment, so it is clearly not the label.
2023-11-25 18:48:59 +01:00
Daniel Kochmański
97411d9e32
cmp: unwind-exit: remove unused optional argument
...
We move jump-p flag to aux variables.
2023-11-25 18:48:59 +01:00
Daniel Kochmański
255e229519
cmp: factor out wt-install-function from c2fset
2023-11-25 18:48:59 +01:00
Daniel Kochmański
cebb13f979
cmp: don't allow for t2expr arguments not being c1forms.
2023-11-25 18:48:59 +01:00
Daniel Kochmański
51da30dd61
cmp: move build-debug-lexical-env to cmppass2-var
2023-11-25 18:48:59 +01:00
Daniel Kochmański
0041e7d8da
cmp: use correctly with-exit-label
...
Previusly we've duplicated some code with regard to this macro, most notably
we've bound *exit* separately to label instead of passing it as a first arg.
2023-11-25 18:48:59 +01:00
Daniel Kochmański
7541d813ea
cmp: improve code locality in cmppass2-var
2023-11-25 18:48:59 +01:00
Daniel Kochmański
cd936a36f4
cmp: update *destinations* description and remove dead code
2023-11-25 18:48:59 +01:00
Daniel Kochmański
af3d3a00c8
cmp: with-compiler-env: handle COMPILER-INTERNAL-ERROR first
...
We've handled COMPILER-ERROR before COMPILER-INTERNAL-ERROR, but the latter is
a subclass of the former, so it was never triggered.
2023-11-25 18:48:59 +01:00
Daniel Kochmański
3f2f935411
cmp: minor changes to emit-functions
2023-11-25 18:48:59 +01:00
Daniel Kochmański
e54b944e7a
cmp: don't refer to module functions as local-funs
...
It is a historical baggage from before FSET. Functions stored in *local-funs*
are both local and global, so sipmly rename it to *functions*.
2023-11-25 18:48:56 +01:00
Daniel Kochmański
746f853b70
cmp: remove unused mechanism for "sharing" function bodies
2023-11-23 08:02:38 +01:00
Daniel Kochmański
b7ad56faff
cmp: cleanup: remove a misleading comment for VAR-LOC
...
In the past VAR-LOC in the first pass could have a value 'CLB to indicate, that
it can't be allocated on the C stack. But somewhere along the way the structure
gained a separate slot REF-CLB that indicates that and VAR-LOC in the 1st pass
is /always/ OBJECT.
Update comments to reflect that fact and remove no-op assignments.
2023-11-23 08:02:38 +01:00
Daniel Kochmański
b9301789d0
cmp: add a new utility cl:emptyp for collections
2023-11-23 08:02:38 +01:00
Daniel Kochmański
e536bc56ab
cmp: cxx: don't waste space when printing comments
...
We make the line length 80ch and print comment immedietely after "/* ".
2023-11-23 08:02:38 +01:00
Daniel Kochmański
6722d4b9da
cmp: cxx: move the cxx code generator to cmppass2-top
2023-11-23 08:02:38 +01:00
Daniel Kochmański
e287445b98
cmp: exit manager: remove obsolete tags and fix typos
...
- remove tags number and jump (unknown purpose)
- update the comment to include RETURN-{LONG-FLOAT,C?FLOAT}
- fix typos where RETURN-CSFLOAT was repeated thrice
2023-11-23 08:02:38 +01:00
Daniel Kochmański
ec2a74b300
cmp: remove obsolete specialized c1form named CL:RPLACD
...
This c1form is not created nor handled in the compiler anymore.
2023-11-23 08:02:38 +01:00
Daniel Kochmański
b228ae7867
cmp: cleanup: c2mvb: don't create unused local variable
2023-11-23 08:02:38 +01:00
Daniel Kochmański
3f95f88573
cmp: rename C?VAR to C?VARIABLE
2023-11-23 08:02:38 +01:00
Daniel Kochmański
44f33cb251
cmp: cleanup of predicates loc-with-*-p
...
We first explicitly test for an ATOM and after that we use CASE.
2023-11-23 08:02:38 +01:00
Daniel Kochmański
fa9a985b08
cmp: cosmetic changes
2023-11-23 08:02:38 +01:00
Daniel Kochmański
be68897012
cmp: defpackage uses strings instead of uninterned symbols
2023-11-23 08:02:38 +01:00
Daniel Kochmański
5bf5ec4f80
bytecmp: fix outdated comments
2023-11-23 08:02:38 +01:00
Daniel Kochmański
5aa1a52db2
bytecmp: remove unused defines
2023-11-23 08:02:38 +01:00
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
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