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: Forwording symbols Date: Sat, 22 Jun 2024 20:27:12 +0200 Message-ID: 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="1264"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Emacs Devel , Eli Zaretskii To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 22 20:28:01 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 1sL5Sz-0000Cm-DC for ged-emacs-devel@m.gmane-mx.org; Sat, 22 Jun 2024 20:28:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sL5SI-0006yZ-RS; Sat, 22 Jun 2024 14:27:18 -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 1sL5SH-0006yM-M9 for emacs-devel@gnu.org; Sat, 22 Jun 2024 14:27:17 -0400 Original-Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sL5SG-0003xy-34; Sat, 22 Jun 2024 14:27:17 -0400 Original-Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-57d280e2d5dso2717491a12.1; Sat, 22 Jun 2024 11:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719080834; x=1719685634; 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=jR9ZecCTj5sXztDUHj0dDdfQlZtE3dOhTXCeIJGWPMU=; b=HdLUY5aYiJ+hzxak3slR3HMTQYhef51eX1EZrDQg6PJHf+du8i9evY/OJzeppfKkER ZkSBnN9PlBZ2J5Y2xPqaFhlr/z3/f5y3wcdoaAg/E3/FAJCvN+/s+j8tW1SQbW7ZQr+f zLIraSp8HpfgxW9+/05q0KCY88N7gCEWFAx1OhsfJS2SlxZLgEZfRTTcHRTgDGBYJqi3 uK/wjaui6J9fsmZcL2QVwdjb5VjmuRYed6y7Bx1O+cS28CyP5bT19xyiXLxELvcPWk0f qloWobQej5+aDddvRscy6dOTDnHH8gW/WSxKjMRmeoIA39Zj84i+UdFh/igqLjreoeUi kHjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719080834; x=1719685634; 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=jR9ZecCTj5sXztDUHj0dDdfQlZtE3dOhTXCeIJGWPMU=; b=XZKYW13YrfKRGxWY+9PGRu41wreR6uee92nNGs60UAsXtAau6sHsD/nnty2iLSY9Ub tXZOw0lRx3UxIP88Oy50mJ/H9JLhwu9xPK4AP//7LrpgRBuzbL7vGHXo6gyvoT5/T7xl nYz7xLYhWSKTYK/hz2r9ynp1i4tGMPkJ/uz1P7hC4kKXJ/TCs2+bFgqW+GxXwRsBXG2t nRlnZ+MQoSLLPhfYqvDVLdZS+ZGxGyLK2juYBFVYo6fP3RabJgYpzN7XCjNh8tOoBXkf mglB6Jeh33rr6nROEsuIlrJFbBxoepg4DijqDU2GnCpdA6JZWk32biQFfr1Liy02tuKe CqaA== X-Forwarded-Encrypted: i=1; AJvYcCW3+def76m3FRHVqN1txZs6sXyFMNprzLgYmgMgXeeEQ3pxslMZcestAkaD7/IXgo+hzrdaJp1/QuQjGho= X-Gm-Message-State: AOJu0YwoN5ls9T8ZkKsbnqMpRZ35HnYULVbF6Hsjv1FVnBw8/x/kWHHQ G88gua4JtaeVVKewPhsmJpildVYU5T1iLwJlPmyAZamtZU0ccQPwBAgsJg== X-Google-Smtp-Source: AGHT+IG9aW2c/uGGTTmgrnLGDHebg4HY57Iyvx9ZITnfm1bCNnGlctVuDK8NS0hO0RKQ+B7IflBfsg== X-Received: by 2002:a50:8acf:0:b0:57d:30b6:4281 with SMTP id 4fb4d7f45d1cf-57d4bdc9bf0mr309029a12.29.1719080833597; Sat, 22 Jun 2024 11:27:13 -0700 (PDT) Original-Received: from pro2.fritz.box (pd9e364bf.dip0.t-ipconnect.de. [217.227.100.191]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57d303d7aaasm2615363a12.4.2024.06.22.11.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jun 2024 11:27:13 -0700 (PDT) In-Reply-To: <87o77szwif.fsf@gmail.com> (Helmut Eller's message of "Sat, 22 Jun 2024 20:02:16 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x532.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:320479 Archived-At: Helmut Eller writes: > On Fri, Jun 21 2024, Gerd M=C3=B6llmann wrote: > >> Gerd M=C3=B6llmann writes: >> >>> Sounds like a good plan to me. > > Some patches for this are below. Thanks, pushed. >>> Maybe we could also make predicate an enum at the same time? It need not >>> be a Lisp_Object, and replacing it with an enum would make that clearer. > > 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? >> 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 *. > 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. I wouldn't mind, but I guess someone might find that questionable, unless we can prove some speed advantage or so :-).