[Top][All Lists]

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

Re: Enabling --enable-check-lisp-object-type by default on x86 and AMD64

From: Paul Eggert
Subject: Re: Enabling --enable-check-lisp-object-type by default on x86 and AMD64
Date: Tue, 2 May 2017 15:14:17 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0

Originally, the Lisp_Object type was a struct containing bitfields. This was significantly slower than using integer shifting and masking on many platforms, so long ago the default Lisp_Object type was changed to be an integer. Nowadays Lisp_Object no longer contains bitfields even when --enable-check-lisp-object-type is used, so this old motivation is no longer relevant.

For x86-64 there should be little difference nowadays when --enable-check-lisp-object-type is used. For other platforms (e.g., x86), however, I suppose there can still be a significant (though small) difference. So when compiling emacs for production, it makes sense to omit --enable-check-lisp-object-type, for the benefit of x86 and similar platforms.

When developing, the advantages of --enable-check-lisp-object-type outweigh the small increase in runtime cost, particularly considering that x86-64 is the most common development platform nowadays and there the runtime cost is insignificant. So it makes sense to default --enable-check-lisp-object-type to "yes" if --enable-gcc-warnings is also enabled (which it is by default, in developer builds). I did this by installing the attached patch; comments welcome.

As a result, if you build master from a developer (Git-based) directory, --enable-check-lisp-object-type should now be the default. If you don't build from Git, I suggest configuring with --enable-gcc-warnings.

Attachment: 0001-Check-list-object-type-if-enable-gcc-warnings.txt
Description: Text document

reply via email to

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