mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2025-12-06 02:40:26 -08:00
clos: cleanup: remove unused file, use when-let
File macros.lsp was used for bootstrapping in the past, but it is not loaded anymore.
This commit is contained in:
parent
735d49bfd1
commit
d45f079c3c
2 changed files with 5 additions and 40 deletions
|
|
@ -340,14 +340,13 @@ their lambda lists ~A and ~A are not congruent."
|
||||||
((remove-method removed-method) nil rm-p)
|
((remove-method removed-method) nil rm-p)
|
||||||
&allow-other-keys)
|
&allow-other-keys)
|
||||||
(declare (ignore object dep initargs))
|
(declare (ignore object dep initargs))
|
||||||
(let ((method (cond (am-p added-method)
|
(when-let ((method (cond (am-p added-method)
|
||||||
(rm-p removed-method))))
|
(rm-p removed-method))))
|
||||||
;; update-dependent is also called when the gf itself is reinitialized,
|
;; update-dependent is also called when the gf itself is reinitialized,
|
||||||
;; so make sure we actually have a method that's added or removed
|
;; so make sure we actually have a method that's added or removed
|
||||||
(when method
|
(let ((spec (first (method-specializers method)))) ; the class being initialized or allocated
|
||||||
(let ((spec (first (method-specializers method)))) ; the class being initialized or allocated
|
(when (classp spec) ; sanity check against eql specialization
|
||||||
(when (classp spec) ; sanity check against eql specialization
|
(recursively-update-classes spec)))))
|
||||||
(recursively-update-classes spec))))))
|
|
||||||
|
|
||||||
(let ((x (make-instance 'initargs-updater)))
|
(let ((x (make-instance 'initargs-updater)))
|
||||||
(add-dependent #'shared-initialize x)
|
(add-dependent #'shared-initialize x)
|
||||||
|
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
;;;; -*- Mode: Lisp; Syntax: Common-Lisp; indent-tabs-mode: nil; Package: CLOS -*-
|
|
||||||
;;;; vim: set filetype=lisp tabstop=8 shiftwidth=2 expandtab:
|
|
||||||
|
|
||||||
;;;;
|
|
||||||
;;;; Copyright (c) 1992, Giuseppe Attardi.
|
|
||||||
;;;; Copyright (c) 2001, Juan Jose Garcia Ripoll.
|
|
||||||
;;;;
|
|
||||||
;;;; This program is free software; you can redistribute it and/or
|
|
||||||
;;;; modify it under the terms of the GNU Library General Public
|
|
||||||
;;;; License as published by the Free Software Foundation; either
|
|
||||||
;;;; version 2 of the License, or (at your option) any later version.
|
|
||||||
;;;;
|
|
||||||
;;;; See file '../Copyright' for full details.
|
|
||||||
|
|
||||||
(in-package "CLOS")
|
|
||||||
|
|
||||||
(defmacro mapappend (fun &rest args)
|
|
||||||
`(reduce #'append (mapcar ,fun ,@args)))
|
|
||||||
|
|
||||||
(defmacro ensure-up-to-date-instance (instance)
|
|
||||||
;; The up-to-date status of a class is determined by
|
|
||||||
;; instance.sig. This slot of the C structure contains a list of
|
|
||||||
;; slot definitions that was used to create the instance. When the
|
|
||||||
;; class is updated, the list is newly created. Structures are also
|
|
||||||
;; "instances" but keep ECL_UNBOUND instead of the list.
|
|
||||||
`(let* ((i ,instance)
|
|
||||||
(s (si::instance-sig i)))
|
|
||||||
(declare (:read-only i s))
|
|
||||||
(when (si:sl-boundp s)
|
|
||||||
(unless (eq s (class-slots (si::instance-class i)))
|
|
||||||
(update-instance i)))))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue