summaryrefslogtreecommitdiffstats
path: root/genprotsym.txr
Commit message (Collapse)AuthorAgeFilesLines
* Sort groups by symbol in protsym.c.Kaz Kylheku2017-06-121-0/+1
| | | | | * genprotsym.txr: Sort groups so that the protsym.c deltas, going forward, are more stable.
* Eliminate some blank lines in protsym.c.Kaz Kylheku2017-06-121-2/+4
| | | | | | * genprotsym.txr: use @(first) directive trick to eliminate leading blank lines in front of items that are not controlled by a preprocessor symbol.
* protsym: further refinement.Kaz Kylheku2017-05-151-7/+19
| | | | | | | | | | | | | In sysif.c, we have conditionally defined symbol variables. This has to be reflected with #if directivec in protsym.c. * genprotsym.txr: Associate each symbol with a list of preprocessor symbols which controls it, via a hash. All symbols coming from a conditional file are tagged with a list which includes at least the controlling symbol. If symbols are wrapped with #if <sym> directives, that is added. Nesting is supported. We group the symbols according to their controlling preprocessor symbol lists.
* protsym: don't refer to symbols excluded by config.Kaz Kylheku2017-05-151-6/+34
| | | | | | | | | | | | | | | | The protsym.c generated file refers to symbol variables without regard for whether they actually exist. Some symbol variables are defined in source files whose object files are only linked in conditionally. * genprotsym.txr: Update the logic to scan the Makefile to determine which files are conditionally included, based on what makefile flag, which is related to a preprocessor symbol. Thus, with some hashes, for each symbolic variable we subsequently scan, we know whether it came from a file that is associated with a preprocessor symbol. We group the emitted material accordingly, placing the conditionally existent symbols into #if...#endif blocks.
* Protect internal symbols from uninterning.Kaz Kylheku2017-04-151-0/+32
Issue: TXR holds numerous symbol references in global variables, like list_s. These variables are not registered as root pointers with the garbage collector. This is normally okay because symbols are reachable via packages. However, if such a symbol is uninterned, that causes an integrity problem. Solution: protect those symbols from being removed from their packages. * Makefile (OBJS): Add protsym.o. * genprotsym.txr, protsym.c: New files. * lib.c (prot_sym_check): New static function. (use_sym, uintern, rehome_sym): Use prot_sym_check to implement a defense against internal symbols being booted out of their package.