From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: MPS: Forwording symbols Date: Sat, 22 Jun 2024 20:53:12 +0200 Message-ID: <877cegzu5j.fsf@gmail.com> References: <878qyy1f55.fsf@gmail.com> <87o77szwif.fsf@gmail.com> 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="8954"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Emacs Devel , Eli Zaretskii To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 22 20:53:52 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 1sL5s0-0002FR-KM for ged-emacs-devel@m.gmane-mx.org; Sat, 22 Jun 2024 20:53:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sL5rb-0005iH-3t; Sat, 22 Jun 2024 14:53:27 -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 1sL5rX-0005hm-LH for emacs-devel@gnu.org; Sat, 22 Jun 2024 14:53:23 -0400 Original-Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sL5rT-0000e8-QI; Sat, 22 Jun 2024 14:53:22 -0400 Original-Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4217136a74dso25152715e9.2; Sat, 22 Jun 2024 11:53:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719082394; x=1719687194; 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=vFyULbzHo3rbBr05RA9EfkzyBPxF7n/2rF5Wp/iyH/Y=; b=Mvzxypri0lGaGAZ/ynqiKD40eQxhMNc8XqCFcJGNGsAbTJYrLiaqDe3KvQWDtKO7TW UHMUs7nkaJmJ8l3EqTWeLpyVcYSYkQ7Z2/9SZB3H1TnTjxxcwnIBwQuK8QZGxSI1S2FZ AUVLYGv8/RzT86D2XY/pJ/8pz5+x8VPqrh04sqGsuWxMG/I22+1n7/pK4GDhGuPiDQlb zaRHQ/thEmeL5CIt8qYLcww1c9MhdMGitwSpuQ1yvGhS9R2WbC37fkwYpIry3xKQgVEp JNg2/NUnNd4YfwWFr2QTlFYe3uM99kO4O+dNpaN9h7iLrjfBMbPmR0X8Y5Zs2wqsiEk3 Dl/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719082394; x=1719687194; 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=vFyULbzHo3rbBr05RA9EfkzyBPxF7n/2rF5Wp/iyH/Y=; b=A8i/IP3eXUs57NZrISiA8SftrIuB3ZPv8KKK2Yyv6Zqth38q1T1mh8kBe+aAxMNMwx X1STtNzYi7psZczDlejSeR39f1usYw/JgPYa2M+FHC9pLDmhd4PZf6VpQE2aKTeppyE7 CcM4MVqqYlQRMFsyl/2BVj3cqSZwcbElqKjaxfMpljXEdkRZ77GajoY6V7kVvHyJbk8k /HZX/LI7vdYUbusIqRJ7JSXeAdQUJ9GEcUcEe6c108Y53DAoDl8/D/vdNOjiM+thB5HS Nhy/DQ+isOmgRaLZhWyCCOaYJLvBnrItjmQ7tCcJT6O04eHUdccejWcEVf8FmuyTWiyB NcIg== X-Forwarded-Encrypted: i=1; AJvYcCXVpPLnaDITBptJ07CCMG6AI7aVQ+tNNKiAbsYjmAlo42qb/jkDx9Mnt4G6VDs4cQ6jUFjAxSBzF5v+u7M= X-Gm-Message-State: AOJu0YxN8+qdfB9ZBQ1CyG2Ipij3h7f5bb4smKiDGaJuuW6wsa4Unmu8 lMMSixnCCn+QEYuwKlTiFhVoLQXg6COFlNE8NQSYh5z+BZ9Of6ERnoRYxw== X-Google-Smtp-Source: AGHT+IFM4RfawsR3KaD6fAYMC6e8eLc1S3WZV4E26aSdoIPGWsenV8teu2N50J5hlbOhQv7DJ7lPmw== X-Received: by 2002:a05:600c:2106:b0:421:e179:b1d5 with SMTP id 5b1f17b1804b1-4248cc6666cmr4652915e9.38.1719082393686; Sat, 22 Jun 2024 11:53:13 -0700 (PDT) Original-Received: from caladan ([31.177.116.19]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-366389b8922sm5345256f8f.28.2024.06.22.11.53.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jun 2024 11:53:13 -0700 (PDT) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Sat, 22 Jun 2024 20:27:12 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=eller.helmut@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:320483 Archived-At: On Sat, Jun 22 2024, Gerd M=C3=B6llmann wrote: >> This would require translating symbols to enums and back. Or do you >> think about something else? > > I haven't looked at all places. Could you please explain where that is > needed? The symbol is needed in store_symval_forwarding. It looks in the plist for 'choice and 'range. In addition to the five symbols mentioned in the definition of Lisp_Buffer_Objfwd, predicate can also be 'overwrite-mode, 'vertical-scroll-bar and 'fraction. I think those have those properties; weird. >>> And if I had a wish free, I'd want the lispfwd with the void *, and >>> the structs, to be one struct with a type and a union. >> >> You mean lispfwd would require two words instead of one? Would that work >> when swapping bindings in and out? > > I was thinking of using 1 struct instead of 4, like so > > enum Lisp_Fwd_Pred > { > /* Something with values for the Lisp_Object predicate ... */ > ...=20=20 > }; > > struct Lisp_Fwd > { > enum Lisp_Fwd_Type : 8; > enum Lisp_Fwd_Predicate predicate : 8; > union > { > intmax_t *intvar; > bool *boolvar; > Lisp_Object *objvar; > int offset; > } u; > }; > > Then removing the Lisp_Fwd_Bool etc. structures that currently exist and > replace this > > typedef struct { void const *fwdptr; } lispfwd; > > which is just a void * with ornaments, with const struct Lisp_Fwd *. Ah, I see. >> If we can use two words, then it would perhaps be possible to use >> pointers to the values directly instead of pointers to fwd objects? > > That would make each symbol 1 word bigger. Unless we can find some unused bits. > I wouldn't mind, but I > guess someone might find that questionable, unless we can prove > some speed advantage or so :-). Yes, probably.