Custom Query (1030 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (394 - 396 of 1030)

Ticket Resolution Summary Owner Reporter
#735 fixed LOGNOR: invalid results with type declarations Eric Marsden
Description
? (lisp-implementation-version)
"Version 1.6-dev-r14231M  (LinuxX8632)"
? (defun diff (x)
  (- (locally
         (declare (type (integer 1000000000 2000000000) x))
       (lognor -10 x))
     (lognor -10 x)))
DIFF
? (diff 20)
-4294967296
#1099 fixed LOOP named NIL does not establish a BLOCK R. Matthew Emerson Stelian Ionescu
Description

(loop named nil do (return 1)) does not establish a block at all instead of one named NIL, as I'd expect from 6.1.1.5.6: "The loop named construct gives a name for the block of the loop". There's no mention that specifying the name as NIL instead of defaulting to NIL through omission allows for the omission of the loop block.

#1269 fixed Lambdas don't optimize Gary Byers Shannon Spires
Description

Optimization works on defun forms like the following:

(defun fptest1 (a b)
  (declare (optimize (speed 3) (safety 1) (debug 1))
           (single-float a b))
  (+ a b))

(disassemble 'fptest1)

We can see from the disassembly that it's using the addss* instruction and not calling .SPBUILTIN-PLUS, so we know the optimization is happening.

[*addss is X86. The ARM equivalent is fadds.]

But lambda forms like the following don't optimize in CCL:

(defun fptest8 ()
  (declare (optimize (speed 3) (safety 0) (debug 0)))
  (lambda (a b)
    (declare (optimize (speed 3) (safety 0) (debug 0))
             (single-float a b))
    (+ a b)))

(disassemble (fptest8))

Because the disassembly contains the telltale line (jmpq (@ .SPBUILTIN-PLUS)), we know that optimization isn't happening.

However, the following works:

(defparameter fptest14
        (lambda (a b)
          (declare (optimize (speed 3) (safety 1) (debug 1))
                   (single-float a b))
          (+ a b)))

(disassemble fptest14)

As you can see, the resulting disassembly has no call to .SPBUILTIN-PLUS but rather it calls (addss (% fp1) (% fp0)), indicating optimization is happening. So using a global variable rather than a defun seems to be a partial workaround for anonymous functions, but not closures.

Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.