From: Tom Tromey <tromey@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFA: shrink main_type
Date: Mon, 18 Aug 2008 15:19:00 -0000 [thread overview]
Message-ID: <m3ej4mxshs.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20080818132001.GA9434@caradoc.them.org> (Daniel Jacobowitz's message of "Mon\, 18 Aug 2008 09\:20\:01 -0400")
>>>>> "Daniel" == Daniel Jacobowitz <drow@false.org> writes:
Daniel> If you're going to do this anyway, why not make them individual
Daniel> bitfields? Would that be too disruptive?
It would not be too bad. I count 69 uses of TYPE_FLAGS, that isn't a
huge number. The other uses are hidden by the accessor macros.
I will make this change.
FWIW I only looked at this struct since it is marked as being
space-critical, and I saw a way to shrink it a bit.
Daniel> I don't think it's particularly useful to change the type of this to
Daniel> the enum since we don't put enum values in it, just bitwise
Daniel> combination of them. (Isn't that invalid in C++?)
Yes, it is invalid C++. Though... currently if you build gdb with
g++, you will get thousands of errors. One more wouldn't make that
project significantly harder IMO :)
Daniel> And if you want to repack the upper/lower bounds fields, I bet they
Daniel> can move into type_specific.
I looked at this. I am not so sure about moving these fields -- they
are referenced by pretty much every language. I didn't look at why
this was so (i.e., could be dead code, or bad cut-and-paste, or
whatever).
I was thinking that perhaps the vptr stuff could go in type_specific.
Or, we could do like GCC and have different structures depending on
the code, so that non-struct types don't have to carry around unused
fields. I didn't try to measure how much this would save. These are
bigger changes; this particular patch was just an easy way to save
some memory.
Tom
next prev parent reply other threads:[~2008-08-18 15:19 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-17 18:50 Tom Tromey
2008-08-18 13:01 ` Joel Brobecker
2008-08-18 13:20 ` Daniel Jacobowitz
2008-08-18 13:30 ` Joel Brobecker
2008-08-18 15:19 ` Tom Tromey [this message]
2008-08-18 19:39 ` Tom Tromey
2008-08-18 22:17 ` Andreas Schwab
2008-08-18 22:32 ` Daniel Jacobowitz
2008-08-19 5:13 ` Joel Brobecker
2008-08-19 17:56 ` Tom Tromey
2008-08-24 10:12 ` Joel Brobecker
2008-08-24 16:41 ` Tom Tromey
2008-08-24 18:03 ` Tom Tromey
2008-08-24 20:35 ` Tom Tromey
2008-08-25 15:50 ` Joel Brobecker
2008-08-25 19:12 ` Tom Tromey
2010-09-15 19:23 ` Ken Werner
2010-09-25 14:38 ` Ken Werner
2010-09-30 18:56 ` Joel Brobecker
2010-10-01 13:23 ` Ken Werner
2010-10-01 15:34 ` [patch] move the nottext flag to the instance_flags Ken Werner
2010-10-01 16:15 ` Joel Brobecker
2010-10-05 21:50 ` Tom Tromey
2010-10-06 8:45 ` Ken Werner
2008-08-18 15:04 ` RFA: shrink main_type Tom Tromey
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=m3ej4mxshs.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/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