summaryrefslogtreecommitdiff
path: root/module/ice-9/sandbox.scm
Commit message (Collapse)AuthorAgeFilesLines
* Remove unnecessary module imports.Ludovic Courtès2023-02-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were found with: make GUILE_WARNINGS='-W1 -Wunused-module' * module/ice-9/copy-tree.scm: * module/ice-9/eval-string.scm: * module/ice-9/getopt-long.scm: * module/ice-9/poll.scm: * module/ice-9/popen.scm: * module/ice-9/sandbox.scm: * module/ice-9/threads.scm: * module/sxml/apply-templates.scm: * module/sxml/simple.scm: * module/system/base/types.scm: * module/system/repl/command.scm: * module/system/repl/common.scm: * module/system/repl/coop-server.scm: * module/system/repl/debug.scm: * module/system/repl/error-handling.scm: * module/system/repl/repl.scm: * module/system/repl/server.scm: * module/system/vm/assembler.scm: * module/system/vm/disassembler.scm: * module/system/vm/dwarf.scm: * module/system/vm/elf.scm: * module/system/vm/frame.scm: * module/system/vm/inspect.scm: * module/system/vm/linker.scm: * module/system/vm/program.scm: * module/system/vm/trace.scm: * module/system/vm/trap-state.scm: * module/system/vm/traps.scm: * module/system/xref.scm: * module/texinfo/indexing.scm: * module/texinfo/plain-text.scm: * module/texinfo/reflection.scm: * module/texinfo/string-utils.scm: * module/web/client.scm: * module/web/http.scm: * module/web/request.scm: * module/web/response.scm: Remove imports of unused modules.
* bitvector-count-bits replaces bit-count*Andy Wingo2020-04-291-1/+1
| | | | | | | | | | | | * NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/bitvectors.h: * libguile/bitvectors.c (scm_c_bitvector_count_bits): New function. * libguile/deprecated.h: * libguile/deprecated.c (scm_bit_count_star): Deprecate. * module/ice-9/sandbox.scm (bitvector-bindings): Replace bit-count* with bitvector-count-bits. * test-suite/tests/bitvectors.test: Update.
* bitvector-flip-all-bits! replaces bit-invert!Andy Wingo2020-04-181-1/+1
| | | | | | | | | | | | | | * NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/bitvectors.h: * libguile/bitvectors.c (scm_c_bitvector_flip_all_bits_x): New function. * libguile/deprecated.h: * libguile/deprecated.c (scm_bit_invert_x): Deprecate. * module/ice-9/sandbox.scm (mutable-bitvector-bindings): Replace bit-invert! with bitvector-flip-all-bits!. * module/system/vm/frame.scm (available-bindings): Use the new interface. * test-suite/tests/bitvectors.test: Update.
* bitvector-set-all-bits! / bitvector-clear-all-bits! replace bitvector-fill!Andy Wingo2020-04-151-1/+2
| | | | | | | | | | | | | | | | | | * NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/bitvectors.h: * libguile/bitvectors.c (scm_c_bitvector_set_all_bits_x) (scm_c_bitvector_clear_all_bits_x): New functions. * libguile/deprecated.h: * libguile/deprecated.c (scm_bitvector_fill_x): Deprecate. * module/ice-9/sandbox.scm (mutable-bitvector-bindings): Replace bitvector-fill! with bitvector-set-all-bits! / bitvector-clear-all-bits!. * module/system/vm/disassembler.scm (static-opcode-set): Use bitvector-set-bit!. * module/system/vm/frame.scm (available-bindings): Use the new interfaces. * test-suite/tests/bitvectors.test: Update.
* bitvector-set-bit! / bitvector-clear-bit! replace bitvector-set!Andy Wingo2020-04-141-2/+3
| | | | | | | | | | | | | | | | | | | * NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/array-handle.h (bitvector_set_x, scm_array_get_handle): Adapt to bitvector changes. * libguile/bitvectors.h: * libguile/bitvectors.c (scm_c_bitvector_set_bit_x) (scm_c_bitvector_clear_bit_x): New functions. * libguile/deprecated.h: * libguile/deprecated.c (scm_bitvector_set_x): Deprecate. * module/ice-9/sandbox.scm (mutable-bitvector-bindings): Replace bitvector-set! with bitvector-set-bit! / bitvector-clear-bit!. * module/system/vm/disassembler.scm (static-opcode-set): Use bitvector-set-bit!. * module/system/vm/frame.scm (compute-defs-by-slot, available-bindings): Use bitvector-set-bit!. * test-suite/tests/bitvectors.test: Update.
* bitvector-bit-set? / bitvector-bit-clear? replace bitvector-refAndy Wingo2020-04-141-1/+2
| | | | | | | | | | | | | | | | | | | | | This is an opportunity to make a new interface that can be more efficient in 3.0 (because no generic array support), easier to read (no need for 'not'), and more consistent with other bitvector interfaces. * NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/array-handle.h (bitvector_ref, scm_array_get_handle): Adapt to bitvector changes. * libguile/bitvectors.h: * libguile/bitvectors.c (scm_c_bitvector_bit_is_set) (scm_c_bitvector_bit_is_clear): New functions. * libguile/deprecated.h: * libguile/deprecated.c (scm_bitvector_ref): Deprecate. * module/ice-9/sandbox.scm (bitvector-bindings): Replace bitvector-ref with bitvector-bit-set? / bitvector-bit-clear?. * module/system/vm/disassembler.scm (instruction-has-fallthrough): Use bitvector-bit-clear?. * test-suite/tests/bitvectors.test: Update.
* Replace bit-set*! with bitvector-set-bits! / bitvector-clear-bits!Andy Wingo2020-04-131-1/+2
| | | | | | | | | | | | | | | | | | The old name was wonky and hard to read: you almost always pass a literal as the value to set, so better to make separate functions. * NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/bitvectors.h: * libguile/bitvectors.c (scm_bitvector_set_bits_x) (scm_bitvector_clear_bits_x): New functions. * libguile/deprecated.h: * libguile/deprecated.c (scm_bit_set_star_x): Deprecate. * module/ice-9/sandbox.scm (mutable-bitvector-bindings): Replace bit-set*! with bitvector-set-bits! / bitvector-clear-bits!. * module/system/vm/frame.scm (available-bindings, compute-killv): Use bitvector-set-bits! and bitvector-clear-bits!. * test-suite/tests/bitvectors.test: Update.
* Replace bit-position with bitvector-positionAndy Wingo2020-04-121-1/+1
| | | | | | | | | | | | | | | | | | The old name was wonky and had bad argument order. * NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/bitvectors.h: * libguile/bitvectors.c (scm_bitvector_position): New function. * libguile/deprecated.h: * libguile/deprecated.c (scm_bit_position): Deprecate. * module/ice-9/sandbox.scm (bitvector-bindings): Replace bit-position with bitvector-position. * module/language/cps/intset.scm (bitvector->intset): Use bitvector-position. * module/system/vm/frame.scm (available-bindings): Use bitvector-position. * test-suite/tests/bitvectors.test ("bitvector-position"): Add test.
* Replace bit-count with bitvector-countAndy Wingo2020-04-121-1/+1
| | | | | | | | | | | | | | | | | The old name was wonky and had bad argument order. * NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/bitvectors.h: * libguile/bitvectors.c (VALIDATE_BITVECTOR): New helper. (scm_bitvector_count): New function. * libguile/deprecated.h: * libguile/deprecated.c (scm_bit_count): Deprecate. * module/ice-9/sandbox.scm (bitvector-bindings): Replace bit-count with bitvector-count. * module/srfi/srfi-60.scm: No need to #:replace bit-count. * module/system/vm/frame.scm (available-bindings): Use bitvector-count. * test-suite/tests/bitvectors.test ("bitvector-count"): Add test.
* Define top-level bindings for aux syntax: else, =>, _, ...Andy Wingo2019-09-121-0/+1
| | | | | | | | | * module/ice-9/boot-9.scm (else, =>, ..., _): New definitions. These are specified by the r6rs and the r7rs. * module/ice-9/sandbox.scm (core-bindings): Include the aux syntax definitions. * module/rnrs/base.scm: * module/rnrs.scm: Re-export aux syntax.
* Fix sandboxAndy Wingo2018-01-031-5/+2
| | | | | * module/ice-9/sandbox.scm (eval-in-sandbox): Remove use of deprecated-and-now-removed allow-legacy-syntax-objects? parameter.
* Add sandboxed evaluation facilityAndy Wingo2017-04-181-0/+1399
* module/ice-9/sandbox.scm: New file. * module/Makefile.am (SOURCES): Add new file. * doc/ref/api-evaluation.texi (Sandboxed Evaluation): New section. * NEWS: Update. * test-suite/tests/sandbox.test: New file. * test-suite/Makefile.am: Add new file.