From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id B609C3816664; Wed, 8 Jun 2022 12:14:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B609C3816664 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] Merge #981 X-Act-Checkin: gcc X-Git-Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> X-Git-Refname: refs/heads/devel/rust/master X-Git-Oldrev: ed1a4dc33fa78808fefaf020015b2177d7cdc1ce X-Git-Newrev: e82b59dfc9319d72f891bac099bfa0f46d8b8c99 Message-Id: <20220608121405.B609C3816664@sourceware.org> Date: Wed, 8 Jun 2022 12:14:05 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2022 12:14:05 -0000 https://gcc.gnu.org/g:e82b59dfc9319d72f891bac099bfa0f46d8b8c99 commit e82b59dfc9319d72f891bac099bfa0f46d8b8c99 Merge: ed1a4dc33fa 27be628911a Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> Date: Tue Mar 1 11:36:13 2022 +0000 Merge #981 981: macro-expand: Add SubstitutionCtx class in its own file r=CohenArthur a=CohenArthur The `MacroExpander` class had multiple static functions which were constantly passing the same parameters around for expansion. This refactor adds a new `SubstituteCtx` class which keeps track of the three common arguments given to the substitute functions, and offers these implementations in a new source file to keep the original expander light. Closes #957 Co-authored-by: Arthur Cohen Diff: gcc/rust/Make-lang.in | 1 + gcc/rust/expand/rust-macro-expand.cc | 221 +-------------------------- gcc/rust/expand/rust-macro-expand.h | 58 ------- gcc/rust/expand/rust-macro-substitute-ctx.cc | 206 +++++++++++++++++++++++++ gcc/rust/expand/rust-macro-substitute-ctx.h | 80 ++++++++++ 5 files changed, 291 insertions(+), 275 deletions(-)