From 98e1f05c0b5b8358b0aab0a31f164f51ccff6a4b Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Thu, 30 Apr 2015 12:23:21 +0100 Subject: [PATCH] at xc-time, dump forms not strings for compile-time-type-errors string-printing is too erratic between CL implementations -- e.g. some will look at macro lambda lists when pretty printing, others won't. Since we control our own code we can assure that all context forms in the compiler itself for compile-time-type-errors are dumpable. --- src/compiler/ir1opt.lisp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/compiler/ir1opt.lisp b/src/compiler/ir1opt.lisp index 4b4e47163..46cd64931 100644 --- a/src/compiler/ir1opt.lisp +++ b/src/compiler/ir1opt.lisp @@ -2211,6 +2211,10 @@ (return-from may-delete-vestigial-exit nil)))))) (values t)) +(defun compile-time-type-error-context (context) + #+sb-xc-host context + #-sb-xc-host (source-to-string context)) + (defun ir1-optimize-cast (cast &optional do-not-optimize) (declare (type cast cast)) (let ((value (cast-value cast)) @@ -2271,7 +2275,7 @@ ',(type-specifier atype) ',(type-specifier value-type) ',detail - ',(source-to-string context)))) + ',(compile-time-type-error-context context)))) ;; KLUDGE: FILTER-LVAR does not work for non-returning ;; functions, so we declare the return type of ;; %COMPILE-TIME-TYPE-ERROR to be * and derive the real type -- 2.11.4.GIT