[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eieio-debug-methodinvoke

From: Stefan Monnier
Subject: Re: eieio-debug-methodinvoke
Date: Thu, 22 Jan 2015 11:56:58 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> I did a git pull tonight to check it out. I'm looking forward to trying out
> multiple-dispatch and native type dispatch method handling.  I spent a lot
> of time optimizing the eieio version. Hopefully some of those same high
> level tricks remain.  (Comments indicate so.)

I haven't made a thorough comparison, but it seems that the new
dispatch code is significantly faster.  Here's the little test I used:

   (defclass sm-class0 () ())
   (defclass sm-class1 () ())
   (defmethod sm-fib ((x sm-class0)) 0)
   (defmethod sm-fib ((x sm-class1)) 1)
   (defmethod sm-fib (x)
     (cond ((eq x 0) (sm-fib (sm-class0 "toto")))
           ((eq x 1) (sm-fib (sm-class1 "toto")))
           (t (+ (sm-fib (- x 1)) (sm-fib (- x 2))))))

I byte-compiled it with emacs-24, and then ran the .elc with both
emacs-24 and master: for (sm-fib 23), the emacs-24 code took about twice
as much time to complete.

> In the meantime, my CEDET can't seem to load old .ede files. :( I'll assume
> I need to recompile or something for now.

It "should" work without recompiling anything.  So please, before
recompiling, try to keep the problem around to see if we can fix it.

> That function was useful when I was trying to get the method invocation
> order to be correct, and I needed a way to debug it.  Since those old
> structures are gone, this function won't be needed by me anymore.

Ah, that makes sense.

> Press SPC on any line that indicates there might be more to it, such
> as a #<list o stuff> or #<overlay >  or some # object (usually colored) to
> open it up.  If there are lists upon lists, you can keep drilling in, even
> recursive structures are opened.


> Example:
> If you have (semantic-mode 1) enabled, you could do:
> M-x data-debug-eval-expression RET (semantic-fetch-tags) RET
> in some Emacs Lisp buffer.  You can navigate around the data structure
> browsing the tags using SPC to open/close, or n/p to move up/down or N/P to
> move up/down while also opening what's under point.

Ah, nice, indeed (tho I wouldn't put a quote in front of symbols since
that confuses the difference between the value and an expression which
returns this value).

> I have that fcn bound to M-: by default, and hooked into edebug via
> an A binding so I can eval large data values.  I've become quite dependent
> on it.

Its interactive spec should probably use read--expression (which clearly
needs to be renamed to something without "--") so as to get completion.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]