all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Antipov <dmantipov@yandex.ru>
To: Jason Rumney <jasonr@gnu.org>
Cc: raeburn@gnu.org, emacs-devel@gnu.org
Subject: Re: Redundant type checking in window.c and w32menu.c
Date: Thu, 21 Jun 2007 19:46:32 +0400	[thread overview]
Message-ID: <467A9D58.1030309@yandex.ru> (raw)
In-Reply-To: <46799227.3070905@gnu.org>

Jason Rumney wrote:

> dmantipov wrote:
>> Jason Rumney wrote
>>> Dmitry Antipov wrote:
>>>
>>>     
>>>> +#define Fcar(c) _FCAR (c)
>>>> +#define Fcar_safe(c) _FCAR_SAFE (c)
>>>> +#define Fcdr(c) _FCDR (c)
>>>> +#define Fcdr_safe(c) _FCDR_SAFE (c)
>>>>       
>>> How does lisp code then call these C macros?
>>>     
>> It will call original functions which are preserved in data.c. Lisp code calls them via pointers, so we definitely need to preserve an addressable versions.
>>   
> 
> 
> Is this optimisation really worth the confusion of having two versions
> of these functions in the code?

YMMV :-) - since these functions has the only arg, we shouldn't loose too much
on passing an arguments and performing the call. Probably this also depends
on compiler options passed and even from the compiler's version.

Another interesting thing to try (probably x86 only) is to use
__attribute__((regparm (1))) and see what happens...

Dmitry

  reply	other threads:[~2007-06-21 15:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-19 14:44 Redundant type checking in window.c and w32menu.c Dmitry Antipov
2007-06-19 14:55 ` Stefan Monnier
2007-06-19 18:46 ` Ken Raeburn
2007-06-20 14:12   ` Dmitry Antipov
2007-06-20 15:20     ` Jason Rumney
2007-06-20 17:55       ` dmantipov
2007-06-20 20:46         ` Jason Rumney
2007-06-21 15:46           ` Dmitry Antipov [this message]
2007-06-21 17:38           ` Ken Raeburn
2007-06-20 20:12     ` Tom Tromey

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=467A9D58.1030309@yandex.ru \
    --to=dmantipov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=jasonr@gnu.org \
    --cc=raeburn@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 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.