|
Re: ffloor-derived-type-optimizer: msg#00285lisp.cmucl.devel
Raymond Toy <toy@xxxxxxxxxxxxxxx> writes: > I wonder why ffloor defoptimizer isn't called when compiling > natively? Maybe FFLOOR is transformed to something else with default OPTIMIZE settings? No idea. > This is probably caused by this bit: Thanks, Indeed, this seems to work. I'll let it run through ANSI tests before I commit it. --- srctran.lisp.~1.124.2.1.~ Mon Aug 25 19:06:45 2003 +++ srctran.lisp Mon Aug 25 20:55:38 2003 @@ -1743,12 +1743,17 @@ (numeric-type->interval divisor-type)) (quot (,q-name (interval-div number-interval divisor-interval))) - (res-type (numeric-contagion number-type divisor-type))) - (make-numeric-type - :class (numeric-type-class res-type) - :format (numeric-type-format res-type) - :low (interval-low quot) - :high (interval-high quot)))) + (res-type (numeric-contagion number-type divisor-type)) + (res-format (numeric-type-format res-type))) + (flet ((floatify (x) + (if (numberp x) + (coerce x (or res-format 'float)) + x))) + (make-numeric-type + :class 'float + :format res-format + :low (floatify (interval-low quot)) + :high (floatify (interval-high quot)))))) (defoptimizer (,name derive-type) ((number divisor)) (flet ((derive-q (n d same-arg) |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: ffloor-derived-type-optimizer: 00285, Raymond Toy |
|---|---|
| Next by Date: | [HEADS UP} dynamic-extent merged: 00285, Gerd Moellmann |
| Previous by Thread: | Re: ffloor-derived-type-optimizeri: 00285, Raymond Toy |
| Next by Thread: | [HEADS UP} dynamic-extent merged: 00285, Gerd Moellmann |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |