1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

129 commits

Author SHA1 Message Date
Andy Wingo
ceedcfaa0c srfi-35 properly uses vtable-offset-user
* module/srfi/srfi-35.scm (condition-type-id):
  (condition-type-parent, condition-type-all-fields): Don't ref fixed
  struct indices, use vtable-offset-user instead.
2009-11-15 20:28:12 +01:00
Ludovic Courtès
67231cef72 Improve the printer of SRFI-35 error conditions.
* module/srfi/srfi-35.scm (print-condition): Print the name and value of
  each field.
2009-11-10 22:19:05 +01:00
Ludovic Courtès
5658035c9c Fix typos leading to wrong argument counts.
* module/ice-9/channel.scm (eval): Fix number of arguments to
  `guile:eval'.

* module/oop/goops/save.scm (write-readably): Fix number of arguments to
  `write-array'.

* module/srfi/srfi-19.scm (priv:char->int): Fix number of arguments to
  `priv:time-error'.
2009-11-07 19:24:49 +01:00
Ludovic Courtès
5565279a67 SRFI-35: Provide nice vtable names, to make GOOPS happier.
* module/srfi/srfi-35.scm (%make-condition-type): New procedure.
  (make-condition-type, make-compound-condition-type): Use it.

* test-suite/tests/srfi-35.test ("condition
  types")["struct-vtable-name"]: New test.
2009-10-25 22:57:29 +01:00
Andy Wingo
9a8eb5fb46 srfi-16 just re-exports psyntax's case-lambda
* module/srfi/srfi-16.scm (case-lambda): Just re-export the core's
  case-lambda, it's semantically the same but faster and better
  integrated.
2009-10-25 13:19:11 +01:00
Andy Wingo
647117cd35 case-lambda, case-lambda* in psyntax
* module/ice-9/psyntax.scm (case-lambda, case-lambda*): Add
  implementations of these, present in the base environment.

* module/ice-9/psyntax-pp.scm: Regenerated.

* module/srfi/srfi-16.scm (case-lambda): Replace the core's case-lambda
  definition with our own. We're not quite ready to switch yet.
2009-10-25 13:12:27 +01:00
Ludovic Courtès
84012ef4b1 Fix typos leading to unbound variable references.
* module/ice-9/session.scm (help): Fix unbound reference to `env'.

* module/system/vm/program.scm (program-property): Fix typo.

* module/system/vm/frame.scm: Add missing `#:use-module (system vm
  objcode)'.

* module/system/repl/command.scm (guile:load): New.
  (load): Use either `primitive-load' or `load'.

* module/srfi/srfi-18.scm (thread-sleep!): Fix typo.

* module/srfi/srfi-19.scm: Use `(ice-9 rdelim)'.
  (date->broken-down-time, priv:year-day, priv:char->int): Fix typo.
  (time-*->time-*, time-*->time-*!): Fix reference to unbound variable
  `caller'.

* module/oop/goops.scm (bound-check-get): Fix typo.

* module/language/glil/compile-assembly.scm (glil->assembly): Fix typo.

* module/language/glil.scm (parse-glil): Fix typo.

* module/language/ecmascript/base.scm (object->value/string,
  object->value/number, ->number): Fix typos.

* module/language/assembly/disassemble.scm (disassemble-free-vars): Fix
  typo.
2009-10-22 22:57:25 +02:00
Ludovic Courtès
9c2224f2a6 SRFI-88: Call `read-set!' at compile time and run time.
* module/srfi/srfi-88.scm: Call `read-set!' both at compile time and run
  time.
2009-10-22 19:05:59 +02:00
Ludovic Courtès
a2ca725212 Remove unused variables in ice-9/goops/srfi/scripts.
* module/ice-9/boot-9.scm (scm-style-repl)[-abort]: Remove.

* module/oop/goops.scm (class)[slot-defs]: Remove.
  (compute-slot-accessors)[name]: Remove.
  (compute-get-n-set)[env]: Remove.

