From: Barry OReilly <gundaetiapo@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 14892@debbugs.gnu.org
Subject: bug#14892: [PATCH] Enhance Elisp compare functions (< <= > >=) to take var args
Date: Tue, 10 Sep 2013 10:54:02 -0400 [thread overview]
Message-ID: <CAFM41H05SxjxVqPgt8DnuFZez6NMgH521VeMgQjiFPZVW22nyw@mail.gmail.com> (raw)
In-Reply-To: <jwva9jk95xl.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 920 bytes --]
> 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.
[-- Attachment #2: Type: text/html, Size: 1096 bytes --]
next prev parent reply other threads:[~2013-09-10 14:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-17 15:58 bug#14892: Enhance Elisp compare functions (< <= > >=) to take var args Barry OReilly
2013-09-06 23:02 ` bug#14892: [PATCH] " Barry OReilly
2013-09-07 2:28 ` Stefan Monnier
2013-09-09 22:53 ` Barry OReilly
2013-09-10 13:20 ` Stefan Monnier
2013-09-10 14:54 ` Barry OReilly [this message]
2013-09-10 20:16 ` Stefan Monnier
2013-09-10 23:35 ` Barry OReilly
2013-09-11 1:08 ` Stefan Monnier
2013-09-11 5:10 ` Barry OReilly
2013-09-11 12:33 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFM41H05SxjxVqPgt8DnuFZez6NMgH521VeMgQjiFPZVW22nyw@mail.gmail.com \
--to=gundaetiapo@gmail.com \
--cc=14892@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.