From: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
To: Andrea Corallo <akrl@sdf.org>
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: How does nativecomp compile circular lists?
Date: Thu, 29 Jul 2021 11:43:08 +0100 [thread overview]
Message-ID: <edc7329b-d0b0-a358-8076-e3335727adff@gmail.com> (raw)
In-Reply-To: <xjfwnpaeamk.fsf@sdf.org>
[-- Attachment #1.1: Type: text/plain, Size: 2675 bytes --]
On 28/07/2021 4:11 PM, Andrea Corallo wrote:
> Jimmy Yuen Ho Wong <wyuenho@gmail.com> writes:
>
> [...]
>
>> [re-adding the list]
>>
>> Hi Jimmy,
>>
>> thanks for the patch.
>>
>> So I guess is clear this is unrelated to circular lists and probably
>> disassemble is just broken for every native compiled function in this
>> configuration.
>>
>> We might have other architecture+OS where function labels start with '_'
>> but so far the patch LGTM, I just suggest a small nit.
>>
>> > diff --git a/lisp/emacs-lisp/disass.el b/lisp/emacs-lisp/disass.el
>> > index 6ac76f1c19..d0e3bf7bf4 100644
>> > --- a/lisp/emacs-lisp/disass.el
>> > +++ b/lisp/emacs-lisp/disass.el
>> > @@ -95,6 +95,7 @@ disassemble-internal
>> > (re-search-forward (concat "^.*"
>> > (regexp-quote
>> > (concat "<"
>> > + (if (eq system-type 'darwin) "_")
>> ^^^
>> I'd use `when' here.
>> > (comp-c-func-name
>> > (subr-name obj) "F" t)
>> > ">:"))))
>>
>> Do you aready have copyright assignment?
>>
>> Best Regards
>>
>> Andrea
>>
>> I do have an existing copyright assignment. No objection to using a when there, would you like me to submit a new patch
>> or you are fine with editing it yourself?
> If you could provide a complete patch (including Changelog entry) that
> would be appreciated thanks (please see the CONTRIBUTE file if in
> doubt). I'll be happy to install your patch if you don't have write
> access.
>
>> As to whether this is related to circular lists, I'm not so sure yet.
> This is certanly not related to circular lists, this is just about how
> lables are named on this specific triplet.
>
>> There's definitely something in native compilation
>> that compiles code that behaves differently when circular lists are involved, I just haven't found out what interaction
>> with circular lists will result in compilation failure or optimizing the result away. Any clues for what I should try is
>> much appreciated.
> If you have some code/package that behaves differently byte vs native
> compiled you should be able to identify the function causing the
> difference when executed. Once that is done we could start
> investigating.
>
> Regards
>
> Andrea
Here's a new patch. Thanks in advance for installing it.
[-- Attachment #1.2: Type: text/html, Size: 3426 bytes --]
[-- Attachment #2: disass.el.patch --]
[-- Type: text/plain, Size: 656 bytes --]
diff --git a/lisp/emacs-lisp/disass.el b/lisp/emacs-lisp/disass.el
index 6ac76f1c19..bb2e4849ad 100644
--- a/lisp/emacs-lisp/disass.el
+++ b/lisp/emacs-lisp/disass.el
@@ -95,6 +95,7 @@ disassemble-internal
(re-search-forward (concat "^.*"
(regexp-quote
(concat "<"
+ (when (eq system-type 'darwin) "_")
(comp-c-func-name
(subr-name obj) "F" t)
">:"))))
next prev parent reply other threads:[~2021-07-29 10:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-27 7:21 How does nativecomp compile circular lists? Jimmy Yuen Ho Wong
2021-07-27 9:28 ` Andrea Corallo via Emacs development discussions.
2021-07-28 2:09 ` Jimmy Yuen Ho Wong
[not found] ` <6247f78b-282f-27e7-e0cf-6bc3b1cdee26@gmail.com>
2021-07-28 7:20 ` Andrea Corallo via Emacs development discussions.
2021-07-28 13:49 ` Jimmy Yuen Ho Wong
2021-07-28 15:11 ` Andrea Corallo via Emacs development discussions.
2021-07-29 10:43 ` Jimmy Yuen Ho Wong [this message]
2021-07-30 8:20 ` Andrea Corallo via Emacs development discussions.
2021-08-03 7:23 ` Jimmy Yuen Ho Wong
2021-08-03 8:28 ` Andrea Corallo via Emacs development discussions.
2021-07-28 1:15 ` Michael Heerdegen
2021-07-28 2:18 ` Jimmy Yuen Ho Wong
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=edc7329b-d0b0-a358-8076-e3335727adff@gmail.com \
--to=wyuenho@gmail.com \
--cc=akrl@sdf.org \
--cc=emacs-devel@gnu.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).