public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #841
@ 2022-06-08 11:58 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 11:58 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b06de309ebdcc1ece1c3a5ef79a2a69a0e9f8965

commit b06de309ebdcc1ece1c3a5ef79a2a69a0e9f8965
Merge: a8a345642a2 52ee02f4012
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date:   Sat Dec 18 21:00:27 2021 +0000

    Merge #841
    
    841: Add support for enums on the match expression r=philberty a=philberty
    
    This adds in the initial support MatchExpression which allows us to start testing much
    more complex rust code. Ideally we can now start targeing the #682 to find nasty bugs
    early as possible.
    
    This takes the MatchExpr and generates a SWITCH_EXPR with associated
    CASE_LABEL_EXPR's for the variants that the qualifier contains.
    
    To improve this support in order to take advantage of SWITCH_ALL_CASES_P
    to add error checking for all cases being covered. This will require changes
    to the enum data structure to use ENUMERAL_TYPES instead of the flat i64
    so the enumerable type contains the list of all possible permutations.
    
    This patch is the first pass at the MatchExpr as the patch is already pretty
    large and serves as a base to move forward.
    
    Fixes #190
    
    
    Co-authored-by: Philip Herron <philip.herron@embecosm.com>

Diff:

 gcc/rust/Make-lang.in                        |   1 +
 gcc/rust/backend/rust-compile-context.h      |  16 ++
 gcc/rust/backend/rust-compile-expr.cc        | 172 +++++++++++++++++++++
 gcc/rust/backend/rust-compile-expr.h         |   6 +
 gcc/rust/backend/rust-compile-pattern.cc     | 218 +++++++++++++++++++++++++++
 gcc/rust/backend/rust-compile-pattern.h      |  78 ++++++++++
 gcc/testsuite/rust/execute/torture/match1.rs |  58 +++++++
 gcc/testsuite/rust/execute/torture/match2.rs |  42 ++++++
 8 files changed, 591 insertions(+)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-08 11:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 11:58 [gcc/devel/rust/master] Merge #841 Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).