* module/oop/goops/active-slot.scm (compute-get-n-set)[env, name]:
  Remove.

* module/oop/goops/dispatch.scm (cache-try-hash!)[max-misses]: Remove.

* module/oop/goops/save.scm (make-mapper)[dims]: Remove.

* module/scripts/autofrisk.scm (>>checks)[prog]: Remove.

* module/srfi/srfi-19.scm (priv:read-directives)[ireaderf, eireader4]:
  Remove.
2009-09-21 00:24:08 +02:00
Ludovic Courtès
60c6a74095 Fix copyright in `(srfi srfi-4 gnu)'. 2009-09-20 22:29:28 +02:00
Neil Jerram
f564f4784f Remove deprecation warnings from the build
* module/srfi/srfi-35.scm: Remove explicit use of (ice-9 syncase).

* test-suite/tests/r5rs_pitfall.test: Same again.

* test-suite/tests/syncase.test: Remove "(ice-9 syncase) loads" test;
  syncase is always loaded now.
2009-09-17 01:18:14 +01:00
Andy Wingo
108e18b18a Merge wip-array refactor, up to cd43fdc5b7
Conflicts:
	NEWS
	libguile/print.c
2009-08-25 18:04:02 +02:00
Andy Wingo
bca488f186 actually inline call-with-values to tree-il's <let-values>
* module/srfi/srfi-11.scm (let-values): In the one-clause case, avoid
  going through temporary variables.

* module/language/tree-il/inline.scm (inline!): Add another case:
  (call-with-values (lambda () ...) (lambda ... ...) -> let-values.

* module/language/tree-il/compile-glil.scm (flatten): Fix a bug
  compiling applications in "vals" context.

* module/language/tree-il/analyze.scm (analyze-lexicals): Fix a couple
  bugs with let-values and rest arguments.
2009-08-06 11:48:16 +02:00
Andy Wingo
4dcd84998f let-values in terms of syntax-case, add make-tree-il-folder
* module/language/tree-il.scm (tree-il-fold): Fix for let-values case.
  (make-tree-il-folder): New public macro, makes a multi-valued folder
  specific to the number of seeds that the user wants.
* module/language/tree-il/optimize.scm (optimize!): Reverse the order of
  inline! and fix-letrec!, as the latter might expose opportunities for
  the former.
* module/srfi/srfi-11.scm (let-values): Reimplement in terms of
  syntax-case, so that its expressions may reference hygienically bound
  variables. See the NEWS for the rationale.
  (let*-values): An empty let*-values still introduces a local `let'
  binding contour.
* module/system/base/syntax.scm (record-case): Yukkkk. Reimplement in
  terms of syntax-case. Ug-ly, but see the NEWS again: "Lexical bindings
  introduced by hygienic macros may not be referenced by nonhygienic
  macros."
2009-08-05 21:35:30 +02:00
Andy Wingo
ac8ed3db31 any->u8vector and family now implemented in Scheme
* module/Makefile.am:
* module/srfi/srfi-4/gnu.scm: New module, for extensions to srfi-4.
  Currently defines the any->FOOvector family.

* libguile/srfi-4.c:
* libguile/srfi-4.i.c: Dispatch scm_any_to_FOOvector calls to the
  scheme-implemented functions in (srfi srfi-4 gnu).
