X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fsrctran.lisp;h=f0df2a00df58e8b6b70fe4477519260de1d777b0;hb=22c1de0a40df83bb5628974010a879cb2c17ff53;hp=4b70251be13484faef89c2cdb0c2003057be0d44;hpb=3ab22aeab40acb47148ccb851f6d1b3afdcda15b;p=sbcl.git diff --git a/src/compiler/srctran.lisp b/src/compiler/srctran.lisp index 4b70251..f0df2a0 100644 --- a/src/compiler/srctran.lisp +++ b/src/compiler/srctran.lisp @@ -2956,6 +2956,24 @@ #-sb-xc-host ; (See CROSS-FLOAT-INFINITY-KLUDGE.) (deftransform > ((x y) (float float) *) (ir1-transform-< y x x y '<)) + +(defun ir1-transform-char< (x y first second inverse) + (cond + ((same-leaf-ref-p x y) nil) + ;; If we had interval representation of character types, as we + ;; might eventually have to to support 2^21 characters, then here + ;; we could do some compile-time computation as in IR1-TRANSFORM-< + ;; above. -- CSR, 2003-07-01 + ((and (constant-continuation-p first) + (not (constant-continuation-p second))) + `(,inverse y x)) + (t (give-up-ir1-transform)))) + +(deftransform char< ((x y) (character character) *) + (ir1-transform-char< x y x y 'char>)) + +(deftransform char> ((x y) (character character) *) + (ir1-transform-char< y x x y 'char<)) ;;;; converting N-arg comparisons ;;;;