From 6bc85bd70112974c32441597aa8af11cac03fa73 Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Sat, 30 May 2015 20:47:51 +0300 Subject: [PATCH] Use boxed constants for known full calls. BOXED-REF-P avoids consing for ordinary full calls, but because of VOPs it doesn't for known functions. Yet many known functions do not have VOPs or transforms. That's what CALL-FULL-LIKE-P checks for. --- src/compiler/ir1util.lisp | 2 +- src/compiler/ir2tran.lisp | 3 ++- tests/dynamic-extent.impure.lisp | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/ir1util.lisp b/src/compiler/ir1util.lisp index 4b0cf6670..cd85a0ac8 100644 --- a/src/compiler/ir1util.lisp +++ b/src/compiler/ir1util.lisp @@ -2192,7 +2192,7 @@ is :ANY, the function name is not checked." (defun call-full-like-p (call) - (declare (type combination call)) + (declare (type basic-combination call)) (let ((kind (basic-combination-kind call))) (or (eq kind :full) (and (eq kind :known) diff --git a/src/compiler/ir2tran.lisp b/src/compiler/ir2tran.lisp index 3a1959c24..35344b917 100644 --- a/src/compiler/ir2tran.lisp +++ b/src/compiler/ir2tran.lisp @@ -128,7 +128,8 @@ (defun boxed-ref-p (ref) (let ((dest (lvar-dest (ref-lvar ref)))) - (cond ((and (basic-combination-p dest) (eq :full (basic-combination-kind dest))) + (cond ((and (basic-combination-p dest) + (call-full-like-p dest)) t) ((and (return-p dest) (%return-is-boxed dest))) (t diff --git a/tests/dynamic-extent.impure.lisp b/tests/dynamic-extent.impure.lisp index 722b9096b..697480e42 100644 --- a/tests/dynamic-extent.impure.lisp +++ b/tests/dynamic-extent.impure.lisp @@ -609,7 +609,6 @@ (assert-no-consing (vector-on-stack :x :y))) (with-test (:name (:no-consing :specialized-dx-vectors) - :fails-on :x86 :skipped-on `(not (and :stack-allocatable-vectors :c-stack-is-control-stack))) (assert-no-consing (make-array-on-stack-1)) -- 2.11.4.GIT