From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Daniel Colascione" Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 938d252 4/4: Make regex matching reentrant; update syntax during match Date: Sun, 17 Jun 2018 12:50:38 -0700 Message-ID: <085f38eefc8592f7b2a9a8e2a128dc1c.squirrel@dancol.org> References: <20180616204650.8423.73499@vcs0.savannah.gnu.org> <20180616204653.86AFC203CB@vcs0.savannah.gnu.org> <04e89d2beffedcc102b811863910c1ec.squirrel@dancol.org> <8db0c426708a79bbf02e596a37675e95.squirrel@dancol.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1529264920 30324 195.159.176.226 (17 Jun 2018 19:48:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 17 Jun 2018 19:48:40 +0000 (UTC) User-Agent: SquirrelMail/1.4.23 [SVN] Cc: emacs-devel@gnu.org To: "Stefan Monnier" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 17 21:48:36 2018 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 1fUdfA-0007lL-14 for ged-emacs-devel@m.gmane.org; Sun, 17 Jun 2018 21:48:36 +0200 Original-Received: from localhost ([::1]:56256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUdhG-0007A9-Uq for ged-emacs-devel@m.gmane.org; Sun, 17 Jun 2018 15:50:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUdhA-00079s-BU for emacs-devel@gnu.org; Sun, 17 Jun 2018 15:50:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUdh9-0000T2-JS for emacs-devel@gnu.org; Sun, 17 Jun 2018 15:50:40 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:45200) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fUdh9-0000Sg-Bx for emacs-devel@gnu.org; Sun, 17 Jun 2018 15:50:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:To:From:Subject:Date:References:In-Reply-To:Message-ID; bh=eqqiDmEFBw3W3/WG2ntqsXNIJGp3/KVRGTVCQ8W/7Ho=; b=PkVXXS/WWfS99jemec/0dsHFaBygMT9tkBTxeWdt5Un71XYvc2GeomoMan2D2su3pQLYdjcbEChu16BxwCZZc2VucrJOc7dB3wpsCV+zKD3kGf/3VcFcSHgdX+kQvd1H/ZjUoCxUkVvpj3oUm3Lgl1a9RU9/GilDHhKab+NkuARqlPoe4qCDf1wA7syrXgVsPjVCcBDo+f4B6JORXAqFbZlDDCvQ6gD9AAe+5jqBLTloOUhlNbow8YXX3Frdm0WnTlR0XHkuV5WaROvZPeZF4d/pZk3H0X4wx7KEGnjKXLA6xM/LSQpDe+JrFMKDVIvQBBBu5+/BFntpP8+WcQZnKA==; Original-Received: from localhost ([127.0.0.1] helo=dancol.org) by dancol.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fUdh8-0000dL-FN; Sun, 17 Jun 2018 12:50:38 -0700 Original-Received: from 127.0.0.1 (SquirrelMail authenticated user dancol) by dancol.org with HTTP; Sun, 17 Jun 2018 12:50:38 -0700 In-Reply-To: X-Priority: 3 (Normal) Importance: Normal X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 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:226430 Archived-At: >> Oh, yeah. One more thing. The busy flag isn't *just* to prevent the >> regex >> bytecode engine confusing itself with self-modifying bytecode. It also >> serves to protect the cache slot holding the regex pattern from reuse, >> which would be disastrous whether or not the bytecode of a particular >> pattern happens to be mutable. > > It doesn't have to be disastrous *if* we complexify the code such that > removing a pattern from the cache doesn't inevitably free that pattern ;-) > [ But, yes, we'd still need to mark the pattern as "busy" in order to > know when it can be freed. ] Sure. And at that point, we might as well make compiled patterns into GC-able heap objects. That's probably a good idea, but it's a bigger project.