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 codegen Date: Thu, 13 Jun 2024 19:48:19 +0200 Message-ID: <87wmmsg2e4.fsf@gmail.com> References: <87le3b43qi.fsf@gmail.com> <86r0d21tqj.fsf@gnu.org> <877cetgqiz.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="34996"; 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 Thu Jun 13 19:49:20 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 1sHoZc-0008zm-4i for ged-emacs-devel@m.gmane-mx.org; Thu, 13 Jun 2024 19:49:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sHoYk-0005pQ-DO; Thu, 13 Jun 2024 13:48:26 -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 1sHoYi-0005ow-U7 for emacs-devel@gnu.org; Thu, 13 Jun 2024 13:48:24 -0400 Original-Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHoYh-0001lT-7w; Thu, 13 Jun 2024 13:48:24 -0400 Original-Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a6efae34c83so175983866b.0; Thu, 13 Jun 2024 10:48:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718300901; x=1718905701; 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=C0DxGDmZpcc6aPTyK7Jh29fKvByfnw/RodI1p48M5pA=; b=QCZUwEipar2b4wN/D2dsnNBBX6LdDcnRrdRBZmS34/Dtk98uSJg+w/TWUSeIJm6spj Krh6gyjwxjfqk4HYMZsubVZxqFU0yYS0HhpILI0UfmvAtTqiGUzhL+OWTQxSZLrGsCf8 UPAKuHImpv32gVthRidiwV9YvZIhdbXrECqyiKgVP6vmU4RUVbRDzFf+zOcibogOaYZT Fe1DLW5UfpaPwu+lObD56glVaisYd4Y3D52c9TSx/mOhy8/6BAkLX0NmgJJqyzKS8JR4 b98u+HNCRM2qqqS5saPzAqyoKBJGl/Las56z9jUeN2nEGUXZAupfmua5AjR6u2qwhzZ1 oQ7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718300901; x=1718905701; 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=C0DxGDmZpcc6aPTyK7Jh29fKvByfnw/RodI1p48M5pA=; b=WioDHtJgFbxeHW4BYM7eE5y2HL3GlIwl9jLcAcqTTvfuWpPf0HXKYgB3O8WuiO8zmT NsjtGxtcYJ87xZm81IIqu5csNkmkkN4sPN2IlYqPoFE7K4lgXd8G4yGTio1xSURSk7YX 6ON17h0f2GbiRmlvkFWcLK9h6df8eV6yjm7T5+S7zuJyL32RuJqSlah4eoJ+qJ37B8Fl I0DOpH5tDGNT/HF5awhsmWMANahBPIujAYHVUoh9YD8oqZUJN4X/s80Rn3ahvm5J3wFV SEgmOGLCadRkc4IkpuXHY1se7rK5iibcHdSTZ1I3MMu+VOwRuE1hIGQx6/43so9dQAM1 Gqsw== X-Forwarded-Encrypted: i=1; AJvYcCWo5xsp3auPaWuAOfxB3ZDCx0jh+elGsmG4yvXrGd5aWmCqRjNcNe90w0FSo1jbfat4MthF5n4nDUQkWRUztUQzvV22 X-Gm-Message-State: AOJu0YykO9pC6NRqdPIHDzUMhZwwDDKbNLbZtYQbaLPJ94JCslqfBtCa Oat3h/R8u9psfp76QPDQ5tkLilhKikx6lNuD6+aXW87alD4YSmU+lop/9Q== X-Google-Smtp-Source: AGHT+IHqlOxlr8Q4+lAF7LNp3J/kGL5Dkjd6QUaDtEINbaNi5xgQ9i+HCfuyn6BW58kIaOASxok4Sw== X-Received: by 2002:a17:907:8748:b0:a6f:618b:4d7c with SMTP id a640c23a62f3a-a6f618b4f49mr13714866b.51.1718300901116; Thu, 13 Jun 2024 10:48:21 -0700 (PDT) Original-Received: from caladan (dial-189091.pool.broadband44.net. [212.46.189.91]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f5c925e97sm55941766b.168.2024.06.13.10.48.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 10:48:20 -0700 (PDT) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Thu, 13 Jun 2024 14:33:20 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=eller.helmut@gmail.com; helo=mail-ej1-x62b.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, T_SCC_BODY_TEXT_LINE=-0.01 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:320031 Archived-At: On Thu, Jun 13 2024, Gerd M=C3=B6llmann wrote: >> The patches below use a code generator for most of the fix an mirror >> functions. I dropped tree-sitter for now; maybe it can be used for >> something later. The code generator is about 800 lines and the >> generated code 1600. However the generated code is longer than hand >> written code. WDYT? > > Hm, to be honest, how do I say it? Please don't feel offended, but I > think I don't like it that much :-). I'm also not fully convinced that code generation is an improvement. > I think the thing I don't like is that I believe there should be only > one description of an object's layout. Be it C (struct), or be it > somethings else, from which C is generated. Sure, but that's easier said than done. BTW, the MPS documentation says that mps_reserve allocates a block. In MPS, a block is not necessarily a single object. One possible interpretation of this could be that mps_reserve can be used to allocate a block that contains many objects. Perhaps we could use a single block for the entire dump? E.g. implement a version of dump_mmap_contiguous that uses mps_reserve. What's your interpretation?