From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: MPS: native comp Date: Mon, 29 Apr 2024 04:59:06 -0400 Message-ID: References: <86le4wsj14.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="2399"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 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 Apr 29 10:59:35 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 1s1MrE-0000Mq-ER for ged-emacs-devel@m.gmane-mx.org; Mon, 29 Apr 2024 10:59:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1Mqx-0006h4-Fq; Mon, 29 Apr 2024 04:59:15 -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 1s1Mqu-0006gh-S7 for emacs-devel@gnu.org; Mon, 29 Apr 2024 04:59:13 -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 1s1Mqu-000822-F7; Mon, 29 Apr 2024 04:59:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=XHLdqcxCQN7ctIld0tLoXRVVRIhxFWDz/xf1/WsqdJw=; b=cnoJitk1t0TUnqlcqoqY o1u8tLMZTqIEzN7RD5u8oqyZDPQ90cceHlVIm1ydNFNb8Er8GxCaTdU2s/XacaggefjzdxKNVlO9c 3AbyWBE8MAvlBItqsRohS5hLk//8OjIbV/eQu/GhL3P0IjFo0jU1J0Pe8y+ChMq0aPfOHo0x/RQu2 2ch3ncG59NU3SbV0jE/5YXCUyUCbN7MTZUYHJqYysb5xxtYvR4FeF0d7ftwHFwkgQkz/EgbagCZ9I Sf+Rrps2uPL8dbph06RM38hghmAWMJ6oo63NE3eCtuNsEbiZwaeXzDLKSzhmX65ifgzCBaO5AxUEY b6HCxBBmTFaGdw==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1s1Mqp-00020f-Ay; Mon, 29 Apr 2024 04:59:11 -0400 In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Mon, 29 Apr 2024 10:40:44 +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:318336 Archived-At: Gerd M=C3=B6llmann writes: > Gerd M=C3=B6llmann writes: > >> Gerd M=C3=B6llmann writes: >> >>> Then, in some way Andrea sets up Lisp_Objects for what we have in the >>> dylib when it is loaded and these land in data_vec. >> >> And that's exactly what's going on, from reading the code. >> load_static_obj gets a pointer to text represention of Lisp data in the >> dylib, and then uses Fread to make Lisp_Objects from that. >> >> Scratchign head... > > Hm, maybe... > > @Andrea: How are the Lisp_Objects created in load_static_obj referenced > from the code? There must be a step that puts them into the machine > code, right? Probably the "relocs" that are used there. > > If that's the case (and I'm almost sure), then we need to make these > objects immovable. > > That was a nice puzzle! Oh yes that's correct! If MPS wants to move objects referenced in ELN files it needs to update what every elns has in his own data_relocs array! (Or make them immovale indeed). ATM in the CU we refence those objects only to have the GC not collect them. Andrea