From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: Regexp bytecode disassembler Date: Sat, 21 Mar 2020 17:56:51 +0100 Message-ID: <59812DA2-FC31-436E-BC78-1C8A887B0471@acm.org> References: <4201DF24-BCC4-4C08-9857-38207B7C10B4@acm.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="52977"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 21 17:57:34 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jFhRE-000Ddm-Or for ged-emacs-devel@m.gmane-mx.org; Sat, 21 Mar 2020 17:57:32 +0100 Original-Received: from localhost ([::1]:39110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFhRD-0005ET-Qn for ged-emacs-devel@m.gmane-mx.org; Sat, 21 Mar 2020 12:57:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52296) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFhQf-0004i2-Ub for emacs-devel@gnu.org; Sat, 21 Mar 2020 12:56:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFhQe-0006CF-Q5 for emacs-devel@gnu.org; Sat, 21 Mar 2020 12:56:57 -0400 Original-Received: from mail210c50.megamailservers.eu ([91.136.10.220]:48156 helo=mail194c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jFhQe-0006Bq-9f for emacs-devel@gnu.org; Sat, 21 Mar 2020 12:56:56 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1584809813; bh=DgagvKyvvFTGS8IpU9VpHDyv0si1e11TxWyQ5Y2IIsI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=dU94WbH6rEncSFO8JcjZ2DrGeywTgTzKzv34BLTVokGjZLL6GZEg47dzAk/1u8mgl UimYNwkTzl4UXAaaIqnXpBmtjslp4Gr5bn2w8MPN+PnQ2mQR9Mbn8zczi/ufZzLjAB 6r8lNBElCCzEsnC7fiWRZyM04R76FiHw8mfbj4Ww= Feedback-ID: mattiase@acm.or Original-Received: from stanniol.lan (c-6f4fe655.032-75-73746f71.bbcust.telenor.se [85.230.79.111]) (authenticated bits=0) by mail194c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 02LGupBG030171; Sat, 21 Mar 2020 16:56:53 +0000 In-Reply-To: X-Mailer: Apple Mail (2.3445.104.11) X-CTCH-RefID: str=0001.0A782F15.5E76473F.0084, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=KsozJleN c=1 sm=1 tr=0 a=fHaj9vQUQVKQ4sUldAaXuQ==:117 a=fHaj9vQUQVKQ4sUldAaXuQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=pGLkceISAAAA:8 a=SMGMKgFHMC5w3vO0okQA:9 a=2B1P9Lzazv_-frbP:21 a=4M81oYAJ82q0QS2N:21 a=CjuIK1q_8ugA:10 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 91.136.10.220 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245633 Archived-At: 20 mars 2020 kl. 16.39 skrev Pip Cet : > I think we should warn more about the non-reentrancy of our regexp > code, though: the disassembled text of a regexp may change when it is > used to match a string. Alternatively, we could omit volatile state > information from the disassembled text. Yes, I added some vague verbiage to the doc string about this. > I don't think > exactn "a" > is very readable, since there's no n on the right hand side. exactn 1, > "a" would reflect the bytecode more precisely, while exact "a" would > work better as a description, IMHO. OK, 'exact' it is. > I'd use nreverse rather than reverse, if we're worried about garbage > collecting a few cells :-) Correctness first, but since the code now is correct!, we can nreverse. > I'd print the address of the "value" of succeed-n etc separately: that > makes it easier to find the corresponding set-number-at. This irked me as well, so I went the other way and changed the = set-number-at pretty-printer to use the address of the target = instruction rather than that of the value field.