summaryrefslogtreecommitdiff
path: root/module
AgeCommit message (Collapse)AuthorFilesLines
2016-07-11Fix compilation of rank 0 typed array literalsDaniel Llorens1-1/+3
* module/system/vm/assembler.scm (simple-uniform-vector?): array-length fails for rank 0 arrays; fix the shape condition. * test-suite/tests/arrays.test: test reading of #0f64(x) in compilation context.
2016-07-10Add meta/build-envAndy Wingo1-1/+1
* meta/build-env.in: New file which sets up an environment that does not inherit GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH (unless cross-compiling). * doc/ref/Makefile.am (autoconf-macros.texi): * libguile/Makefile.am (snarf2checkedtexi): * module/Makefile.am (ice-9/psyntax-pp.go): * test-suite/standalone/Makefile.am (GUILE_INSTALL_LOCALE): * am/bootstrap.am (.scm.go): * am/guilec (.scm.go): Use build-env. * configure.ac: Create build-env.
2016-06-27psyntax can trace expand-time changes to the current moduleAndy Wingo2-106/+124
* module/ice-9/psyntax.scm (expand-top-sequence): Support expand-time changes to the current module. * module/ice-9/psyntax-pp.scm: Regenerate.
2016-06-27Fix 'monitor' macro.Taylan Ulrich Bayırlı/Kammer1-3/+18
* module/ice-9/threads.scm (monitor-mutex-table) (monitor-mutex-table-mutex, monitor-mutex-with-id): New variables. (monitor): Fix it.
2016-06-25Add -Wmacro-use-before-definitionAndy Wingo4-11/+80
* module/ice-9/boot-9.scm (%auto-compilation-options): * am/guilec (GUILE_WARNINGS): Add -Wmacro-use-before-definition. * module/language/tree-il/analyze.scm (unbound-variable-analysis): Use match-lambda. (<macro-use-info>, macro-use-before-definition-analysis): New analysis. * module/system/base/message.scm (%warning-types): Add macro-use-before-definition warning type. * module/language/tree-il/compile-cps.scm (%warning-passes): Add support for macro-use-before-definition.
2016-06-25Fix duplicate case in pevalAndy Wingo1-1/+0
* module/language/tree-il/peval.scm (singly-valued-expression?): Fix duplicate case. Spotted by "mejja" on IRC.
2016-06-24Constant-folding eq? and eqv? uses deduplicationAndy Wingo1-1/+9
* test-suite/tests/peval.test ("partial evaluation"): Add tests. * module/language/tree-il/peval.scm (peval): Constant-fold eq? and eqv? using equal?, anticipating deduplication.
2016-06-24Prevent (@ (ice-9 boot-9) x)Andy Wingo1-0/+5
* module/ice-9/boot-9.scm: Prevent re-loading, perhaps via (@ (ice-9 boot-9) foo). (ice-9 boot-9) isn't a module. Fixes #21801.
2016-06-24Fix texinfo->html for @acronym, @itemizeAndy Wingo1-5/+19
* module/texinfo/html.scm (itemize, acronym, tag-replacements, rules): Fix HTML serialization of @itemize and @acronym. Fixes #21772. * test-suite/tests/texinfo.html.test: New file. * test-suite/Makefile.am: Add new file.
2016-06-24Fix include-from-path when file found in relative pathAndy Wingo2-12/+14
* module/ice-9/psyntax.scm (include-from-path): Canonicalize result of %search-load-path. Otherwise a relative path passed to `include' would be treated as relative to the directory of the file that contains the `include-from-path'. Fixes #21347. * module/ice-9/psyntax-pp.scm: Regenerate.
2016-06-23Static default for define-module #:duplicatesAndy Wingo1-29/+38
* module/ice-9/boot-9.scm (define-module*): Leaving off #:duplicates defaults to installing the duplicate binding handlers specified in the manual, not the value of some other dynamic parameter. (default-duplicate-binding-procedures): (default-duplicate-binding-handler): Instead of closing over a separate fluid, close over the handlers of the current module. That way when a user does (default-duplicate-binding-handler ...) in a script, then it applies to the right module.
2016-06-23Fix default-duplicate-binding-handlers for compilationAndy Wingo1-30/+31
* module/ice-9/boot-9.scm (define-module*): Capture value of `default-duplicate-binding-procedures' when the module is created. Fixes #20093.
2016-06-23Don't serialize uninterned symbolsAndy Wingo1-0/+2
* module/system/vm/assembler.scm (intern-constant): Don't serialize uninterned symbols. * test-suite/tests/rtl.test ("bad constants"): Add a test.
2016-06-21Fix (< 'foo) compilationAndy Wingo1-1/+6
* module/language/tree-il/primitives.scm (expand-chained-comparisons): Fix (< 'foo) compilation. * test-suite/tests/compiler.test ("regression tests"): Add test case.
2016-06-21`define!' instruction returns the variableAndy Wingo4-5/+8
* doc/ref/vm.texi (Top-Level Environment Instructions): Update documentation. * libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump, sadly. * module/system/vm/assembler.scm (*bytecode-minor-version*): Bump. * libguile/vm-engine.c (define!): Change to store variable in dst slot. * module/language/tree-il/compile-cps.scm (convert): * module/language/cps/compile-bytecode.scm (compile-function): Adapt to define! change. * module/language/cps/effects-analysis.scm (current-module): Fix define! effects. Incidentally here was the bug: in Guile 2.2 you can't have effects on different object kinds in one instruction, without reverting to &unknown-memory-kinds. * test-suite/tests/compiler.test ("regression tests"): Add a test.
2016-06-21Use source file permissions for compiled filesAndy Wingo1-1/+3
* module/system/base/compile.scm (call-with-output-file/atomic): Use the permissions of the source file, if available, as the permissions of the compiled file. Fixes #18477.
2016-06-21Importing modules with #:select no longer grovels private bindingsAndy Wingo2-6/+9
* module/ice-9/boot-9.scm (resolve-interface): Don't look in private interface for #:select bindings. Fixes #17418. * module/system/repl/coop-server.scm: Don't rely on bad #:select behavior. * NEWS: Add entry.
2016-06-21Fix SRFI-2 (and-let*) implementation.Taylan Ulrich Bayırlı/Kammer1-13/+39
* module/ice-9/and-let-star.scm (%and-let*): Re-implemented this in a more verbose but accurate way.
2016-06-21Add R6RS bytevector->string, string->bytevectorAndy Wingo2-0/+32
* module/rnrs/io/ports.scm (string->bytevector): (bytevector->string): New procedures. * module/rnrs.scm: Export new procedures. * test-suite/tests/r6rs-ports.test: Add string->bytevector and bytevector->string tests.
2016-06-21Export &i/o-decoding, &i/o-encoding from (rnrs)Andy Wingo2-5/+10
* module/rnrs/io/ports.scm (&i/o-decoding, &i/o-encoding): Rename from &i/o-decoding-error and &i/o-encoding-error, to conform to R6RS. * module/rnrs.scm (rnrs): Export &i/o-decoding, &i/o-encoding, their accessors and constructors.
2016-06-21Implement R6RS output-port-buffer-modeAndy Wingo2-3/+18
* module/rnrs/io/ports.scm (r6rs-open): Set buffer-mode on new port. (output-port-buffer-mode): Implement and export. * module/rnrs.scm (rnrs): Export output-port-buffer-mode * test-suite/tests/r6rs-ports.test (test-output-file-opener): Add tests.
2016-06-21(rnrs hashtables): Hash functions of eq? and eqv? hashtablesTaylan Ulrich Bayırlı/Kammer1-7/+15
Also pinging this thread with a (very slightly) updated patch. :-) [2. text/x-diff; 0001-Hashtable-hash-function-returns-f-on-eq-and-eqv-tabl.patch] From 17599f6ce7ba0beb100e80455ff99af07333d871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= <taylanbayirli@gmail.com> Date: Tue, 21 Jun 2016 00:23:29 +0200 Subject: [PATCH] Hashtable-hash-function returns #f on eq and eqv tables. * module/rnrs/hashtables.scm (r6rs:hashtable)[type]: New field. (r6rs:hashtable-type): New procedure. * test-suite/tests/r6rs-hashtables.test: Add related tests.
2016-06-21(rnrs hashtables): Mutation of immutable hashtable ignoredTaylan Ulrich Bayırlı/Kammer1-2/+3
Pinging this thread with a (very slightly) updated patch. :-) [2. text/x-diff; 0001-Hashtable-set-errors-on-immutable-hashtable.patch] From 7f35d515d711e255bba5a89a013d9d92034edf41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= <taylanbayirli@gmail.com> Date: Tue, 21 Jun 2016 00:25:19 +0200 Subject: [PATCH] Hashtable-set! errors on immutable hashtable. * module/rnrs/hashtables.scm (hashtable-set!): Raise an assertion violation error when the hashtable is immutable. * test-suite/tests/r6rs-hashtables.test: Fix accordingly.
2016-06-21Fix fixnum-range changes in R6RS fixnum bitopsAndy Wingo1-3/+25
* module/rnrs/arithmetic/fixnums.scm (fxcopy-bit, fxbit-field) (fxcopy-bit-field, fxarithmetic-shift) (fxarithmetic-shift-left, fx-arithmetic-shift-right) (fxrotate-bit-field, fxreverse-bit-field): Enforce range on amount by which to shift. Fixes #14917. * test-suite/tests/r6rs-arithmetic-fixnums.test ("fxarithmetic-shift-left"): Update test to not shift left by a negative amount.
2016-06-20Fix peval on (call-with-values foo (lambda (x) x))Andy Wingo1-4/+0
* module/language/tree-il/peval.scm (peval): Don't inline (call-with-values foo (lambda (x) exp)) to (let ((x (foo))) exp). The idea is that call-with-values sets up an explicit context in which we are requesting an explicit return arity, and that dropping extra values when there's not a rest argument is the wrong thing. Fixes #13966. * test-suite/tests/peval.test ("partial evaluation"): Update test.
2016-06-20Fix uri-decode behavior for "+"Andy Wingo1-3/+8
* module/web/uri.scm (uri-decode): Add #:decode-plus-to-space? keyword argument. (split-and-decode-uri-path): Don't decode plus to space. * doc/ref/web.texi (URIs): Update documentation. * test-suite/tests/web-uri.test ("decode"): Add tests. * NEWS: Add entry. Based on a patch by Brent <brent@tomski.co.za>.
2016-06-17Fix 64->32 bit cross-compilation of large-ish fixnumsAndy Wingo1-23/+23
* module/system/vm/assembler.scm (immediate-bits): Fix a bug whereby compiling to a 32-bit target from a 64-bit host would treat all integers whose representation fit into 32 bits as immediates. This would result in integer constants between #x20000000 and 0x3fffffff being residualized in such a way that they would be loaded as negative numbers.
2016-06-12Skip incompatible .go filesAndy Wingo1-23/+35
* libguile/load.c (load_thunk_from_path, try_load_thunk_from_file): New functions. (search_path): Simplify. (scm_primitive_load_path, scm_init_eval_in_scheme): Use the new functions to load compiled files. * module/ice-9/boot-9.scm (load-in-vicinity): Skip invalid .go files. Inspired by a patch from Jan Nieuwenhuizen <janneke@gnu.org>.
2016-06-10Type inference: Use &u64-max instead of #xffff...Andy Wingo1-7/+7
* module/language/cps/types.scm: Use &u64-max where possible.
2016-06-10Types refactor for unboxed char rangesAndy Wingo1-10/+9
* module/language/cps/types.scm (*max-codepoint*): Factor codepoint range restrictions to use this value.
2016-06-09Non-blocking accept/connect Scheme supportAndy Wingo1-1/+22
* module/ice-9/sports.scm (accept, connect): New Scheme functions.
2016-06-09put-char in SchemeAndy Wingo2-3/+16
* libguile/ports.c (scm_port_encode_char): New function. * module/ice-9/ports.scm (port-encode-char): Export port-encode-char to the internals module. * module/ice-9/sports.scm (put-char): New function. (port-bindings): Add put-char and put-string.
2016-06-09Update port documentation, rename sports to suspendable portsAndy Wingo3-23/+24
* module/ice-9/suspendable-ports.scm: Rename from ice-9/sports.scm, and adapt module names. Remove exports that are not related to the suspendable ports facility; we want people to continue using the port operations from their original locations. Add put-string to the replacement list. * module/Makefile.am: Adapt to rename. * test-suite/tests/suspendable-ports.test: Rename from sports.test. * test-suite/Makefile.am: Adapt to rename. * module/ice-9/textual-ports.scm (unget-char, unget-string): New functions. * doc/ref/api-io.texi (Textual I/O, Simple Output): Flesh out documentation. (Line/Delimited): Undocument write-line, read-string, and read-string!. This is handled by (ice-9 textual-ports). (Bytevector Ports): Fix duplicated section. (String Ports): Move the note about encodings down to the end. (Custom Ports): Add explanatory text. Remove mention of C functions; they should use the C port interface. (Venerable Port Interfaces): Add text, and make documentation refer to recommended interfaces. (Using Ports from C): Add documentation. (Non-Blocking I/O): Document more fully and adapt to suspendable-ports name change.
2016-06-08Add (ice-9 textual-ports)Andy Wingo2-0/+58
* module/ice-9/textual-ports.scm: New module. * module/Makefile.am: Add new module.
2016-06-08put-char, put-string in (ice-9 ports internals)Andy Wingo1-2/+6
* libguile/ports.h (scm_put_char): * libguile/ports.c (scm_put_char): New function. (scm_put_string): Add docstrings, and expose to the internal ports module. * module/ice-9/ports.scm (put-char, put-string): Expose these bindings only through the internals module.
2016-06-01put-string in SchemeAndy Wingo2-0/+26
* module/ice-9/ports.scm: Export port-encode-chars and port-clear-stream-start-for-bom-write via the internals module. * module/ice-9/sports.scm (put-string): New function.
2016-05-25Add port-line-buffered?Andy Wingo1-0/+4
* libguile/ports.c (scm_port_line_buffered_p): New function. * module/ice-9/ports.scm: Plump port-line-buffered? and port-auxiliary-write-buffer through to the internals module
2016-05-24Speed golf on Scheme put-u8, put-bytevectorAndy Wingo1-4/+4
* module/ice-9/sports.scm (put-u8, put-bytevector): Speed hack.
2016-05-24Add put-u8 implementation in SchemeAndy Wingo1-1/+16
* module/ice-9/sports.scm (put-u8): Add implementation. (port-bindings): Add put-u8.
2016-05-24`put-bytevector' in SchemeAndy Wingo1-4/+52
* module/ice-9/sports.scm (flush-input): New helper. (put-bytevector): New function. (port-bindings): Add put-bytevector.
2016-05-24Wire up non-blocking support in sport writesAndy Wingo1-35/+40
* module/ice-9/sports.scm (write-bytes): Support non-blocking writes. (force-output, flush-output): Rearrange placement.
2016-05-24close-port implementation in sportsAndy Wingo1-2/+12
* module/ice-9/sports.scm (close-port): New function. (port-bindings): Add close-port.
2016-05-24Add force-output to sportsAndy Wingo1-2/+8
* module/ice-9/sports.scm (force-output): New implementation. (port-bindings): Add force-output.
2016-05-22get-bytevector-n in Scheme.Andy Wingo1-3/+50
* module/ice-9/sports.scm (fill-input): Add io-mode optional arg. (get-bytevector-n): New implementation. (port-bindings): Add get-bytevector-n. * test-suite/tests/sports.test: Add r6rs-ports tests.
2016-05-22More thorough ice-9 sports testingAndy Wingo1-12/+17
* module/ice-9/sports.scm: Export read-line, %read-line, and read-delimited. Add these latest three to install-sports!, and fix install-sports! if the current module isn't (ice-9 sports). * test-suite/tests/sports.test: Use install-sports! instead of lexical bindings, to allow us to nicely frob bindings in rdelim. Include rdelim tests.
2016-05-22http: Accept date strings with a leading space for hours.Ludovic Courtès1-0/+20
Fixes <http://bugs.gnu.org/23421>. Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>. * module/web/http.scm (parse-rfc-822-date): Add two clauses for hours with a leading space. * test-suite/tests/web-http.test ("general headers"): Add two tests.
2016-05-22Bump user-visible copyright years to 2016.Mark H Weaver2-5/+4
* doc/ref/guile.texi: Add 2016 to user-visible copyright notice. * module/ice-9/command-line.scm (version-etc): Bump 'copyright-year' to 2016. * module/system/repl/common.scm (*version*): Add 2016 to the range of copyright years.
2016-05-22SRFI-19: Update the table of leap seconds.Mark H Weaver1-3/+4
* module/srfi/srfi-19.scm (leap-second-table): Update to include the most recent leap second.
2016-05-22http: Use 'read-header-line' instead of 'read-line*'.Ludovic Courtès1-19/+3
* module/web/http.scm (read-line*): Remove. (read-continuation-line, read-header, read-request-line): Use 'read-header-line' instead of 'read-line*'.
2016-05-22http: Accept empty reason phrases.Ludovic Courtès1-5/+20
Fixes <http://bugs.gnu.org/22273>. Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>. * module/web/http.scm (read-header-line): New procedure. (read-response-line): Use it instead of 'read-line*'. * test-suite/tests/web-http.test ("read-response-line"): Add test.