emacs-devel
[Top][All Lists]
Advanced

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

Re: scratch/comp-static-data 82226254c86: Use ephemeral and staticvec ve


From: Po Lu
Subject: Re: scratch/comp-static-data 82226254c86: Use ephemeral and staticvec vectors to refer to allocated objects.
Date: Thu, 09 Mar 2023 09:26:13 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Vibhav Pant <vibhavp@gmail.com> writes:

> +static void
> +alloc_class_check (Lisp_Object alloc_class)
> +{
> +  bool valid = EQ (alloc_class, Qd_default) ||
> +    EQ (alloc_class, Qd_impure) ||
> +    EQ (alloc_class, Qd_ephemeral);
> +  if (!valid)
> +    {
> +      xsignal2 (Qnative_ice,
> +             build_string ("invalid lisp data allocation class"),
> +             alloc_class);
> +      assume (false);
> +    }
> +}

You wrote this wrong again; it should be:

  bool valid = (EQ (alloc_class, Qd_default)
                || EQ (alloc_class, Qd_impure)
                || EQ (alloc_class, Qd_epemeral))

the `eassume (false)' is redundant, as xsignal2 is noreturn.  And
perhaps it would be better to move valid into the if condition entirely.

Thanks.


reply via email to

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