[cmucl-help] Re: compilation note -> style-warning?

2008-11-25 Thread Raymond Toy
Nicolas Neuss wrote:
> Raymond Toy <[EMAIL PROTECTED]> writes:
> 
>>> "Nicolas" == Nicolas Neuss <[EMAIL PROTECTED]> writes:
>> Nicolas> Hello, in the following code a compilation note (returning
>> Nicolas> of double) triggers also a style-warning.  Is this intended?
>> Nicolas> (I cannot see how to improve the style...)
>>
>> Not sure.  Maybe compilation notes like this should not be a
>> style-warning.  It's really an efficiency note, but currently
>> efficiency notes are also style-warnings.  Would an
>> efficiency-warning, which would be a subtype of style-warning work for
>> you?
> 
> This issue shows up in my Femlisp test suite when runtime-compiling some
> scalar-product operation.  My test function looks like this at the moment
> 
> (defun test-function (func)
>   (catch 'trap
> (handler-bind
> ((serious-condition
>   #'(lambda (condition) (throw 'trap condition)))
>  #-(or cmu scl)
>  (warning
>   #'(lambda (condition) (throw 'trap condition
>   (funcall func)
>   nil)))
> 
> So you see that I can live with the current behaviour, but it would be nice
> if I could drop the conditional for CMUCL.  For me, the best thing would be
> if efficiency notes would not be style warnings, although I understand that
> this might be a too large change for a minor improvement.  (Is that
> subtyping at least useful in some other situation?)

I think changing the efficiency notes (and the boxing notes in
particular) to be an efficiency-warning would not be hard.  Making
efficiency-warning not be a subtype of style-warning is easy too.

But I have not given any thought about the implications of such a hierarchy.

Ray



[cmucl-help] Re: compilation note -> style-warning?

2008-11-25 Thread Nicolas Neuss
Raymond Toy <[EMAIL PROTECTED]> writes:

>> "Nicolas" == Nicolas Neuss <[EMAIL PROTECTED]> writes:
>
> Nicolas> Hello, in the following code a compilation note (returning
> Nicolas> of double) triggers also a style-warning.  Is this intended?
> Nicolas> (I cannot see how to improve the style...)
>
> Not sure.  Maybe compilation notes like this should not be a
> style-warning.  It's really an efficiency note, but currently
> efficiency notes are also style-warnings.  Would an
> efficiency-warning, which would be a subtype of style-warning work for
> you?

This issue shows up in my Femlisp test suite when runtime-compiling some
scalar-product operation.  My test function looks like this at the moment

(defun test-function (func)
  (catch 'trap
(handler-bind
((serious-condition
  #'(lambda (condition) (throw 'trap condition)))
 #-(or cmu scl)
 (warning
  #'(lambda (condition) (throw 'trap condition
  (funcall func)
  nil)))

So you see that I can live with the current behaviour, but it would be nice
if I could drop the conditional for CMUCL.  For me, the best thing would be
if efficiency notes would not be style warnings, although I understand that
this might be a too large change for a minor improvement.  (Is that
subtyping at least useful in some other situation?)

Regards,
Nicolas

> (I think there might also a small bug.  The note is a compiler-note,
> but the routine that generates it is called
> do-coerce-efficiency-note.)
>
> Ray



[cmucl-help] Re: compilation note -> style-warning?

2008-11-25 Thread Raymond Toy
> "Nicolas" == Nicolas Neuss <[EMAIL PROTECTED]> writes:

Nicolas> Hello,
Nicolas> in the following code a compilation note (returning of double) 
triggers
Nicolas> also a style-warning.  Is this intended?  (I cannot see how to 
improve the
Nicolas> style...)

Not sure.  Maybe compilation notes like this should not be a
style-warning.  It's really an efficiency note, but currently
efficiency notes are also style-warnings.  Would an
efficiency-warning, which would be a subtype of style-warning work for
you?

(I think there might also a small bug.  The note is a compiler-note,
but the routine that generates it is called
do-coerce-efficiency-note.)

Ray