[armedbear-devel] BUG: problem with THE type checks in compiler
Hi, There is a problem in the recent improvements to the way the compiler handles THE type checking. File-compiling the code below leads to an error "The value 6 is not of type FOO". (defconstant +foo-OK+ (the (integer 0 10) 5)) (deftype foo () '(integer 0 10)) (defmacro assemble-foo (x) `(the foo ,x)) (defconstant +foo+ (assemble-foo 6)) Eric
Filed as [bug 61][1], where I identified the offending revision as r12114 via regression testing (love that "hg bisect" command). Thanks for the bug report. [1]: http://trac.common-lisp.net/armedbear/ticket/61 -- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now."
On 8/27/09 8:09 AM, Mark Evenson wrote: Tentatively fixed in [svn 12119][1]. I'm leaving ticket#61 open until 1) Erik looks at the patch 2) We decide whether we shouldn't add a call to the Lisp-side TYPEP at the end of LispObject.typep() [1]: http://trac.common-lisp.net/armedbear/changeset/12119 -- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now."
Hi Mark, Thanks for looking into the issue. On Thu, Aug 27, 2009 at 11:38 AM, Mark Evenson<evenson@panix.com> wrote:
On 8/27/09 8:09 AM, Mark Evenson wrote:
Tentatively fixed in [svn 12119][1].
I'm leaving ticket#61 open until
1) Erik looks at the patch
I did so now (i'm off today). I must say that I intentionally did not use TYPEP because of 2 reasons: 1. It's not quite clear when it becomes available to the interpreter while I wanted type validation from the start 2. It will expand all types, but some Lisp types take a lot of time to verify So, I choose the same policy as the compiler under *safety* settings lower than 3
2) We decide whether we shouldn't add a call to the Lisp-side TYPEP at the end of LispObject.typep()
That would create a recursive dependency: TYPEP uses typep() to verify the simpler types. I committed r12124 as a proposed solution: it detects when a symbol specifies a DEFTYPE-d type and punts on the expansion and type verification if it is. What's your comment? Bye, Erik.
On 8/28/09 12:55 PM, Erik Huelsmann wrote: […]
I committed r12124 as a proposed solution: it detects when a symbol specifies a DEFTYPE-d type and punts on the expansion and type verification if it is.
What's your comment?
Let's stick with r12124 for now, as it improves THE. I've closed [ticket 61 with a summary of your last post][1]. [1]: http://trac.common-lisp.net/armedbear/ticket/61#comment:3 -- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now."
participants (3)
-
eric.marsden@free.fr
-
Erik Huelsmann
-
Mark Evenson