From e240610bcc02cfe6f970131a362502d33be114c5 Mon Sep 17 00:00:00 2001 From: Paul Khuong Date: Tue, 9 Jul 2013 08:16:41 -0400 Subject: [PATCH] No more destructive MERGE of shared data in best-modular-version The old code worked by accident: few/no platform implements untagged signed modular arithmetic VOPs. The new code handles that common case to avoid consing a fresh list when the MERGE will be an identity. --- src/compiler/srctran.lisp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/srctran.lisp b/src/compiler/srctran.lisp index 18f7301..2fc1c40 100644 --- a/src/compiler/srctran.lisp +++ b/src/compiler/srctran.lisp @@ -3044,7 +3044,10 @@ ;; 3. >/>= width-matched :untagged (let* ((uuwidths (modular-class-widths *untagged-unsigned-modular-class*)) (uswidths (modular-class-widths *untagged-signed-modular-class*)) - (uwidths (merge 'list uuwidths uswidths #'< :key #'car)) + (uwidths (if (and uuwidths uswidths) + (merge 'list (copy-list uuwidths) (copy-list uswidths) + #'< :key #'car) + (or uuwidths uswidths))) (twidths (modular-class-widths *tagged-modular-class*))) (let ((exact (find (cons width signedp) uwidths :test #'equal))) (when exact -- 1.7.10.4