From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier 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 15:34:45 -0400 Message-ID: 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 X-Trace: blaine.gmane.org 1529264122 5233 195.159.176.226 (17 Jun 2018 19:35:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 17 Jun 2018 19:35:22 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 17 21:35:18 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 1fUdSH-0001FG-DC for ged-emacs-devel@m.gmane.org; Sun, 17 Jun 2018 21:35:17 +0200 Original-Received: from localhost ([::1]:56224 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUdUO-0003kt-GJ for ged-emacs-devel@m.gmane.org; Sun, 17 Jun 2018 15:37:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUdUG-0003kj-If for emacs-devel@gnu.org; Sun, 17 Jun 2018 15:37:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUdUD-00013w-Gi for emacs-devel@gnu.org; Sun, 17 Jun 2018 15:37:20 -0400 Original-Received: from [195.159.176.226] (port=42913 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fUdUD-00012k-9V for emacs-devel@gnu.org; Sun, 17 Jun 2018 15:37:17 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fUdS4-00011c-2B for emacs-devel@gnu.org; Sun, 17 Jun 2018 21:35:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 13 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:PnOmxFaM1RTpDwFc42UY6WVdNHg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:226428 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. ] Stefan