From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id 522ED385841D for ; Wed, 1 Sep 2021 10:11:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 522ED385841D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-ej1-x635.google.com with SMTP id ia27so5394798ejc.10 for ; Wed, 01 Sep 2021 03:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FsJE/rqt8mIflei4SNIjmOnDYa3ungJ6++J33cQEmxI=; b=LJEMJ0j+WT+0L53Q9x8rUtC1F1jga6WnHrLxkjEzcFODeVRM/COQwpdI8u32YMg6F0 dPfWYV/TxVXBKocg2OmhFC7asyGAG7l2BV/6X0I/lOXoyDH40Wr6OVrfJfmXt3epS9gO ZrhMIFB5085Y69DHDAod6otTSnuagi9Eqarr0dlZmzwOfe4ImnNaD/QY/ibGYBz/v10O ipspvjZz6okcevszppDuCLIsu2sR2BeptB4HmCFxG1ZEvizrcu6zvuQ5aCqa2tjPaSKm s63JCVBevKZzqOwK8l3PiIkVEtFyVZ74FLlvOSXWHrCS7Hcn5FVB/j2GCaCIuciAaCkX KASw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FsJE/rqt8mIflei4SNIjmOnDYa3ungJ6++J33cQEmxI=; b=YoKkBFwKq7BRk/GXGsnAEiHDZyh3yytaCgkpUKaARqcznOYHpDq7qtZfvj0Z55CAeo nTVvkDJ6jakTM+M7U3BURyuW5b+ByQVNJ/bhuvZnCOkIfKoXcpP5TIeUQ+4AGRWo3nLZ 2YjymBJnwbp6uEuHEbXqdfm2XBpJySlwbuG/eGncMWe1Vh34L9PJPeWlN5vSK1VGM+mM dra2LjFKOXrd636JfNMfdyjhEmqySD2HSMWvCu4zLnx1m5txymnWf4Sm3kBAHnHy49Cf QKQKhxkRfBDz7E6CqzVz2hiLalT8mdfV9ztLjDhP5+EQl++zBYzxlzudyScnlh7b/kHT mHqw== X-Gm-Message-State: AOAM533/Eb9O5mMfv8TFhzILtYYcro1pEpAz3JjKQPLJRYoW6GOG9XIw 0V10KgEhia2j0/827x2hLyrBnfWYb08bvLCRVEQAtnf0EL6PCWLw X-Google-Smtp-Source: ABdhPJwl+KbcJMLBr1ELyPRnZLu5g6nMV0atlKxoocv0gvSkxDck8OpX3Sz+61JqDfUGmfJeU+I04Ncnsca1wknS/cI= X-Received: by 2002:a17:906:4452:: with SMTP id i18mr36841006ejp.374.1630491117194; Wed, 01 Sep 2021 03:11:57 -0700 (PDT) MIME-Version: 1.0 References: <20210901001542.160965-1-mark@klomp.org> In-Reply-To: <20210901001542.160965-1-mark@klomp.org> From: Philip Herron Date: Wed, 1 Sep 2021 11:11:46 +0100 Message-ID: Subject: Re: Cleanup some StructExpr related classes To: Mark Wielaard Cc: gcc-rust@gcc.gnu.org Content-Type: multipart/alternative; boundary="000000000000d9ad6905caec4b32" X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-rust@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: gcc-rust mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 10:12:08 -0000 --000000000000d9ad6905caec4b32 Content-Type: text/plain; charset="UTF-8" This is fantastic work Mar. This brings us closer to the AST structures of rustc and does simplify a lot of the analysis within the compiler. https://doc.rust-lang.org/nightly/reference/expressions/struct-expr.html I agree the HIR cleanup will also help reduce a lot of duplication of code and visitors. It might mean we get alot of enum stuff for free potentially. Thanks --Phil On Wed, 1 Sept 2021 at 01:16, Mark Wielaard wrote: > Hi, > > There are various Structure Expressions that don't actually "exist" > because they are syntactically equivalent to other constructs. So we > never really construct or use these classes. But they are still listed > in various visitors, which is somewhat confusing. Removing the AST and > HIR variants of these classes really cleans up the code IMHO. > > The following 3 patches can also be found on > https://code.wildebeest.org/git/user/mjw/gccrs/log/?h=structexpr > > [PATCH 1/3] StructExprTuple doesn't really exist > [PATCH 2/3] StructExprUnit doesn't really exist > [PATCH 3/3] Remove Enumaration Expression, EnumExpr, classes > > Cheers, > > Mark > -- > Gcc-rust mailing list > Gcc-rust@gcc.gnu.org > https://gcc.gnu.org/mailman/listinfo/gcc-rust > --000000000000d9ad6905caec4b32 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This is fantastic work Mar. This brings us closer to = the AST structures of rustc and does simplify a lot of the analysis within = the compiler. https://doc.rust-lang.org/nightly/reference/express= ions/struct-expr.html

I agree the HIR cleanup = will also help reduce a lot of duplication of code and visitors. It might m= ean we get alot of enum stuff for free potentially.

Thanks

--Phil

=
On Wed= , 1 Sept 2021 at 01:16, Mark Wielaard <mark@klomp.org> wrote:
Hi,

There are various Structure Expressions that don't actually "exist= "
because they are syntactically equivalent to other constructs. So we
never really construct or use these classes. But they are still listed
in various visitors, which is somewhat confusing. Removing the AST and
HIR variants of these classes really cleans up the code IMHO.

The following 3 patches can also be found on
https://code.wildebeest.org/git/us= er/mjw/gccrs/log/?h=3Dstructexpr

[PATCH 1/3] StructExprTuple doesn't really exist
[PATCH 2/3] StructExprUnit doesn't really exist
[PATCH 3/3] Remove Enumaration Expression, EnumExpr, classes

Cheers,

Mark
--
Gcc-rust mailing list
Gcc-rust@gcc.gnu.= org
https://gcc.gnu.org/mailman/listinfo/gcc-rust
--000000000000d9ad6905caec4b32--