public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA v2 3/4] Convert Rust to use discriminated unions
Date: Mon, 26 Feb 2018 06:50:00 -0000	[thread overview]
Message-ID: <20180226065038.wfttw45uugg2lyfy@adacore.com> (raw)
In-Reply-To: <20180222203018.23551-4-tom@tromey.com>

> 2018-02-22  Tom Tromey  <tom@tromey.com>
> 
> 	* 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) <TYPE_CODE_UNION>: Remove enum code.
> 	<TYPE_CODE_STRUCT>: 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) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
> 	Update enum handling.
> 	* dwarf2read.c (struct dwarf2_cu) <rust_unions>: 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  <tom@tromey.com>
> 
> 	* gdb.rust/simple.exp: Accept more possible results in enum test.

Looks good to me.

Thanks Tom.
-- 
Joel

  reply	other threads:[~2018-02-26  6:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 20:30 [RFA v2 0/4] variants and variant parts Tom Tromey
2018-02-22 20:30 ` [RFA v2 3/4] Convert Rust to use discriminated unions Tom Tromey
2018-02-26  6:50   ` Joel Brobecker [this message]
2018-02-27 23:23   ` Pedro Alves
2018-02-28  0:23     ` Tom Tromey
2018-04-10 20:36   ` -readnow crash Rust regression [Re: [RFA v2 3/4] Convert Rust to use discriminated unions] Jan Kratochvil
2018-04-11  2:52     ` Tom Tromey
2018-04-11  7:04       ` Jan Kratochvil
2018-04-11 19:49         ` Tom Tromey
2018-04-12 18:10           ` Tom Tromey
2018-04-12 18:45             ` Keith Seitz
2018-02-22 20:30 ` [RFA v2 2/4] Initial support for variant parts Tom Tromey
2018-02-26  6:49   ` Joel Brobecker
2018-02-22 20:30 ` [RFA v2 4/4] Handle DW_TAG_variant_part and DW_TAG_variant Tom Tromey
2018-02-26  6:56   ` Joel Brobecker
2018-02-26 16:16     ` Tom Tromey
2018-02-22 20:30 ` [RFA v2 1/4] Sign-extend non-bit-fields in unpack_bits_as_long Tom Tromey
2018-02-26  6:45   ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180226065038.wfttw45uugg2lyfy@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).