Ignore:
Timestamp:
Dec 22, 2009, 10:28:03 PM (10 years ago)
Author:
gz
Message:

Improved compilation for some fixnum operations, %svref (r13247-r13253 from trunk)

Location:
branches/working-0711/ccl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl

  • branches/working-0711/ccl/compiler/optimizers.lisp

    r13331 r13332  
    12221222      `(/=-2 ,n0 ,n1))))
    12231223
    1224 (define-compiler-macro + (&optional (n0 nil n0p) (n1 nil n1p) &rest more)
     1224(define-compiler-macro + (&optional (n0 nil n0p) (n1 nil n1p) &rest more &environment env)
    12251225  (if more
    1226     `(+ (+-2 ,n0 ,n1) ,@more)
     1226    (if (and (nx-trust-declarations env)
     1227             (subtypep *nx-form-type* 'fixnum)
     1228             (nx-form-typep n0 'fixnum env)
     1229             (nx-form-typep n1 'fixnum env)
     1230             (dolist (m more t)
     1231               (unless (nx-form-typep m 'fixnum env)
     1232                 (return nil))))
     1233      `(+-2 ,n0 (the fixnum (+ ,n1 ,@more)))
     1234      `(+ (+-2 ,n0 ,n1) ,@more))
    12271235    (if n1p
    12281236      `(+-2 ,n0 ,n1)
Note: See TracChangeset for help on using the changeset viewer.