Raymond Toy pushed to branch master at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • src/code/string.lisp
    ... ... @@ -280,37 +280,11 @@
    280 280
     		    ,(if lessp
    
    281 281
     			 `nil
    
    282 282
     			 `(- (the fixnum index) ,offset1)))
    
    283
    -		   #-unicode
    
    284 283
     		   ((,(if lessp 'char< 'char>)
    
    285 284
     		     (schar string1 index)
    
    286 285
     		     (schar string2 (+ (the fixnum index) (- start2 start1))))
    
    287 286
     		    (- (the fixnum index) ,offset1))
    
    288
    -		   #-unicode
    
    289
    -		   (t nil)
    
    290
    -		   #+unicode
    
    291
    -		   (t
    
    292
    -		    ;; Compare in code point order.  See
    
    293
    -		    ;; http://icu-project.org/docs/papers/utf16_code_point_order.html
    
    294
    -		    (flet ((fixup (code)
    
    295
    -			     (if (>= code #xe000)
    
    296
    -				 (- code #x800)
    
    297
    -				 (+ code #x2000))))
    
    298
    -		      (declare (inline fixup))
    
    299
    -		      (let* ((c1 (char-code (schar string1 index)))
    
    300
    -			     (c2 (char-code (schar string2
    
    301
    -						   (+ (the fixnum index)
    
    302
    -						      (- start2 start1))))))
    
    303
    -			(cond ((and (>= c1 #xd800)
    
    304
    -				    (>= c2 #xd800))
    
    305
    -			       (let ((fix-c1 (fixup c1))
    
    306
    -				     (fix-c2 (fixup c2)))
    
    307
    -				 (if (,(if lessp '< '>) fix-c1 fix-c2)
    
    308
    -				     (- (the fixnum index) ,offset1)
    
    309
    -				     nil)))
    
    310
    -			      (t
    
    311
    -			       (if (,(if lessp '< '>) c1 c2)
    
    312
    -				   (- (the fixnum index) ,offset1)
    
    313
    -				   nil)))))))
    
    287
    +		   (t nil))
    
    314 288
     	     ,(if equalp `(- (the fixnum end1) ,offset1) 'nil))))))
    
    315 289
     ) ; eval-when
    
    316 290