2009-07-19 15:15:44 +02:00
Neil Jerram
83ba2d3750 Complete changing license to LGPLv3+
(Still guile-readline to do, but that will all be GPLv3+.)
2009-06-17 22:30:26 +01:00
Neil Jerram
53befeb700 Change Guile license to LGPLv3+
(Not quite finished, the following will be done tomorrow.
   module/srfi/*.scm
   module/rnrs/*.scm
   module/scripts/*.scm
   testsuite/*.scm
   guile-readline/*
)
2009-06-17 00:22:09 +01:00
Julian Graham
2f9ae9b104 Merge branch 'master' of git://git.savannah.gnu.org/guile 2009-06-02 09:35:02 -04:00
Julian Graham
922d417bf4 Implementation of SRFI-98 (An interface to access environment variables).
* NEWS: Add SRFI-98 to 1.8.7 features.

* doc/ref/srfi-modules.text (SRFI-98): Documentation for SRFI-98.

* module/srfi/srfi-98.scm: New file.  SRFI-98 implementation.

* test-suite/tests/srfi-98.test: New file.  SRFI-98 unit tests.
2009-05-30 21:19:59 -04:00
Andy Wingo
938d46a35d Merge branch 'syncase-in-boot-9'
Conflicts:
	module/Makefile.am
2009-05-29 16:01:43 +02:00
Ludovic Courtès
de784acd87 Rewrite SRFI-35 macros using `syntax-rules'.
* module/srfi/srfi-35.scm: Use `(ice-9 syncase)'.
  (define-condition-type, condition): Rewritten using `syntax-rules'.
  (compound-condition, condition-instantiation): New helper internal
  macros.  Thanks to Andy Wingo for his help!
2009-05-22 23:44:43 +02:00
Andy Wingo
2032f3d1db fix multiple values returning from srfi-18's `with-exception-handler'
* module/srfi/srfi-18.scm (with-exception-handler): Hah! Fixed a
  scurrilous bug in which we assumed that the thunk returned one or more
  values. Hah.
2009-05-21 21:39:37 +02:00
Andy Wingo
30a5e062d0 procedures in "drop" contexts can return unspecified values
* module/language/tree-il/compile-glil.scm (flatten): For applications in
  "drop" context, allow the procedure to return unspecified values
  (including 0 values).

* test-suite/tests/tree-il.test ("application"): Adapt test.

* module/srfi/srfi-18.scm (wrap): Clarify.

* test-suite/tests/srfi-18.test: Fix so that the expression importing
  srfi-18 is expanded before the tests. However the tests are still
  failing, something about 0-valued returns...
2009-05-21 17:22:58 +02:00
Andy Wingo
7c72fe0bb5 ice-9 syncase now deprecated, woo
Remove #:use-module (ice-9 syncase) from lots of places, as it's no
longer needed.
2009-04-24 14:34:23 +02:00
Andy Wingo
78bae3d6fa fix mismerge on srfi-19.scm
* module/srfi/srfi-19.scm (priv:locale-abbr-weekday->index): Whoops, fix
  broken manual merge on srfi-19.scm.
2009-01-12 21:45:37 +01:00
Andy Wingo
c32929d14d Merge commit 'origin/master' into vm
Conflicts:

	.gitignore
	guile-tools.in
	srfi/srfi-19.scm
2009-01-12 21:36:39 +01:00
Andy Wingo
6c3686ea14 define macros before functions using macros; more MV fixen in srfi-69
* module/srfi/srfi-69.scm: Move the macros up before the functions that
  use them, so that the compiler can do its job.
  (hash-table-walk): While it is true about what I said about R5RS
  before, it seems that for R6 this will have to change. Anyway. In the
  meantime, since the test suite checks that hash-table-walk procedures'
  return values and number of return values are ignored, call that
  procedure within a call-with-values.
2008-11-01 20:31:57 +01:00
Andy Wingo
0a283d1b0b avoid delivering 0 values to 1-valued continuations in srfi-19
* module/srfi/srfi-19.scm: Some parts of this code used a strange idiom,
  `(values)', to indicate that a procedure did nothing. However, quoth
  R5RS:

     Except for continuations created by the `call-with-values'
     procedure, all continuations take exactly one value.

  Indeed the VM indicated this error. I reworked the code to avoid these
  cases.
2008-11-01 14:28:24 +01:00
Andy Wingo
ea93465de7 move scm srfi files to module/srfi, and compile them.
* .gitignore: Add gdb-pre-inst-guile.

* configure.in: Add module/srfi/Makefile.

* module/Makefile.am: Add srfi/.

* module/srfi/: SRFI scheme files moved here, and compiled.

* srfi/Makefile.am: Remove the bits about the scheme files.
2008-11-01 13:49:23 +01:00