GNU bug report logs -
#50777
Dropping EIEIO from xref (for performance)
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Fri, 24 Sep 2021 13:30:02 UTC
Severity: normal
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 24.09.2021 17:49, Stefan Monnier wrote:
>> That creates some incompatibility (third-party packages can't inherit from
>> 'xref-location' anymore, or use 'make-instance', 'oref' or 'with-slots' with
>> our values),
>
> About that: it should be fairly easy to get `make-instance`, `oref`, and
> `with-slots` to work with cl-defstruct objects/classes.
>
> This should be easy enough that we *could* potentially consider doing
> those changes "right away" (i.e. for Emacs-28).
Interesting point.
Not sure we really want to: I imagine the removal of the use of
'make-instance' contributed to the overall performance improvement. If
I'm right, discouraging of its use (for this particular purpose) in
third-party code seems like a good idea.
> As for the inheritance, they can still inherit from `xref-location` but:
> - not with `defclass` (the subclass needs to be defined with `cl-defstruct`
> instead).
> - they can't inherit from both `xref-location` and something else any more.
There is no 'xref-location' structure, it's only defined by generic
functions. I think that's better.
'xref-location' has always been a class with empty definition.
One area of bigger concern is whether code compiled against the new
version of Xref would work with the old one without recompiling (and
vice versa). I guess for that to work we need to disable inlining on
xref-item's accessors, at least. Maybe there's something else I'm missing.
This bug report was last modified 3 years and 327 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.