From patchwork Tue Jan 31 13:27:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 50927 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2812844wrn; Tue, 31 Jan 2023 07:25:21 -0800 (PST) X-Google-Smtp-Source: AK7set/CrzClHvgZXU5+0iw0Qcw2yq2NdrTxTKASTDMRL8px117mPerAdR3gwja4EHza8bec9amH X-Received: by 2002:a17:906:5a82:b0:878:43b9:6b8d with SMTP id l2-20020a1709065a8200b0087843b96b8dmr23078679ejq.25.1675178721757; Tue, 31 Jan 2023 07:25:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675178721; cv=none; d=google.com; s=arc-20160816; b=dU+MWJS5dfodjiN7NbAB5R2TLWc84PrqZQX2pfrszbxN3kCo0tyGyZWLqYBNOC9bqk 9G2aBGKAvoQroZw0ZzzqcF32g/JuI5sDcyiRvNYgGTNti7fS45SVPtG69iL4ODOacUNY W6SzZis8nGVGazXGJ2Pz2PnlJccxd7jW3pYXATaKaFPwhLFqTSPVrd+uAnGpgBzaMEHF kAFwy7v427qdiHDv7BwJ9ikIYE1ox6KG7MrxiCXEsYx+Wd5Rlqn1iTgKfGbSTC83jt6I j5/kaxH3q89cd2a4LGy23EtIHJMUgDi8wLrdqdwNyeLcPXf9y974q83MWPMiLxjoXPp0 fRLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dmarc-filter:delivered-to; bh=iT5wsvMZSrYT+4z58iUQvufGnALhaGOXGhXSUKZr3kU=; b=oV+rBii0JyYBcs0QoGol3odZShWsdZTIHsNJcUmaLUx+QItQNNakCfu2MP5MPyhx+X hki0fnARR+YrA6ItacEmLI+aQl8ZSmz4vvMSK+cpdd+pwKRoqpndLJx5dCh2C8XH2d8d tzh4nr2aWl2C2AvDyudBsvxrY+pT5junBhBh7d26nqLbW37h8GRVo72EMACzL2zz39O0 vaHOPEbBctds64rTKb0z5dn99X8SOnO3mJeG34OT545zgn290Gxeyglww7Y4e60E8KEk hlG9JbIZArfY/EDvy39ADgvcDs/cphg+KBYMqDb9eHonAi5cskoz6oh3VCC5U6A3NTpV 0jxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b="bW/FACJ8"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id fn22-20020a1709069d1600b00886e4a97692si7937899ejc.880.2023.01.31.07.25.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 07:25:21 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b="bW/FACJ8"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4F742386D536 for ; Tue, 31 Jan 2023 13:27:06 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id B9ABF3835366 for ; Tue, 31 Jan 2023 13:23:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B9ABF3835366 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-wr1-x433.google.com with SMTP id t7so5832691wrp.5 for ; Tue, 31 Jan 2023 05:23:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=iT5wsvMZSrYT+4z58iUQvufGnALhaGOXGhXSUKZr3kU=; b=bW/FACJ8ep24Bl2Q9yl3LmLcrLbL/Po/5olAY9On8Ru1knH+oIvrjMMDJuwSocTe/f t1kl2A2ssfVIsxGMwszpwPbXWP+ZAgvqnXj1bbMyIwvpMNXOveD0IsvNOHlMBnEjtQf3 h3kWiMAH/o4xA+zITAldgupe0XiWxGLXmLHBTdfmTL320bKUuPcGgtbyzL/3hvQ5U8TI /Mhw5hOhvp2zRBSW7pjDE6DIapXCdd7sp9kI96C1CiYk/QUy9yaRLJYdEOOw/METPcSk 6RsKGXI6AVMOupsrHy4swxtEboSv2W4GfGO82/+SXE/ElPpuvOp9gsaJK9pffgHiysDI CwgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iT5wsvMZSrYT+4z58iUQvufGnALhaGOXGhXSUKZr3kU=; b=cJ+Md6nCteeePiMu2ek+ZTpWIQFfKAwpgrH8SZoSu3b+Rw3Jz6FpZIU9hmi3naaHRb ZjQyl0MqCvYgzFsJ9M9P+1+HZqH/dO/LLw6kJQVWqyZ12Gf0gPTgY55f6XTzMfn67nAe wYbXFqA0ymeq5y5U5S2X9IHDlKJOh7A7+qy2Gxn+pP+G9kfCLmNMhrOv1UJ2iL9DJ3rH wpRwZ3C8p2YrkS150cDmEkLJEYwWHo4xHITGFzXTsW0TMyRzi9+Kyku4LVmV+K+D1yWT zXp0K/imoDuVQXcx2N9/lQsIr7yFx1uM4OBALu/FGJFwPCnpvx5Grtc87AoU+OTddwym EQTw== X-Gm-Message-State: AO0yUKVUR/lRXzD0U8Et9wtO99TlNGskh0HKkOYV85cq66YSulrixAKp EMHh9EizJvAs4UnGDLX71HLQPkWglynv+0W6bw== X-Received: by 2002:a5d:5244:0:b0:2bf:b77d:c5b9 with SMTP id k4-20020a5d5244000000b002bfb77dc5b9mr19932808wrc.14.1675171411300; Tue, 31 Jan 2023 05:23:31 -0800 (PST) Received: from platypus.lan ([2001:861:5e4c:3bb0:6424:328a:1734:3249]) by smtp.gmail.com with ESMTPSA id x12-20020adfec0c000000b002b065272da2sm14758449wrn.13.2023.01.31.05.23.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 05:23:31 -0800 (PST) From: Arthur Cohen To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Philip Herron Subject: [COMMITTED] gccrs: Cleanup formatting of backend expression visitor Date: Tue, 31 Jan 2023 14:27:16 +0100 Message-Id: <20230131132716.663831-1-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Spam-Status: No, score=-15.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756552202895779415?= X-GMAIL-MSGID: =?utf-8?q?1756552202895779415?= From: Philip Herron gcc/rust/ChangeLog: * backend/rust-compile-expr.h: Formatting. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/rust/backend/rust-compile-expr.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/gcc/rust/backend/rust-compile-expr.h b/gcc/rust/backend/rust-compile-expr.h index 83293a40b44..845511f9f43 100644 --- a/gcc/rust/backend/rust-compile-expr.h +++ b/gcc/rust/backend/rust-compile-expr.h @@ -68,24 +68,31 @@ public: void visit (HIR::RangeFullExpr &expr) override; void visit (HIR::RangeFromToInclExpr &expr) override; - // Empty visit for unused Expression HIR nodes. + // TODO void visit (HIR::ClosureExprInner &) override {} void visit (HIR::ClosureExprInnerTyped &) override {} - void visit (HIR::StructExprFieldIdentifier &) override {} - void visit (HIR::StructExprFieldIdentifierValue &) override {} - void visit (HIR::StructExprFieldIndexValue &) override {} void visit (HIR::ErrorPropagationExpr &) override {} void visit (HIR::RangeToInclExpr &) override {} - void visit (HIR::WhileLetLoopExpr &) override {} void visit (HIR::ForLoopExpr &) override {} + + // TODO + // these need to be sugared in the HIR to if statements and a match + void visit (HIR::WhileLetLoopExpr &) override {} void visit (HIR::IfExprConseqIfLet &) override {} void visit (HIR::IfLetExpr &) override {} void visit (HIR::IfLetExprConseqElse &) override {} void visit (HIR::IfLetExprConseqIf &) override {} void visit (HIR::IfLetExprConseqIfLet &) override {} + + // lets not worry about async yet.... void visit (HIR::AwaitExpr &) override {} void visit (HIR::AsyncBlockExpr &) override {} + // nothing to do for these + void visit (HIR::StructExprFieldIdentifier &) override {} + void visit (HIR::StructExprFieldIdentifierValue &) override {} + void visit (HIR::StructExprFieldIndexValue &) override {} + protected: tree get_fn_addr_from_dyn (const TyTy::DynamicObjectType *dyn, TyTy::BaseType *receiver, TyTy::FnType *fntype,