[Ecls-list] Patch: FTYPE proclamations with DEFTYPE'd types.
Josh Elsasser
josh at elsasser.org
Wed Sep 10 20:44:10 UTC 2008
On Mon, Sep 01, 2008 at 03:28:11PM -0700, Josh Elsasser wrote:
> I forgot to send this one before, it attempts to normalize the types
> used in an FTYPE declaration or proclamation so that function types
> defined with DEFTYPE can be used.
Hi. I don't mean to be a pest, but did this get overlooked? If it
needed work or you just haven't had time to look at it then that's
fine, I just want to make sure that it didn't get lost.
> --- src/cmp/cmpenv.lsp
> +++ src/cmp/cmpenv.lsp
> @@ -198,12 +198,15 @@
> (proclaim-var (second decl) (cddr decl))
> (error "Syntax error in proclamation ~s" decl)))
> (FTYPE
> - (let (ftype)
> + (let (ftype fargs)
> (cond ((and (consp (cdr decl))
> (consp (setf ftype (second decl)))
> - (eq (first ftype) 'FUNCTION))
> + (multiple-value-bind (ntype nargs)
> + (si::normalize-type ftype)
> + (and (eq ntype 'FUNCTION)
> + (consp (setf fargs nargs)))))
> (dolist (v (cddr decl))
> - (add-function-proclamation v (rest ftype))))
> + (add-function-proclamation v fargs)))
> (t (error "Syntax error in proclamation ~a" decl)))))
> (INLINE
> (dolist (fun (cdr decl))
> @@ -391,12 +394,15 @@
> (COMPILATION-SPEED)
> (t (cmpwarn "The OPTIMIZE quality ~s is unknown." (car x))))))))
> (FTYPE
> - (let (ftype)
> + (let (ftype fargs)
> (cond ((and (consp (cdr decl))
> (consp (setq ftype (second decl)))
> - (eq (first ftype) 'FUNCTION))
> + (multiple-value-bind (ntype nargs)
> + (si::normalize-type ftype)
> + (and (eq ntype 'FUNCTION)
> + (consp (setf fargs nargs)))))
> (dolist (v (cddr decl))
> - (add-function-declaration v (second ftype) (cddr ftype))))
> + (add-function-declaration v (first fargs) (rest fargs))))
> (t (cmpwarn "Syntax error in declaration ~s" decl)))))
> (INLINE
> (push decl dl)
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Ecls-list mailing list
> Ecls-list at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ecls-list
More information about the ecl-devel
mailing list