[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] bug in type-validation for "deprecated" de
From: |
Mario Domenech Goulart |
Subject: |
Re: [Chicken-hackers] [PATCH] bug in type-validation for "deprecated" declaration |
Date: |
Sat, 08 Sep 2012 13:46:43 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) |
Hi,
On Sat, 8 Sep 2012 14:06:28 +0200 Peter Bex <address@hidden> wrote:
> On Fri, Sep 07, 2012 at 11:51:14PM +0200, Felix wrote:
>> The attached patch fixes a bug reported by Christian. The type-validation
>> of "deprecated" type-specifiers returned an incorrect value. Also, a small
>> bug in the type-database is fixed.
>
> I decided to add some regression tests for this and found that there's
> a second bug. Before, deprecated procedures which have a suggested
> alternative would cause the compiler to crash, but with this patch
> they do not get an error message shown, because their assigned type
> is '(*) now, which breaks the global-result type dispatch.
>
> Attached is a modified version of your patch which fixes the bug,
> and contains a regression test. I also removed the older deprecation
> regression test because we probably want to eventually get rid of
> get-environment-variable, so we can't keep using it in our tests.
> This makes a bigger diff because all the line numbers moved and the
> gensymed names are different.
While testing Peter's patch, I noticed it breaks boot-chicken. The
build of library.scm is aborted with:
Error: (length) bad argument type - not a proper list: (procedure
return-to-host () . *)
The following part was causing that error:
(when (and type (not b)
- (not (eq? type 'deprecated))
+ (not (or (eq? type 'deprecated)
+ (and (= 2 (length type))
+ (eq? (car type) 'deprecated))))
So Peter suggested
(when (and type (not b)
(not (or (eq? type 'deprecated)
- (and (= 2 (length type))
- (eq? (car type) 'deprecated))))
+ (and (pair? type)
+ (eq? (car type) 'deprecated))))
instead (diff against Peter's patch). That seems to do the trick.
Attached is Felix's patch with Peter's changes plus the fix above.
Best wishes.
Mario
--
http://parenteses.org/mario
0001-Type-validation-returned-incorrect-result-for-deprec.patch
Description: Text Data
- [Chicken-hackers] [PATCH] bug in type-validation for "deprecated" declaration, Felix, 2012/09/07
- Re: [Chicken-hackers] [PATCH] bug in type-validation for "deprecated" declaration, Peter Bex, 2012/09/08
- Re: [Chicken-hackers] [PATCH] bug in type-validation for "deprecated" declaration, Felix, 2012/09/08
- Re: [Chicken-hackers] [PATCH] bug in type-validation for "deprecated" declaration, Peter Bex, 2012/09/08
- Re: [Chicken-hackers] [PATCH] bug in type-validation for "deprecated" declaration, Felix, 2012/09/08
- Re: [Chicken-hackers] [PATCH] bug in type-validation for "deprecated" declaration, Peter Bex, 2012/09/08
- Re: [Chicken-hackers] [PATCH] bug in type-validation for "deprecated" declaration, Felix, 2012/09/08
- Re: [Chicken-hackers] [PATCH] bug in type-validation for "deprecated" declaration, Mario Domenech Goulart, 2012/09/08
- Re: [Chicken-hackers] [PATCH] bug in type-validation for "deprecated" declaration, Mario Domenech Goulart, 2012/09/09
- Re: [Chicken-hackers] [PATCH] bug in type-validation for "deprecated" declaration, Mario Domenech Goulart, 2012/09/09
Re: [Chicken-hackers] [PATCH] bug in type-validation for "deprecated" declaration,
Mario Domenech Goulart <=
- Re: [Chicken-hackers] [PATCH] bug in type-validation for "deprecated" declaration, Peter Bex, 2012/09/08
- Re: [Chicken-hackers] [PATCH] bug in type-validation for "deprecated" declaration, John Cowan, 2012/09/08
- Re: [Chicken-hackers] [PATCH] bug in type-validation for "deprecated" declaration, Peter Bex, 2012/09/08
- [Chicken-hackers] Cygwin issues, John Cowan, 2012/09/08
- Re: [Chicken-hackers] Cygwin issues, Mario Domenech Goulart, 2012/09/08
- Re: [Chicken-hackers] Cygwin issues, John Cowan, 2012/09/08
Re: [Chicken-hackers] Cygwin issues, Mario Domenech Goulart, 2012/09/08
Re: [Chicken-hackers] Cygwin issues, John Cowan, 2012/09/08
Re: [Chicken-hackers] Cygwin issues, Felix, 2012/09/09
Re: [Chicken-hackers] [PATCH] bug in type-validation for "deprecated" declaration, Felix, 2012/09/08