[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 3ed79cd: Separate bytecode stack
From: |
Stefan Monnier |
Subject: |
Re: master 3ed79cd: Separate bytecode stack |
Date: |
Tue, 15 Mar 2022 15:29:45 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Eli Zaretskii [2022-03-15 16:42:01] wrote:
>> From: Mattias Engdegård <mattiase@acm.org>
>> Date: Tue, 15 Mar 2022 15:20:29 +0100
>> Cc: Emacs-Devel <emacs-devel@gnu.org>
>>
>> >> The latter alternative would become a little more palatable if we could
>> >> use flexible array struct members on all platforms. Given that we assume
>> >> C99, can we do that now?
>> >
>> > What do you mean by "flexible array struct members"? Please show a
>> > code snippet.
>>
>> I'm sure you know it well, it's the ability to put an incomplete array
>> declaration as the last member of a struct, as in:
>>
>> struct S { int n; float a[]; };
>>
>> which roughly means the same thing as declaring that array to be of size
>> zero.
>> It's not required in our case but would make the next_stack function (see
>> patch) go away.
>
> I think you can use this (we already use it elsewhere in Emacs).
AFAICT we usually use:
struct Lisp_Vector
{
union vectorlike_header header;
Lisp_Object contents[FLEXIBLE_ARRAY_MEMBER];
} GCALIGNED_STRUCT;
but I suspect that by now we don't need this compatibility hack.
Stefan
- Re: master 3ed79cd: Separate bytecode stack, Eli Zaretskii, 2022/03/13
- Re: master 3ed79cd: Separate bytecode stack, Mattias Engdegård, 2022/03/13
- Re: master 3ed79cd: Separate bytecode stack, Eli Zaretskii, 2022/03/13
- Re: master 3ed79cd: Separate bytecode stack, Mattias Engdegård, 2022/03/14
- Re: master 3ed79cd: Separate bytecode stack, Eli Zaretskii, 2022/03/14
- Re: master 3ed79cd: Separate bytecode stack, Mattias Engdegård, 2022/03/15
- Re: master 3ed79cd: Separate bytecode stack, Eli Zaretskii, 2022/03/15
- Re: master 3ed79cd: Separate bytecode stack, Robert Pluim, 2022/03/15
- Re: master 3ed79cd: Separate bytecode stack,
Stefan Monnier <=