From: "Johan Bockgård" <bojohan@gnu.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Markus Sauermann <mhoram@gmx.de>, 7145@debbugs.gnu.org
Subject: bug#7145: elisp-code behaves differently after byte-compilation
Date: Sat, 02 Oct 2010 12:41:18 +0200 [thread overview]
Message-ID: <877hi0zxkh.fsf@gnu.org> (raw)
In-Reply-To: <m239spotyg.fsf@whitebox.home> (Andreas Schwab's message of "Sat, 02 Oct 2010 10:54:47 +0200")
Andreas Schwab <schwab@linux-m68k.org> writes:
> "Markus Sauermann" <mhoram@gmx.de> writes:
>
>> The following code however shows a case where this is not the case.
>>
>> --- BEGIN CODE ---
>> (let ((fun (lambda () (let ((bar "foo")
>> (baz "foo"))
>> (eq bar baz)))))
>> (list (funcall (byte-compile fun))
>> (funcall fun)))
>> --- END CODE---
>>
>> Evaluation this code (don't try to byte-compile it, because it is buggy ;-) ) results in:
>>
>> --- BEGIN OUTPUT ---
>> (t nil)
>> --- END OUTPUT ---
>
> This is not a bug.
But this is, IMO:
(progn
(defsubst spooky-action-at-a-distance ()
(let ((a (concat "a" "bc")))
(store-substring a 0 "123")))
(defun foo ()
(spooky-action-at-a-distance)
(concat "ab" "c"))
(byte-compile 'foo)
(foo))
=> "123"
next prev parent reply other threads:[~2010-10-02 10:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-02 1:53 bug#7145: elisp-code behaves differently after byte-compilation Markus Sauermann
2010-10-02 8:54 ` Andreas Schwab
2010-10-02 10:41 ` Johan Bockgård [this message]
2010-10-03 5:12 ` Chong Yidong
2010-10-05 17:37 ` Markus Sauermann
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=877hi0zxkh.fsf@gnu.org \
--to=bojohan@gnu.org \
--cc=7145@debbugs.gnu.org \
--cc=mhoram@gmx.de \
--cc=schwab@linux-m68k.org \
/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.