From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48092 invoked by alias); 26 Feb 2018 06:50:48 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 48074 invoked by uid 89); 26 Feb 2018 06:50:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=contract X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Feb 2018 06:50:45 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C0257116C20; Mon, 26 Feb 2018 01:50:43 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id np5QUG6yntVb; Mon, 26 Feb 2018 01:50:43 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 5C1C9116C04; Mon, 26 Feb 2018 01:50:43 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 09BB983054; Mon, 26 Feb 2018 10:50:39 +0400 (+04) Date: Mon, 26 Feb 2018 06:50:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA v2 3/4] Convert Rust to use discriminated unions Message-ID: <20180226065038.wfttw45uugg2lyfy@adacore.com> References: <20180222203018.23551-1-tom@tromey.com> <20180222203018.23551-4-tom@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180222203018.23551-4-tom@tromey.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2018-02/txt/msg00374.txt.bz2 > 2018-02-22 Tom Tromey > > * rust-lang.h (rust_last_path_segment): Declare. > * rust-lang.c (rust_last_path_segment): Now public. Change > contract. > (struct disr_info): Remove. > (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL) > (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged) > (rust_get_disr_info, rust_tuple_variant_type_p): Remove. > (rust_enum_p, rust_enum_variant): New function. > (rust_underscore_fields): Remove "offset" parameter. > (rust_print_enum): New function. > (rust_val_print) : Remove enum code. > : Call rust_print_enum when appropriate. > (rust_print_struct_def): Add "for_rust_enum" parameter. Handle > enums. > (rust_internal_print_type): New function, from rust_print_type. > Remove enum code. > (rust_print_type): Call rust_internal_print_type. > (rust_evaluate_subexp) : > Update enum handling. > * dwarf2read.c (struct dwarf2_cu) : New field. > (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum) > (rust_union_quirks): New functions. > (process_full_comp_unit, process_full_type_unit): Call > rust_union_quirks. > (process_structure_scope): Update rust_unions if necessary. > > 2018-02-22 Tom Tromey > > * gdb.rust/simple.exp: Accept more possible results in enum test. Looks good to me. Thanks Tom. -- Joel