[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14892: [PATCH] Enhance Elisp compare functions (< <= > >=) to take v
From: |
Barry OReilly |
Subject: |
bug#14892: [PATCH] Enhance Elisp compare functions (< <= > >=) to take var args |
Date: |
Tue, 10 Sep 2013 10:54:02 -0400 |
> Looking at your patch a second time, I don't see how/where it
> handles (< a b c) in byte-compiled code: the byte-codes only
> handle 2-arguments, and the byte-compiler is left unchanged.
(disassemble (byte-compile (lambda () (< x y))))
byte code:
args: nil
0 varref x
1 varref y
2 lss
3 return
(disassemble (byte-compile (lambda () (< x y z))))
byte code:
args: nil
0 constant <
1 varref x
2 varref y
3 varref z
4 call 3
5 return
So it works with many args, it just byte compiles to a general
function call rather than to a specific comparison bytecode.
I had considered this before submitting the patch, but decided it
might be a premature optimization to extend the byte compiler in
this way. There are no users of more than 2 args to start with.
'make check' runs the new data-tests as byte compiled, so it has
been tested.
- bug#14892: [PATCH] Enhance Elisp compare functions (< <= > >=) to take var args, Barry OReilly, 2013/09/06
- bug#14892: [PATCH] Enhance Elisp compare functions (< <= > >=) to take var args, Stefan Monnier, 2013/09/06
- bug#14892: [PATCH] Enhance Elisp compare functions (< <= > >=) to take var args, Barry OReilly, 2013/09/09
- bug#14892: [PATCH] Enhance Elisp compare functions (< <= > >=) to take var args, Stefan Monnier, 2013/09/10
- bug#14892: [PATCH] Enhance Elisp compare functions (< <= > >=) to take var args,
Barry OReilly <=
- bug#14892: [PATCH] Enhance Elisp compare functions (< <= > >=) to take var args, Stefan Monnier, 2013/09/10
- bug#14892: [PATCH] Enhance Elisp compare functions (< <= > >=) to take var args, Barry OReilly, 2013/09/10
- bug#14892: [PATCH] Enhance Elisp compare functions (< <= > >=) to take var args, Stefan Monnier, 2013/09/10
- bug#14892: [PATCH] Enhance Elisp compare functions (< <= > >=) to take var args, Barry OReilly, 2013/09/11
- bug#14892: [PATCH] Enhance Elisp compare functions (< <= > >=) to take var args, Stefan Monnier, 2013/09/11