From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: pure-fns in byte-opt.el Date: Sat, 29 Jul 2017 20:21:12 +0300 Message-ID: <83a83n2m7r.fsf@gnu.org> References: <20170725020650.GA12601@holos.localdomain> <20170726010000.GA14292@holos.localdomain> <83o9s75kus.fsf@gnu.org> <20170727023608.GA1895@holos.localdomain> <83y3r94xo5.fsf@gnu.org> <20170728002448.GA2431@holos.localdomain> <83mv7p3uy5.fsf@gnu.org> <20170729012407.GA6581@holos.localdomain> <83vamb3duz.fsf@gnu.org> <20170729163446.GA9109@holos.localdomain> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1501348896 1148 195.159.176.226 (29 Jul 2017 17:21:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 29 Jul 2017 17:21:36 +0000 (UTC) Cc: emacs-devel@gnu.org To: Mark Oteiza Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 29 19:21:29 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbVQe-0008KU-Ll for ged-emacs-devel@m.gmane.org; Sat, 29 Jul 2017 19:21:28 +0200 Original-Received: from localhost ([::1]:52993 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dbVQk-0000tM-IM for ged-emacs-devel@m.gmane.org; Sat, 29 Jul 2017 13:21:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dbVQd-0000t5-U5 for emacs-devel@gnu.org; Sat, 29 Jul 2017 13:21:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dbVQa-00024H-Ho for emacs-devel@gnu.org; Sat, 29 Jul 2017 13:21:27 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37209) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dbVQa-00024B-Dq; Sat, 29 Jul 2017 13:21:24 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1110 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dbVQZ-0005HU-CY; Sat, 29 Jul 2017 13:21:24 -0400 In-reply-to: <20170729163446.GA9109@holos.localdomain> (message from Mark Oteiza on Sat, 29 Jul 2017 12:34:46 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:217136 Archived-At: > Date: Sat, 29 Jul 2017 12:34:46 -0400 > From: Mark Oteiza > Cc: emacs-devel@gnu.org > > >So I think the problem happens in unidata-word-list-compress, and it > >happens because make-vector, which that function calls always returns > >the same vector, so the vectors used by that function and created by > >it are all messed up. > > I don't follow: why does it always return the same vector? That's how I understand what the byte compiler does when you declare that function "pure". > That > particular call to make-vector should be unaffected by make-vector being > marked pure, because its arguments aren't constants. Sorry, I meant the make-vector call in unidata-gen-table-word-list, whose result is passed to unidata-word-list-compress. > OTOH, the form > (make-vector 128 nil) would indeed get byte-compiled into the constant > [nil nil … nil] The problem, I think, is not with a single call, but with that call being in a loop, and the code expects each iteration to produce a new vector.