public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: alexander@malmberg.org
To: gcc-gnats@gcc.gnu.org
Subject: objc/5956: selectors aren't matched properly when added to the selector table
Date: Wed, 13 Mar 2002 17:36:00 -0000	[thread overview]
Message-ID: <20020314013144.1053.qmail@sources.redhat.com> (raw)


>Number:         5956
>Category:       objc
>Synopsis:       selectors aren't matched properly when added to the selector table
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          pessimizes-code
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 13 17:36:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Malmberg
>Release:        gcc version 3.0.3
>Organization:
>Environment:

>Description:
Due to a simple mixup, build_typed_selector_reference() won't properly match the new selector with existing selectors (TREE_PURPOSE() and TREE_VALUE()) are mixed up).

This doesn't cause incorrect code, but the selector tables are unnecessarily large; it bloats all objective-c code (by approximately 10% in the cases I've measured).

I've attached a patch that fixes this.
>How-To-Repeat:
Compile any program that contains two references to the same selector, eg:

[someobject foo];
[someobject foo];

The resulting selector table will have to entries for 'foo'.
>Fix:
Apply the patch.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="gcc_selector_match.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="gcc_selector_match.patch"

SW5kZXg6IG9iamMtYWN0LmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTogL2N2c3Jvb3QvZ2NjL2djYy9n
Y2Mvb2JqYy9vYmpjLWFjdC5jLHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjY2LjIuNwpkaWZmIC11
IC1yMS42Ni4yLjcgb2JqYy1hY3QuYwotLS0gb2JqYy1hY3QuYwkyOSBKdW4gMjAwMSAxOToyMDo0
MyAtMDAwMAkxLjY2LjIuNworKysgb2JqYy1hY3QuYwk0IE1hciAyMDAyIDE1OjU4OjUyIC0wMDAw
CkBAIC0yMjM1LDcgKzIyMzUsNyBAQAogCiAgIHdoaWxlICgqY2hhaW4pCiAgICAgewotICAgICAg
aWYgKFRSRUVfUFVSUE9TRSAoKmNoYWluKSA9PSBpZGVudCAmJiBUUkVFX1ZBTFVFICgqY2hhaW4p
ID09IHByb3RvKQorICAgICAgaWYgKFRSRUVfUFVSUE9TRSAoKmNoYWluKSA9PSBwcm90byAmJiBU
UkVFX1ZBTFVFICgqY2hhaW4pID09IGlkZW50KQogCWdvdG8gcmV0dXJuX2F0X2luZGV4OwogCiAg
ICAgICBpbmRleCsrOwo=


             reply	other threads:[~2002-03-14  1:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-13 17:36 alexander [this message]
2002-09-03  3:41 nicola

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=20020314013144.1053.qmail@sources.redhat.com \
    --to=alexander@malmberg.org \
    --cc=gcc-gnats@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).