all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: emacs-devel@gnu.org
Subject: Re: master f0b0105: Hoist some byte-code checking out of eval
Date: Wed, 20 May 2020 19:21:44 -0400	[thread overview]
Message-ID: <jwv367ury51.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <bf60c9d7-455e-7312-340c-7b39c77c3013@cs.ucla.edu> (Paul Eggert's message of "Wed, 20 May 2020 14:21:33 -0700")

>> AFAIK this function is only used in the
>> extremely rare case that Elisp does
>>      (byte-code "blabla")
>> So I think some of the checks you removed from `exec_byte_code` will
>> simply not be performed any more (at least not on
>> `byte-code-function-p` objects).
>
> Thanks for reviewing the patch.
>
> What checks do you have in mind? Formerly, exec_byte_code did this:
>
>   CHECK_STRING (bytestr); 
>   CHECK_VECTOR (vector); 
>   CHECK_FIXNAT (maxdepth);
>   if (STRING_MULTIBYTE (bytestr)) 
>     bytestr = Fstring_as_unibyte (bytestr);
>
> Now, byte-code does this:
>
>   if (! (STRINGP (bytestr) && VECTORP (vector) && FIXNATP (maxdepth))) 
>     error ("Invalid byte-code");  
>
>   if (STRING_MULTIBYTE (bytestr)) 
>     bytestr = Fstring_as_unibyte (bytestr);
>
> and to my eye this does everything that exec_byte_code used to do.

My point is that 99% of the calls to `exec_byte_code` don't go through
`Fbyte_code`.


        Stefan




  reply	other threads:[~2020-05-20 23:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200520062521.6783.95407@vcs0.savannah.gnu.org>
     [not found] ` <20200520062523.3EF4A20AEB@vcs0.savannah.gnu.org>
2020-05-20 12:03   ` master f0b0105: Hoist some byte-code checking out of eval Stefan Monnier
2020-05-20 21:21     ` Paul Eggert
2020-05-20 23:21       ` Stefan Monnier [this message]
2020-05-21  0:54         ` Paul Eggert
2020-05-21  2:30           ` Stefan Monnier
2020-05-21  5:26             ` Paul Eggert
2020-05-21 13:35               ` 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=jwv367ury51.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eggert@cs.ucla.edu \
    --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 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.