summaryrefslogtreecommitdiffstats
path: root/txr.spec
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-11-10 06:57:06 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-11-10 06:57:06 -0800
commit7c2b95c04cd3a0f566d076fa1ac2d8d93721b2ec (patch)
tree13ffcb7b051d146b71cda49f62ee576b32fac359 /txr.spec
parenta14217b8a4e507a7f75ccc8aa587a44ef0df2414 (diff)
downloadtxr-7c2b95c04cd3a0f566d076fa1ac2d8d93721b2ec.tar.gz
txr-7c2b95c04cd3a0f566d076fa1ac2d8d93721b2ec.tar.bz2
txr-7c2b95c04cd3a0f566d076fa1ac2d8d93721b2ec.zip
Implementing package foreign symbol concept.
* eval.c (eval_init): Register new intrinsics: package-local-symbols, package-foreign-symbols, use-sym, unuse-sym, use-package, unuse-package, unintern. * gc.c (mark_obj): Mark new hidhash member of struct package. * lib.c (make_package): Initialize new hidhash member of struct package. (lookup_package): New static function. (find_package): Allow string or symbol argument. (get_package): New static function. (delete_package, package_symbols): Use get_package for flexible package argument; delete_package removes symbols from other packages via unuse_package. (package_local_symbols, package_foreign_symbols): New functions. (use_sym, unuse_sym): New functions. (resolve_package_designators): New static function. (use_package, unuse_package): New functions. (symbol_present): New static function. (intern): Revised with get_package for flexible package argument. (unintern): New function. (rehome_sym): Use get_package. Semantics revised. (obj_print_impl): Use symbol_present function to determine whether object is visible in *package* and can be printed without a prefix, rather than naive home package test. * lib.h (struct package): New member, hidhash. (package_local_symbols, package_foreign_symbols, use_sym, unuse_sym, use_package, unuse_package, unintern): Declared. * txr.1: Documentation updated. Extended section introducing the design of packages, and argument conventions. New functions described. Existing function descriptions revised, particularly rehome-sym. Missing description of delete-package added.
Diffstat (limited to 'txr.spec')
0 files changed, 0 insertions, 0 deletions