ecl/src/c
Daniel Kochmański 6aa02de4c4 compiler: better checking whether a variable may be introduced
Previously c1make-var checked whether the symbol NAME is CONSTANTP, but
ECL expands symbol macros in CONSTANTP so this returned false positives.
A similar concern applied to the CMP-ENV-REGISTER-SYMBOL-MACRO-FUNCTION.

C1EXPR-INNER when encountered a symbol tried to yield C1CONSTANT-VALUE
for if it iwas CONSTANTP - this was correct except for that we didn't
pass the environment to the predicate and symbols weren't shadowed.

In this commit one function is added to the core - si:constp (with
similar purpose to si:specialp) and one function to the compiler -
constant-variable-p (similar to special-variable-p) and they are
appropriately used when necessary. A regression test is added.

Fixes #662.
2021-11-19 11:56:23 +01:00
..
arch cleanup: remove unused code 2019-07-16 09:04:46 +02:00
clos cosmetic: fix some compiler warnings 2020-04-29 20:35:37 +02:00
coverity
ffi pathnames: handle unicode characters 2021-08-19 14:00:28 +02:00
numbers cosmetic: fix some compiler warnings 2020-04-29 20:35:37 +02:00
printer printer: fix printing of symbols with non-ascii names 2020-05-06 21:04:28 +02:00
reader bignums: fix wrong usage of bignum registers 2020-01-17 18:03:26 +01:00
threads multithreading: implement optional timeout for mp:get-lock 2021-08-29 17:25:21 +02:00
unicode unicode: update unicode character database to version 13.0.0 2021-05-07 21:09:09 +02:00
all_symbols.d tree-wide: use new dpp @"" specifier for constant base strings where appropriate 2021-03-12 19:53:33 +01:00
alloc_2.d multithreading: read-write-lock improvements 2021-08-29 17:25:21 +02:00
apply.d apply: remove case for 64 arguments 2019-07-19 14:30:53 +02:00
array.d long-float: remove conditionalization 2019-05-24 21:04:59 +00:00
assignment.d fix for calling conventions treating fixed and variadic arguments differently 2019-12-08 10:26:52 +01:00
backq.d indent: indent files according to GNU standard 2016-05-05 13:40:27 +02:00
big.d fix fixint and fixnnint for apis with long smaller than cl_fixnum 2020-03-01 18:49:49 +01:00
big_ll.d indent: indent files according to GNU standard 2016-05-05 13:40:27 +02:00
cfun.d tree-wide: use new dpp @"" specifier for constant base strings where appropriate 2021-03-12 19:53:33 +01:00
cfun_dispatch.d fix for calling conventions treating fixed and variadic arguments differently 2019-12-08 10:26:52 +01:00
char_ctype.d char_ctype.d: use new ucd.h header features instead of hardcoded constants 2021-05-07 21:09:09 +02:00
character.d fix some compiler warnings 2020-12-29 18:18:26 +01:00
cinit.d Use bdwgc macros to allow memory debug. 2017-09-19 00:23:47 -04:00
cmpaux.d compiler: better checking whether a variable may be introduced 2021-11-19 11:56:23 +01:00
compiler.d remove register storage class specifier 2021-07-17 12:13:05 +02:00
cons.d indent: indent files according to GNU standard 2016-05-05 13:40:27 +02:00
disassembler.d tree-wide: use new dpp @"" specifier for constant base strings where appropriate 2021-03-12 19:53:33 +01:00
dpp.c fix some compiler warnings 2020-12-29 18:18:26 +01:00
ecl_constants.h long-float: remove conditionalization 2019-05-24 21:04:59 +00:00
ecl_features.h multithreading: read-write-lock improvements 2021-08-29 17:25:21 +02:00
error.d multithreading: implement mutexes and condition variables using OS primitives 2021-08-29 17:23:19 +02:00
eval.d apply_from_stack_frame: use correct frame base 2019-07-23 18:45:24 +02:00
ffi.d ffi: use mp_get_lock_wait instead of mp_get_lock 2020-06-15 12:34:10 +02:00
file.d external-formats: fix several typos in utf16 de/encoders 2021-09-04 17:52:33 +02:00
format.d tree-wide: use new dpp @"" specifier for constant base strings where appropriate 2021-03-12 19:53:33 +01:00
hash.d ieee_fp: use explicit checks for fpe bits if feenableexcept is not declared 2020-01-11 15:32:52 +01:00
interpreter.d remove register storage class specifier 2021-07-17 12:13:05 +02:00
iso_latin_names.h c-indent: g-n 2016-05-05 16:28:32 +02:00
list.d threading: add support for atomic operations 2018-10-15 19:55:39 +02:00
load.d Merge branch 'pathname-encoding' into 'develop' 2021-08-20 10:44:46 +00:00
macros.d Cosmetic fixes to bytecodes compiler. 2018-02-12 16:01:02 +01:00
main.d multithreading: replace various synchronization objects by native mutexes 2021-08-29 17:23:20 +02:00
Makefile.in src/c/Makefile.in: Respect LDFLAGS for dpp 2021-11-05 12:36:46 +01:00
mapfun.d Remove FEprogram_error_noreturn and replace uses with FEprogram_error 2017-06-29 17:24:54 -05:00
multival.d c-indent: g-n 2016-05-05 16:28:32 +02:00
newhash.h remove register storage class specifier 2021-07-17 12:13:05 +02:00
num_arith.d numbers: use fast dispatch in ecl_integer_divide (round) 2019-05-05 10:38:02 +02:00
num_co.d numbers: remove unnecessary workarounds for single-float numeric functions 2020-04-25 18:01:00 +02:00
num_log.d c-indent: g-n 2016-05-05 16:28:32 +02:00
num_pred.d ieee-fp: fix ext:float-{infinity/nan}-p 2019-08-14 20:51:40 +02:00
num_rand.d long-float: remove conditionalization 2019-05-24 21:04:59 +00:00
number.d cosmetic: fix some compiler warnings 2020-04-29 20:35:37 +02:00
package.d package.d: find_pending_package: add missing return statement 2020-12-27 19:56:55 +01:00
pathname.d pathnames: handle unicode characters 2021-08-19 14:00:28 +02:00
predicate.d remove register storage class specifier 2021-07-17 12:13:05 +02:00
print.d printer/reader: call user defined write/read-sequence methods for CLOS streams 2018-06-06 22:32:22 +02:00
read.d tree-wide: use new dpp @"" specifier for constant base strings where appropriate 2021-03-12 19:53:33 +01:00
reference.d cosmetic: fix indent (rest of C) 2016-05-06 08:41:52 +02:00
sequence.d cosmetic: fix some compiler warnings 2020-04-29 20:35:37 +02:00
serialize.d long-float: remove conditionalization 2019-05-24 21:04:59 +00:00
sse2.d cosmetic: fix indent (rest of C) 2016-05-06 08:41:52 +02:00
stacks.d remove register storage class specifier 2021-07-17 12:13:05 +02:00
string.d add convenience methods for de-/encoding strings and wide-strings from C 2021-08-19 13:51:55 +02:00
structure.d internals: rename instance.sig to instance.slotds 2020-04-19 17:04:42 +02:00
symbol.d tree-wide: use new dpp @"" specifier for constant base strings where appropriate 2021-03-12 19:53:33 +01:00
symbols_list.h compiler: better checking whether a variable may be introduced 2021-11-19 11:56:23 +01:00
tcp.d clean up functions creating base strings from C strings 2019-01-07 18:43:55 +01:00
time.d time.d: allow for interrupts during (sleep) on Windows 2021-08-29 17:25:21 +02:00
typespec.d tree-wide: use new dpp @"" specifier for constant base strings where appropriate 2021-03-12 19:53:33 +01:00
unixfsys.d pathnames: handle unicode characters 2021-08-19 14:00:28 +02:00
unixint.d multithreading: replace various synchronization objects by native mutexes 2021-08-29 17:23:20 +02:00
unixsys.d run-program: remove redundant finalizer for windows handles 2021-06-12 21:26:47 +02:00
vector_push.d cosmetic: vp 2016-05-06 08:43:40 +02:00