From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Set operations on bool-vectors Date: Fri, 20 Sep 2013 19:44:36 -0700 Message-ID: <523D0814.5010806@dancol.org> References: <523CD363.6020400@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sRgLOA5QSmTjXkqnH2r0sL6U6KS3NhFh4" X-Trace: ger.gmane.org 1379731561 6231 80.91.229.3 (21 Sep 2013 02:46:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Sep 2013 02:46:01 +0000 (UTC) Cc: Emacs development discussions To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 21 04:46:03 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VNDCt-0006e9-5V for ged-emacs-devel@m.gmane.org; Sat, 21 Sep 2013 04:46:03 +0200 Original-Received: from localhost ([::1]:58409 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNDCs-0002WD-Jw for ged-emacs-devel@m.gmane.org; Fri, 20 Sep 2013 22:46:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNDCk-0002W5-I6 for emacs-devel@gnu.org; Fri, 20 Sep 2013 22:46:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VNDCc-0004r9-Kl for emacs-devel@gnu.org; Fri, 20 Sep 2013 22:45:54 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:44995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNDCc-0004qu-D7 for emacs-devel@gnu.org; Fri, 20 Sep 2013 22:45:46 -0400 Original-Received: from c-76-22-66-162.hsd1.wa.comcast.net ([76.22.66.162] helo=[192.168.1.52]) by dancol.org with esmtpsa (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1VNDCa-0002r8-Vt; Fri, 20 Sep 2013 19:45:45 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: X-Enigmail-Version: 1.5.2 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:163525 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --sRgLOA5QSmTjXkqnH2r0sL6U6KS3NhFh4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 9/20/13 6:57 PM, Stefan Monnier wrote: >> =3D=3D=3D modified file 'src/alloc.c' >> --- src/alloc.c 2013-09-04 22:34:04 +0000 >> +++ src/alloc.c 2013-09-19 22:24:27 +0000 >> @@ -2003,6 +2003,29 @@ >> return val; >> } >=20 > Could you describe the intention of the changes in alloc.c (basically, > provide ChangeLog entries)? Sure. Something like this? 2013-09-21 Daniel Colascione * alloc.c (bool_vector_payload_bytes): New function: computes rounded-up payload size for a bool vector. Always allocate at least size_t bytes even for a zero-size vector. (Fmake_bool_vector): Instead of calling Fmake_vector, which performs redundant initialization and argument checking, just call allocate_vector ourselves. Make sure we clear any terminating padding to zero. (vector_nbytes,sweep_vectors): Use bool_vector_payload_bytes instead of open-coding the size calculation. >> + doc: /* Compute A =3D B ^ C, bitwise exclusive or. >=20 > Why not make it C =3D A ^ B and then make C optional? > Same for other similar functions: make the destination argument optiona= l. Then we wouldn't be able to extend these functions to accept more than three arguments: we wouldn't know whether the argument at the end was another operand or a destination. --sRgLOA5QSmTjXkqnH2r0sL6U6KS3NhFh4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (Darwin) iQIcBAEBAgAGBQJSPQgZAAoJEMAaIROpHW7IzsYP/1laMOL19UTnnKnpc/OAnfNc cdl0VnGqlKnhzzXi3Pznaf8gU8wAGdWuDim7rjPaYH95LliMFH0ClZNoFl4eY2oL 5qtq/3hb2xykYG4PO+u9vi3TQN6cW3ebgEmPVSs/48WUp2DR8gbfmUznGA7in6va jTUPC0tzK9bgvvyFMaLCgM5C5HumjQIhjv35csXbTHQBB5h3DBQHZCre81tQsFY0 PLRKnev9lB6FsfdQTXb+IOyvbfD2lBjqJ/hWF0wf+A5uTsa6vdRv1RyOY6WDTf4S RCLVj+UKwo5wJxOENfSOjxiopX8031zo6aEYv8T6xHesfHqYv+VEJJlWWtlvZFB7 riLRqXrrgMXV8fHlN083m3OaAmKqBxp6PBuftpRTU+L7pWObCrHDtl/5rJGAPOgV 4iU+YpJW2XfRAFNYW6IVS652BIeUA7Pm33phbgYztOXscmVZEP58Pb0CGrJ32Iso EB8SFj3cQK/3DsmtEkcKnnwY/ZVFmIi/4vbm2oxrSca7c/r9N83D4HgBS7GY1SyR r1BYpCn+URGHhShUmnKbNVUGHnegeyYXdKPx7agMRwn9tjQoq5UtHuHiK2HmiFux bNyBDewmRjEPiy2KLDu+kEGm1aGuwVfb5q6c/5GVpw2PqgsDjJrJGn5qbFCclwHK y/aI3z2Df8AIrk/235pw =mYpw -----END PGP SIGNATURE----- --sRgLOA5QSmTjXkqnH2r0sL6U6KS3NhFh4--