From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: MPS: Problem with dynamic modules Date: Mon, 20 May 2024 14:50:41 +0300 Message-ID: <86o790aei6.fsf@gnu.org> References: <868r06aqf4.fsf@gnu.org> <8634qdbyni.fsf@gnu.org> <86zfslahqf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29089"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dancol@dancol.org, eller.helmut@gmail.com, emacs-devel@gnu.org To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 20 13:51:12 2024 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 1s91Xs-0007P3-MM for ged-emacs-devel@m.gmane-mx.org; Mon, 20 May 2024 13:51:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s91XV-0004tK-R1; Mon, 20 May 2024 07:50:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s91XS-0004sh-4I for emacs-devel@gnu.org; Mon, 20 May 2024 07:50:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s91XR-0007xr-KK; Mon, 20 May 2024 07:50:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=hnslZgptR9Mjaq/2nfvv+TF2q3ylKsccomwJzBscsCA=; b=R24t8dd6nhFrIG4euII1 JD26aaXxznjXvjP/i3S64sUx76EdSMMxKUujA64ymP2iTulSDG0iwo2et4rPKXr+UUClsDpTZ16n0 CzPC+NgQo2pWZd7Xs9U26AhN16pdxLTqj19+CME0YGALThmMdbDBi8R7BlRnlbWZWfy8asc/QiFol QrpiC5er6woet3tu16PH3hpt4C6yxWVKSBc56KsuGZoLpUQmhzZnuItd+lfdwnkvPsqQnL+fudApt vDOz6aFsyp8/Pr3I3VbU120B1wSnngY/nuaTfJP4OhrAZKW7CeLIZDe5Gv8BpnRxYjhFBVfbwysdK pr14cfQRFaTmGA==; In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Mon, 20 May 2024 07:35:33 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:319409 Archived-At: > From: Gerd Möllmann > Cc: dancol@dancol.org, eller.helmut@gmail.com, emacs-devel@gnu.org > Date: Mon, 20 May 2024 07:35:33 +0200 > > Gerd Möllmann writes: > > > Eli Zaretskii writes: > > > >>> From: Gerd Möllmann > >>> Cc: Daniel Colascione , eller.helmut@gmail.com, > >>> emacs-devel@gnu.org > >>> Date: Sun, 19 May 2024 18:17:06 +0200 > >>> > >>> Eli Zaretskii writes: > >>> > >>> > No, I mean tell the pool we are using now that this vector cannot be > >>> > moved. AFAIU, this should be possible, and we do that in other cases, > >>> > no? > >>> > >>> Sort of. The only way to do this is to add a reference to the object to an > >>> ambiguous root. I.e. we need some registry data structure for such > >>> objects and make that an ambig root. > >> > >> That sounds like the easiest solution, no? > > > > Hm, I wouldn't say so. The easiest for me would be to malloc the value, > > followed by using the AMS pool, followed by implementing a tree or > > whatever is good for that purpose, making it a root and scan it. > > I've added said pool now. I tried to run the emacs-module test, but it doesn't compile here: CCLD src/emacs-module-resources/mod-test.dll make[1]: Entering directory `/d/gnu/git/emacs/feature/test' In file included from src/emacs-module-resources/mod-test.c:47: ../src/emacs-module.h:1120:26: error: unknown type name 'Lisp_Object' 1120 | struct emacs_value_tag { Lisp_Object v; }; | ^~~~~~~~~~~ ../src/emacs-module.h:1128:27: error: field 'header' has incomplete type 1128 | union vectorlike_header header; | ^~~~~~ Does it compile for you? Why did you move the emacs_value_tag stuff from emacs-module.c (which is compiled as part of Emacs) to emacs-module.h (which is included by modules, which aren't supposed to know about Lisp_Object, they are supposed to use emacs_value instead. But not a module cannot be compiled without including lisp.h, which I think is wrong.