Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-11-16 Thread Jeff Law
On 11/8/19 12:16 PM, Eduard-Mihai Burtescu wrote: > 2019-10-22 Eduard-Mihai Burtescu > include/ChangeLog: > * demangle.h (rust_demangle_callback): Add. > libiberty/ChangeLog: > * cplus-dem.c (cplus_demangle): Use rust_demangle directly. > (rust_demangle): Remove. > *

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-11-15 Thread Eduard-Mihai Burtescu
> This is OK. > > Thanks. > > Ian > Ping for someone to commit this (as mentioned before, I have no commit access). I've tried pinging some people on IRC, but saw no response. Approved version of the patch: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg00647.html Original email, containing

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-11-08 Thread Ian Lance Taylor via gcc-patches
On Fri, Nov 8, 2019 at 11:17 AM Eduard-Mihai Burtescu wrote: > > On Fri, Nov 8, 2019, at 7:43 PM, Ian Lance Taylor wrote: > > On Fri, Nov 8, 2019 at 9:02 AM Eduard-Mihai Burtescu wrote: > > > > > > Ping #2 for https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01830.html > > > Original patch (without

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-11-08 Thread Eduard-Mihai Burtescu
On Fri, Nov 8, 2019, at 7:43 PM, Ian Lance Taylor wrote: > On Fri, Nov 8, 2019 at 9:02 AM Eduard-Mihai Burtescu wrote: > > > > Ping #2 for https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01830.html > > Original patch (without the early exit optimization): > >

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-11-08 Thread Ian Lance Taylor via gcc-patches
On Fri, Nov 8, 2019 at 9:02 AM Eduard-Mihai Burtescu wrote: > > Ping #2 for https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01830.html > Original patch (without the early exit optimization): > https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01591.html Sorry for letting this slide. Do we need the

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-11-08 Thread Eduard-Mihai Burtescu
Ping #2 for https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01830.html Original patch (without the early exit optimization): https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01591.html Thanks, - Eddy B. On Wed, Oct 30, 2019, at 6:46 PM, Eduard-Mihai Burtescu wrote: > Ping:

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-10-30 Thread Eduard-Mihai Burtescu
Ping: https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01830.html Original patch (without the early exit optimization): https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01591.html Thanks, - Eddy B. On Fri, Oct 25, 2019, at 3:44 PM, Eduard-Mihai Burtescu wrote: > > This can be further optimized by

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-10-25 Thread Eduard-Mihai Burtescu
> This can be further optimized by using memcmp in place of strncmp, since from > the length check you know that you won't see the null terminator among the > three > chars you're checking. Fair enough, here's the combined changelog/diff, with memcmp: 2019-10-22 Eduard-Mihai Burtescu

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-10-23 Thread Segher Boessenkool
On Wed, Oct 23, 2019 at 07:28:48PM +0200, Jakub Jelinek wrote: > On Wed, Oct 23, 2019 at 12:19:10PM -0500, Segher Boessenkool wrote: > > I of course know that for e.g. strcmp or strlen we need to be careful of > > page crossings; but this is strncmp, which has a size argument saying the > > size

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-10-23 Thread Jakub Jelinek
On Wed, Oct 23, 2019 at 12:19:10PM -0500, Segher Boessenkool wrote: > I of course know that for e.g. strcmp or strlen we need to be careful of > page crossings; but this is strncmp, which has a size argument saying the > size of the array objects of its arguments!

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-10-23 Thread Segher Boessenkool
On Wed, Oct 23, 2019 at 06:46:14PM +0200, Jakub Jelinek wrote: > On Wed, Oct 23, 2019 at 11:37:26AM -0500, Segher Boessenkool wrote: > > On Wed, Oct 23, 2019 at 07:22:47PM +0300, Alexander Monakov wrote: > > > On Wed, 23 Oct 2019, Eduard-Mihai Burtescu wrote: > > > > @@ -384,6 +384,14 @@

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-10-23 Thread Jakub Jelinek
On Wed, Oct 23, 2019 at 11:37:26AM -0500, Segher Boessenkool wrote: > On Wed, Oct 23, 2019 at 07:22:47PM +0300, Alexander Monakov wrote: > > On Wed, 23 Oct 2019, Eduard-Mihai Burtescu wrote: > > > @@ -384,6 +384,14 @@ rust_demangle_callback (const char *mangled, int > > > options, > > >

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-10-23 Thread Segher Boessenkool
On Wed, Oct 23, 2019 at 07:22:47PM +0300, Alexander Monakov wrote: > On Wed, 23 Oct 2019, Eduard-Mihai Burtescu wrote: > > @@ -384,6 +384,14 @@ rust_demangle_callback (const char *mangled, int > > options, > > return 0; > >rdm.sym_len--; > > > > + /* Legacy Rust symbols

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-10-23 Thread Alexander Monakov
On Wed, 23 Oct 2019, Eduard-Mihai Burtescu wrote: > @@ -384,6 +384,14 @@ rust_demangle_callback (const char *mangled, int options, > return 0; >rdm.sym_len--; > > + /* Legacy Rust symbols also always end with a path segment > + that encodes a 16 hex digit hash,

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-10-23 Thread Eduard-Mihai Burtescu
On Tue, Oct 22, 2019, at 9:39 PM, Ian Lance Taylor wrote: > I have to assume that C++ demangling is still quite a bit more common > than Rust demangling, so it's troubling that it looks like we're going > to do extra work for each symbol that starts with _ZN, which is not a > particularly uncommon

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-10-22 Thread Ian Lance Taylor via gcc-patches
On Tue, Oct 22, 2019 at 11:08 AM Eduard-Mihai Burtescu wrote: > > @@ -160,27 +159,20 @@ cplus_demangle (const char *mangled, int options) >if ((options & DMGL_STYLE_MASK) == 0) > options |= (int) current_demangling_style & DMGL_STYLE_MASK; > > + /* The Rust demangling is implemented

[PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-10-22 Thread Eduard-Mihai Burtescu
This way, rust-demangle is closer to the official "rustc-demangle" Rust demangler, which also doesn't require full C++ demangling for the legacy format (implemented here), and only recognizes simple "_ZN"..."E" paths with identifier components that the format uses. The new code also has fewer