This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 1/2] Add gcc/typed-splay-tree.h
- From: Jeff Law <law at redhat dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, jit at gcc dot gnu dot org
- Date: Wed, 01 Jul 2015 11:35:59 -0600
- Subject: Re: [PATCH 1/2] Add gcc/typed-splay-tree.h
- Authentication-results: sourceware.org; auth=none
- References: <558A846C dot 70003 at starynkevitch dot net> <1435259621-45194-1-git-send-email-dmalcolm at redhat dot com> <558C53EA dot 2040706 at redhat dot com> <1435599418 dot 13727 dot 144 dot camel at surprise>
On 06/29/2015 11:36 AM, David Malcolm wrote:
On Thu, 2015-06-25 at 13:18 -0600, Jeff Law wrote:
On 06/25/2015 01:13 PM, David Malcolm wrote:
I found when implementing switch statements for the jit that it
was much easier to work with libiberty's splay-tree.h by first
wrapping it in a C++ wrapper to add typesafety.
This patch adds such a wrapper, implementing the methods I needed.
It's unused in this patch, but is used in the followup patch (which only
touches the jit).
OK for trunk?
gcc/ChangeLog:
* typed-splay-tree.h: New file.
OK.
Well, this is embarrassing, it seems the patch I posted to the list
doesn't actually compile.
It happens. It's one of the reasons why we have the rules around
bootstrap testing :-) I can't count how many of these kinds of goofs
I've made through the years.
The underlying splay_tree_insert returns a splay_tree_node, I had the
typed_splay_tree::insert returning a value_type. I dropped this bogus
return type from the "insert" method in the implementation, in favor of
"void", but I forgot to update the declaration, leading to errors when
attempting to actually compile this (via jit/jit-recording.c in the
followup patch).
The attached one-liner patch drops it from the declaration, and applies
to [PATCH 1/2]. I don't know if I can count this as "obvious"... It
does compile now, and "make check-jit" looks good.
I'd think this qualifies :-)
jeff