From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Troy Hinckley Newsgroups: gmane.emacs.devel Subject: Re: question about Qnil representation Date: Wed, 26 Oct 2022 12:46:39 -0600 Message-ID: <168eb4b5-40be-43dc-8501-dc9f4c65c56f@Spark> References: <5a560265-fa81-42d2-945b-ab85d72df9e6@Spark> <5a00e93e-5f44-4865-aeeb-51f0aced9996@Spark> <87ilk6a7be.fsf@rfc20.org> <83wn8mmt49.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="63598095_5072367_10bc8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23261"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, matt@rfc20.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 26 20:49:31 2022 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 1onlT1-0005nK-8Z for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Oct 2022 20:49:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onlQd-0001d6-87; Wed, 26 Oct 2022 14:47:05 -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 1onlQQ-0001QB-TB for emacs-devel@gnu.org; Wed, 26 Oct 2022 14:46:52 -0400 Original-Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onlQP-00053k-4x; Wed, 26 Oct 2022 14:46:50 -0400 Original-Received: by mail-io1-xd36.google.com with SMTP id p141so1379490iod.6; Wed, 26 Oct 2022 11:46:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=D+xCucIWpaWi8AZ0FJ4JaTWEzlhPN35CFr++Y+Og/Oo=; b=mZOTw7s52SSYwrhhhyh0hyJS/cV8B1hvF2wRrUck+p7Jc2a+gOQpSZbDAANqWxevdD iWrG8TdtVL3ffLuh4nHZGCVIf9ZAhjJD7awRKHvqG9r7Wb7xk65tnaNwxC7yizBIOXgs mq7Qf5eo+wKglAISJlAXruOP+KOL65hsLKGcBgoUA8SCIgvUACq2EAqbYKkcK29Q7Ab5 9Pm3dup79igXGRO+TAlbVdkHXZWfaTshkYFb12J3NPBPLYWpxdfh1N/Yev7Ar6lvt/lM Xw2TCxlOB8B8PrCo0F0v1EIp7gsBvvV9cQHhuG3Fdf+Asy65n27tlWUXc4lzSZIMo0nY KCXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:subject:references:in-reply-to:message-id:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=D+xCucIWpaWi8AZ0FJ4JaTWEzlhPN35CFr++Y+Og/Oo=; b=hkpnpyYywTOuaGHJI+fyhhBuC1gjWJAebdUfTCyLU/K15vijGrSfx+DekxN1BSewON 4MOe2+sXVtbTIN5llZ9OiKOhu1zrqqNZRL4P9tP8coxp3AsuZPWk5RRQ6JXL0JaHDvQN 7tugGzzzrGoRwpP0KtAAHtMgf6TJKtBl0Sw6G9+mUJAgCqKTS9G5pcXnn+aa05NYIXMf UUY8EFjla+j4YZXipwazLUgqCuiogl4f/l0tZ4N2dfS22Gww0OVHrgBqXxW04ViuM9vX XwCAXOQf4uqDFyJHsyWKE3UDyLMc3CNt7IDIaJpPo/SsINN5FkUsCA8kyb/nYw4iiSWm Jtfw== X-Gm-Message-State: ACrzQf3ypsDG788kK4N0Azv1107WwhEOeZrZ8f7+n+E5uuXTLVk3QaS1 4ZXcM5h2mKVDSq8/6z4aTMJdCDOMI1E= X-Google-Smtp-Source: AMsMyM60RzeT+zDUSI4kZXIdk3mIE2d5omctpCt4U2Yz+qtlk0uKaRQELrNYSqJtHs3+ltcdcRWNqQ== X-Received: by 2002:a05:6638:517:b0:375:16d:446b with SMTP id i23-20020a056638051700b00375016d446bmr4407490jar.86.1666810006924; Wed, 26 Oct 2022 11:46:46 -0700 (PDT) Original-Received: from [192.168.1.121] (h24-54-181-16.ftcmco.broadband.dynamic.tds.net. [24.54.181.16]) by smtp.gmail.com with ESMTPSA id i129-20020a6bb887000000b006c0cb1e1ea8sm1762780iof.12.2022.10.26.11.46.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Oct 2022 11:46:46 -0700 (PDT) In-Reply-To: <83wn8mmt49.fsf@gnu.org> X-Readdle-Message-ID: 168eb4b5-40be-43dc-8501-dc9f4c65c56f@Spark Received-SPF: pass client-ip=2607:f8b0:4864:20::d36; envelope-from=troyhinckley@gmail.com; helo=mail-io1-xd36.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, HTML_MESSAGE=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: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:298566 Archived-At: --63598095_5072367_10bc8 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Ah, thank you. So it is not a pointer but an index. Is lispsym array resizable or is there a static limit to the number of symbols? On Oct 26, 2022, 10:45 AM -0600, Eli Zaretskii , wrote: > > Date: Wed, 26 Oct 2022 10:22:54 -0600 > > From: Troy Hinckley > > > > Let me try again. As I understand it, every Symbol is an instance if Lisp_Symbol. The Lisp_Object is an > > integer that can represent multiple types with tags defined by Lisp_Type. If the tag is 0, then the type is a > > symbol. In that case you would treat the rest of the bytes in the Lisp_Object as pointer to a Lisp_Symbol > > instance. However if the symbol nil is defined as 0, then it is not a pointer to anything. How then do you access > > that symbol? Is there special case code to handle the null pointer? > > See make_lisp_symbol and builtin_lisp_symbol, and I think you will > understand what's going on here. Also see the value stored in > lispsym[0]. > --63598095_5072367_10bc8 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Ah, thank you. So it is not a pointer but an index.= Is lispsym array resizable or is there a static limit to the number of s= ymbols=3F
On Oct 26, 2022, 10:45 AM -0600, El= i Zaretskii <eliz=40gnu.org>, wrote:
Date: Wed, 26 Oct 2022 10:22:54 -0600
= =46rom: Troy Hinckley <troyhinckley=40gmail.com>

Let me try again. As I understand it, every Symbol is an instance if Lisp= =5FSymbol. The Lisp=5FObject is an
integer that can represent multiple types with tags defined by Lisp=5FTyp= e. If the tag is 0, then the type is a
symbol. In that case you would treat the rest of the bytes in the Lisp=5F= Object as pointer to a Lisp=5FSymbol
instance. However if the symbol nil is defined as 0, then it is not a poi= nter to anything. How then do you access
that symbol=3F Is there special case code to handle the null pointer=3F

See make=5Flisp=5Fsymbol and builtin=5Flisp=5Fsymbol, and I think you wil= l
understand what's going on here. Also see the value stored in
lispsym=5B0=5D.

--63598095_5072367_10bc8--