From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: MPS: Problem with dynamic modules Date: Mon, 20 May 2024 14:07:19 +0200 Message-ID: References: <868r06aqf4.fsf@gnu.org> <8634qdbyni.fsf@gnu.org> <86zfslahqf.fsf@gnu.org> <86o790aei6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1273"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: dancol@dancol.org, eller.helmut@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 20 14:07:56 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 1s91o4-000Aai-45 for ged-emacs-devel@m.gmane-mx.org; Mon, 20 May 2024 14:07:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s91ne-00015H-32; Mon, 20 May 2024 08:07:32 -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 1s91na-00010x-Cm for emacs-devel@gnu.org; Mon, 20 May 2024 08:07:26 -0400 Original-Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s91nY-0003HY-NV; Mon, 20 May 2024 08:07:26 -0400 Original-Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-5206a5854adso2879152e87.0; Mon, 20 May 2024 05:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716206841; x=1716811641; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bdecNPmSHzDM9YyCNQKiawq6TgeEbG3rgReY1//hXRE=; b=YZOi5jivikKFamdhcG5/cj7HLL9YZsjDzcInUlhGArKpYySjdPTdirzqF4Svma6H+S cLhdRmqK2XC0B80SA8fGYqpK5kxeiCyN9CJ0Dh/bVquwLNe5BcS2VFGMLKpsOODKXyg3 +lk+m6KpG7TsceGz7c2uuWHwNYpVA74tIuDbvZP4OS71xb6i1/RRkS3Re6WCRNxJv0Bb Y3v141aTMCa490WYBkl6SfLMKX6Yskru6IGIYq/I73lvJR1QB4yoUDWtBqmvCiFfG97k b0RFgD/nAYLpxpMiLASU54CEsSfHdnphaPNeDEPheWqZD120S+RhsrRuF9QfLndADOf5 WhBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716206841; x=1716811641; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=bdecNPmSHzDM9YyCNQKiawq6TgeEbG3rgReY1//hXRE=; b=JM5RVztHnvLrwZLoNj/Wr18P1h2/kEGxzbGwZ3MS4rwSm23NIwTxEAkmga0uP8IdUy nFwnD1Wbp5c2Sgft2unJ9Mpuk+hbF9ognvL2bVrltI0BC5TljLH5/Ka6yjwrpm6CAWjV Rz+k6+GW/18Xaie4Ayc+1KcN4sKGpXCJ8sSrEQliDyBLAhvfO8awDCPDvw+lk+snuTVk wErpuIiVvT9PcgHCaHonA6j6PWRCv6ctjwPQWQCWq1+NnGqpAEh7tBSHjpJslFkKuT1C I06ukZY509Hhut0dZtEjEvJap/H62lvpHgoYqknjzR46RpDmdXSQl2EWgwWaNF30xpuj TGMA== X-Forwarded-Encrypted: i=1; AJvYcCWxaQTcA8nlQE9G2ryBbq2ErZ1s5KT5u7MeCCuzvajPSgJ62yAw8iVlKrC88lNWRosFAOQsbTR1e59TuHSKkxHxYinF X-Gm-Message-State: AOJu0YzD87201sYlZKoF5y5iRg74noMqVtIwlWzFYJuMPnopRQYgPfQv ntOqbDcIeiRwj33mL8aKFZ9G5VlP39kmOR6mn9GS+IvAtkJEfkjOLPrqUQ== X-Google-Smtp-Source: AGHT+IGnrc/O9uHu6VyIg3LRUE07cHd3jxTxqyHPtmN0bM2s1RGroLSarP6FvUDdGDXjtdpLBMPYIQ== X-Received: by 2002:a05:6512:3ba8:b0:523:9297:2506 with SMTP id 2adb3069b0e04-52392972629mr12180617e87.58.1716206841032; Mon, 20 May 2024 05:07:21 -0700 (PDT) Original-Received: from pro2.fritz.box (pd9e36556.dip0.t-ipconnect.de. [217.227.101.86]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a17b017a5sm1454211166b.180.2024.05.20.05.07.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 05:07:20 -0700 (PDT) In-Reply-To: <86o790aei6.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 20 May 2024 14:50:41 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=gerd.moellmann@gmail.com; helo=mail-lf1-x136.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:319411 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: dancol@dancol.org, eller.helmut@gmail.com, emacs-devel@gnu.org >> Date: Mon, 20 May 2024 07:35:33 +0200 >>=20 >> Gerd M=C3=B6llmann writes: >>=20 >> > Eli Zaretskii writes: >> > >> >>> From: Gerd M=C3=B6llmann >> >>> Cc: Daniel Colascione , eller.helmut@gmail.com, >> >>> emacs-devel@gnu.org >> >>> Date: Sun, 19 May 2024 18:17:06 +0200 >> >>>=20 >> >>> Eli Zaretskii writes: >> >>>=20 >> >>> > 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 ca= ses, >> >>> > no? >> >>>=20 >> >>> 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. >>=20 >> 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. Because of this static mps_res_t fix_global_ref (mps_ss_t ss, struct module_global_reference *r) { MPS_SCAN_BEGIN (ss) { IGC_FIX_CALL_FN (ss, struct Lisp_Vector, r, fix_vectorlike); IGC_FIX12_OBJ (ss, &r->value.v); } MPS_SCAN_END (ss); return MPS_RES_OK; } a longer time ago. What would be a good fix?