1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-16 18:50:23 +02:00
Commit graph

9653 commits

Author SHA1 Message Date
Rob Browning
b2e64b4cdd (s_scm_append): add patch from Kevin Ryde to track argnum
in error messages.
2003-10-11 21:37:03 +00:00
Dirk Herrmann
cc56ba8062 * libguile/eval.c (s_missing_expression, s_bad_variable): New static
identifiers.

	(scm_m_define): Use ASSERT_SYNTAX to signal syntax errors.  Prefer
	R5RS terminology for the naming of variables.  Be more specific
	about the kind of error that was detected.  Make sure file name,
	line number etc. are added to all freshly created expressions.
	Avoid unnecessary consing when creating the memoized code.

	* test-suite/tests/syntax.test (exception:missing-expr,
	exception:extra-expr): New.

	Adapted tests for 'begin' to the new way of error
	reporting.
2003-10-11 16:03:29 +00:00
Dirk Herrmann
609a8b86ae * libguile/eval.c (s_extra_expression, s_misplaced_else_clause,
s_bad_cond_clause, s_missing_recipient): New static identifiers.

	(s_extra_case_clause): Removed.

	(scm_m_case, scm_m_cond): If a clause appears after an else
	clause, report a misplaced else clause.

	(scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors.  Be more
	specific about the kind of error that was detected.  Handle bound
	'else and '=>.  Avoid unnecessary consing when creating the
	memoized code.

	(scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
	the syntactic keyword 'else and SCM_IM_ARROW to memoize the
	syntactic keyword '=>.

	* test-suite/tests/syntax.test (exception:misplaced-else-clause,
	exception:bad-cond-clause): New.

	(exception:bad/missing-clauses, exception:extra-case-clause):
	Removed.

	Adapted tests for 'case' and 'cond' to the new way of error
	reporting.

	The tests that check if cond is hygienic pass now.
2003-10-11 10:40:19 +00:00
Dirk Herrmann
58a2510b07 * libguile/eval.c (scm_m_case): Allow empty lists of case labels.
* test-suite/tests/syntax.test: Fixed and activated test of empty case
        label support.
2003-10-11 01:52:25 +00:00
Dirk Herrmann
2a6f7afe04 * libguile/tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
* libguile/print.c (scm_isymnames): Add names for the new memoizer
        codes.

	* libguile/eval.c (s_missing_clauses, s_bad_case_clause,
	s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
	literal_p): New static identifiers.

	(scm_m_case): Use ASSERT_SYNTAX to signal syntax errors.  Be more
	specific about the kind of error that was detected.  Check for
	duplicate case labels.  Handle bound 'else.  Avoid unnecessary
	consing when creating the memoized code.

	(scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
	the syntactic keyword 'else.

	* test-suite/tests/syntax.test (exception:bad-expression,
	exception:missing-clauses, exception:bad-case-clause,
	exception:extra-case-clause, exception:bad-case-labels): New.

	Added some tests and adapted tests for 'case' to the new way of
	error reporting.
2003-10-11 00:57:25 +00:00
Dirk Herrmann
e6729603c0 * libguile/eval.c (s_bad_expression, syntax_error_key, syntax_error,
ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.

	(scm_m_and): Use ASSERT_SYNTAX to signal syntax errors.  Avoid
	unnecessary consing when creating the memoized code.

	* test-suite/lib.scm (run-test-exception): Handle syntax errors.
2003-10-10 21:49:27 +00:00
Marius Vollmer
7b0f1f2ae1 *** empty log message *** 2003-10-10 14:32:19 +00:00
Marius Vollmer
a409f865f0 (inexact->exact): Use corrent argument order for pass-if-exception.
Use "+inf.0" instead of "+.inf", etc.
2003-10-10 14:32:11 +00:00
Kevin Ryde
9ddeb77696 *** empty log message *** 2003-10-09 00:41:46 +00:00
Kevin Ryde
1259cb26f7 (inexact->exact): New tests. 2003-10-09 00:41:15 +00:00
Kevin Ryde
2be24db4d7 (scm_inexact_to_exact): Don't depend on what double->long
cast gives for values bigger than a long, or for nan or inf.
2003-10-09 00:38:51 +00:00
Kevin Ryde
f09fe63732 *** empty log message *** 2003-10-09 00:17:12 +00:00
Kevin Ryde
ea2b9c2f6b (Hash Table Reference): Decribe rehashing, note
no hashx-remove!, describe make-hash-table size parameter.
2003-10-09 00:14:38 +00:00
Kevin Ryde
b7be48bc39 *** empty log message *** 2003-10-08 23:06:05 +00:00
Kevin Ryde
c42605e954 * tests/poe.test: New file.
* Makefile.am: Add it.
2003-10-08 23:05:12 +00:00
Kevin Ryde
f33f103c95 New file. 2003-10-08 23:03:29 +00:00
Kevin Ryde
ff6ea7b951 *** empty log message *** 2003-10-08 23:00:37 +00:00
Kevin Ryde
d6532dd1cf (funcq-assoc): Rewrite, don't assume '() is false, and
actually traverse the given alist.
2003-10-08 22:57:52 +00:00
Dirk Herrmann
df5af69a91 * smob.h (scm_make_smob_type): Made the declaration match the
definition.
2003-10-07 22:03:26 +00:00
Dirk Herrmann
d6e04e7c4a * lib.scm (exception:missing-expression): New.
* tests/dynamic-scope.test, tests/eval.test,
	tests/r5rs_pitfall.test, tests/srfi-17.test, tests/syncase.test:
	Wrap tests in module (test-suite test-<file-name without .test>),
	following a practice that was used on a couple of files already.

	* tests/dynamic-scope.test (exception:duplicate-binding,
	exception:bad-binding): New.

	* tests/dynamic-scope.test, tests/srfi-17.test, tests/syntax.test:
	Execute syntactically wrong tests using eval.  With the upcoming
	new memoizer this is necessary in order to postpone the syntax
	check to the actual evaluation of the syntactically wrong form.

	* tests/syntax.test: Added some test cases and modified one test
	case.
2003-10-07 22:00:05 +00:00
Marius Vollmer
da0e6c2baf Make type names char const * instead of char *. Thanks to Paul Jarc! 2003-10-07 15:58:19 +00:00
Neil Jerram
41a80feb8a UI frontend work: eval support. 2003-10-06 20:33:02 +00:00
Marius Vollmer
6b5dc4ee33 *** empty log message *** 2003-10-06 19:25:05 +00:00
Marius Vollmer
3446b6ef07 * scheme-memory.texi: Added a short explanation of the GC and the
conservative stack scanning.
(scm_gc_protect_object, scm_gc_unprotect_object,
scm_permanent_object): New.

* data-rep.texi, scheme-memory.texi (scm_remember_upto_here_1,
scm_remember_upto_here_2): Moved from data-rep.texi to
scheme-memory.texi.
2003-10-06 19:24:15 +00:00
Neil Jerram
02b0c69289 Debugger UI asynchronous thread support. 2003-10-04 20:03:51 +00:00
Kevin Ryde
8552a9c0ae *** empty log message *** 2003-10-02 00:29:50 +00:00
Kevin Ryde
33b482982a *** empty log message *** 2003-10-02 00:26:12 +00:00
Kevin Ryde
a1e7d87423 (String Ports): In call-with-output-string, note proc
should not close the port.  In get-output-string, note string must be
gotten before closing the port.
2003-10-02 00:25:05 +00:00
Kevin Ryde
0853a58069 (String Ports): In call-with-output-string, note proc
should not close the port.  In get-output-string, note string must be
gotten before closing the port.
2003-10-02 00:20:07 +00:00
Kevin Ryde
39a963ee81 *** empty log message *** 2003-10-02 00:17:50 +00:00
Kevin Ryde
ee6eedcde8 (call-with-output-string): Test proc closing port. 2003-10-02 00:17:16 +00:00
Kevin Ryde
591924eb4c *** empty log message *** 2003-10-02 00:11:12 +00:00
Kevin Ryde
184b85a394 (s_scm_call_with_output_string): scm_get_output_string
rather than scm_strport_to_string, so as to guard against the port
having been closed by the called procedure.  Reported by Nic Ferrier.
2003-10-02 00:04:26 +00:00
Kevin Ryde
d5c4160240 Almost forgot entry for new tests/popen.test. 2003-10-02 00:02:58 +00:00
Kevin Ryde
36be36509d Fix a couple of typos in:
New file.
2003-10-02 00:02:08 +00:00
Kevin Ryde
930d3b37a8 Fix a couple of typos in:
New file.
2003-10-02 00:00:42 +00:00
Kevin Ryde
88fd89ac40 Add call-with-output-string no segv on closed port. 2003-10-01 23:51:41 +00:00
Kevin Ryde
85ec8d4df7 Add call-with-output-string no segv on closed port. 2003-10-01 23:45:54 +00:00
Kevin Ryde
a629681215 *** empty log message *** 2003-10-01 23:43:10 +00:00
Kevin Ryde
aa7242492a (call-with-output-string): Test proc closing port. 2003-10-01 23:38:56 +00:00
Kevin Ryde
029328497d *** empty log message *** 2003-10-01 23:32:45 +00:00
Kevin Ryde
5486021ac3 (scm_call_with_output_string): scm_get_output_string
rather than scm_strport_to_string, so as to guard against the port
having been closed by the called procedure.
2003-10-01 23:32:09 +00:00
Rob Browning
c91207a1b2 *** empty log message *** 2003-10-01 19:52:06 +00:00
Rob Browning
0d153cd460 (scm_done_malloc): fix sign error in scm_malloc_done, was
comparing (scm_mallocated < size) when scm_mallocated is unsigned
and size is signed, and size is known to be negative.
2003-10-01 19:51:43 +00:00
Neil Jerram
260cff4195 Two fixes to Guile tutorial. 2003-09-27 10:10:24 +00:00
Neil Jerram
5a825ad439 Two fixes to Guile tutorial. 2003-09-27 10:08:26 +00:00
Rob Browning
9d58732f52 *** empty log message *** 2003-09-27 04:22:09 +00:00
Rob Browning
b2981fd6fd remove vestigal (pre-compile-psyntax.scm) load of
psyntax.ss (used to be needed during syntax-case development, but
now only caused problems with the top-of-the-file eval export.
Enabling the code as the comments instructed caused the other
error when trying to recompile psyntax.pp.
2003-09-27 04:21:59 +00:00
Rob Browning
172d1d9cba * compile-psyntax.scm: migrate missing with-fluids wrapper from
HEAD -- may have been overlooked during the 2003-01-27 merge.
Fixes one of two errors when trying to recompile psyntax.pp.
2003-09-27 04:21:25 +00:00
Rob Browning
4be93bf7d6 (EXTRA_DIST): add compile-psyntax.scm. 2003-09-27 04:20:59 +00:00