emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master f0b0105: Hoist some byte-code checking out of eval


From: Paul Eggert
Subject: Re: master f0b0105: Hoist some byte-code checking out of eval
Date: Wed, 20 May 2020 14:21:33 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 5/20/20 5:03 AM, Stefan Monnier wrote:
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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]