X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-introspect%2Fxref-test-data.lisp;h=ff44e10b2722cbfe8d3d3873f207eaf261ee7c60;hb=371577a214ce2659c271279ad48e4c42e1c0c93e;hp=e76fbba776f71afc17b674c51eff68ba4b27fa67;hpb=d351f80b1076dd54e5aee3dacab82d59c2e58060;p=sbcl.git diff --git a/contrib/sb-introspect/xref-test-data.lisp b/contrib/sb-introspect/xref-test-data.lisp index e76fbba..ff44e10 100644 --- a/contrib/sb-introspect/xref-test-data.lisp +++ b/contrib/sb-introspect/xref-test-data.lisp @@ -175,4 +175,47 @@ (macro/1))) (inner-m)))) +;;; Inlining functions with non-trivial lambda-lists. +(declaim (inline inline/3)) +(defun inline/3 (a &optional b &key c d) + (list a b c d)) +(defun inline/3-user/1 (a) + (inline/3 a)) +(defun inline/3-user/2 (a b) + (inline/3 a b)) +(defun inline/3-user/3 (a b c) + (inline/3 a b :c c)) +(defun inline/3-user/4 (a b c d) + (inline/3 a b :d d :c c)) + +(declaim (inline inline/4)) +(defun inline/4 (a &rest more) + (cons a more)) +(defun inline/4-user () + (inline/4 :a :b :c)) + ;;; Test references to / from compiler-macros + + +;;; Test specialization + +(defclass a-class () ()) +(defclass a-subclass (a-class) ()) + +(defstruct a-structure) +(defstruct (a-substructure (:include a-structure))) + +(defvar *an-instance-of-a-class* (make-instance 'a-class)) +(defvar *an-instance-of-a-subclass* (make-instance 'a-subclass)) + +(defvar *an-instance-of-a-structure* (make-a-structure)) +(defvar *an-instance-of-a-substructure* (make-a-substructure)) + +(defmethod a-gf-1 ((x a-class))) +(defmethod a-gf-1 ((x a-structure))) + +(defmethod a-gf-2 ((x (eql *an-instance-of-a-class*)))) +(defmethod a-gf-2 ((x (eql *an-instance-of-a-structure*)))) + +(defmethod a-gf-3 ((x (eql *an-instance-of-a-subclass*)))) +(defmethod a-gf-3 ((x (eql *an-instance-of-a-substructure*))))