From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10337 invoked by alias); 3 Sep 2019 20:04:56 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 10309 invoked by uid 89); 3 Sep 2019 20:04:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Sep 2019 20:04:53 +0000 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C74EA18C893B; Tue, 3 Sep 2019 20:04:51 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-3.rdu2.redhat.com [10.10.112.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1F4F219C78; Tue, 3 Sep 2019 20:04:49 +0000 (UTC) Subject: Re: [PATCH] Simplify and generalize rust-demangle's unescaping logic. To: Eduard-Mihai Burtescu , Ian Lance Taylor Cc: gcc-patches , Ian Lance Taylor References: <98de4121-72c8-4a87-bf44-ab917f6c2055@www.fastmail.com> <3a39d463-1e2b-4385-92e4-a9ac7fcfcb3a@www.fastmail.com> From: Jeff Law Openpgp: preference=signencrypt Message-ID: <8b9ba233-ef7d-8953-4a9c-460c05db750e@redhat.com> Date: Tue, 03 Sep 2019 20:04:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <3a39d463-1e2b-4385-92e4-a9ac7fcfcb3a@www.fastmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00152.txt.bz2 On 8/28/19 9:16 AM, Eduard-Mihai Burtescu wrote: > Could you, or someone else, commit this for me (as I have no commit access)? I've added this to the trunk. Thanks, jeff > > Thanks. > > On Mon, Aug 26, 2019, at 11:04 PM, Ian Lance Taylor wrote: >> On Wed, Aug 14, 2019 at 10:24 AM Eduard-Mihai Burtescu wrote: >>> >>> Previously, rust-demangle.c was special-casing a fixed number >>> of '$uXY$' escapes, but 'XY' can technically be any hex value, >>> representing some Unicode codepoint. >>> >>> This patch adds more general support for '$u...$' escapes, >>> similar to https://github.com/alexcrichton/rustc-demangle/pull/29, >>> but only for the the ASCII subset. More complete Unicode support >>> may come at a later time, but right now I want to keep it simple. >>> >>> Escapes that decode to ASCII control codes are considered invalid, >>> as the Rust compiler should never emit them, and to avoid any >>> undesirable effects from accidentally outputting a control code. >>> >>> Additionally, the switch statements, which had one case for each >>> alphanumeric character, were replaced with if-else chains. >>> >>> Bootstrapped and tested on x86_64-unknown-linux-gnu. >>> >>> 2019-08-14 Eduard-Mihai Burtescu >>> libiberty/ChangeLog: >>> * rust-demangle.c (unescape): Remove. >>> (parse_lower_hex_nibble): New function. >>> (parse_legacy_escape): New function. >>> (is_prefixed_hash): Use parse_lower_hex_nibble. >>> (looks_like_rust): Use parse_legacy_escape. >>> (rust_demangle_sym): Use parse_legacy_escape. >>> * testsuite/rust-demangle-expected: Add 'llv$u6d$' test. >> >> This is OK. >> >> Thanks. >> >> Ian >>