(scm_m_case): Call scm_c_memq instead of implementing it inline.
(scm_m_define): Added comment about how we check for duplicate
formals.
(scm_m_do): Added check for duplicate bindings.
(scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
unnecessary consing when creating the memoized code.
(scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
scm_c_improper_memq to c_improper_memq, since it is not exported.
(transform_bindings): Call scm_c_memq rather than
scm_c_improper_memq.
(SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
* test-suite/tests/syntax.test (exception:missing/extra-expr-syntax):
New, introduced temporarily until all memoizers use the new way of
error reporting.
Adapted tests for 'if' to the new way of error reporting.
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.
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.
* 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.
* 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.
(main data-file-name test-file-name): Exported.
((guile-user)::main): New function, wrapper for function
(test-suite guile-test)::main.
* tests/load.test: Wrapped in module (test-suite test-load).
* tests/ports.test: Wrapped in module (test-suite test-ports).
* tests/r4rs.test: Wrapped in module (test-suite test-r4rs).
Added comments about the required structure of the file itself,
since it is subject to some tests. Removed some now unnecessary
undefine operations.
* tests/syntax.test: Wrapped in module (test-suite test-syntax)
should only be used in cases, where guile has a known bug. It
should not be used in cases where an expression is expected to
return #f as its correct result.
this test detects was actually introduced by my patch from
2003-05-31.
* libguile/eval.c: Partially undid my patch from 2003-05-31. This
patch caused the segfault referenced in the previous changelog
entry.
character. This test will only pass if the other changes that are
submitted together with this patch are also applied.
* libguile/tags.h: Fixed comment about the immediate type code
layout.
* libguile/eval.c: Fixed handling of non-special instructions.
Without this patch, guile will segfault on (#\0) and similar
instructions.
* doc/ref/scheme-compound.texi: Clarified that vectors need to
be quoted.
* doc/tutorial/guile-tut.texi: Fix example, where a vector
constant is used without quoting.
* ice-9/boot-9.scm (make-autoload-interface): Added missing
quote around vector constant.
* test-suite/tests/elisp.test: Added missing quote around vector
constants.
for a proper function object and the correct number of arguments are
now performed in the application part of SCM_CEVAL.
(scm_badformalsp): Removed.
* test-suite/tests/r5rs_pitfall.test: Test 2.1 now passes.