Bug 17979 - Binary Compatibility: could resolve String references while defining class
Summary: Binary Compatibility: could resolve String references while defining class
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-13 19:52 UTC by Tom Tromey
Modified: 2016-09-30 22:53 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-01-13 01:06:55


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2004-10-13 19:52:19 UTC
In defineclass.cc, we do a pass over the constant pool
and turn JV_CONSTANT_String references into _Jv_Utf8Const
objects.  Later, during linking, these are turned into
real String instances.  We could just as easily create
real Strings when defining the class and reduce the amount
of work to be done during linking.

On the one hand this involves more space overhead for classes
which are not used (most string constants are ASCII, which
is represented more compactly in a Utf8Const).  On the other
hand, the utf8const is garbage after linking, some String constants
are common (these are always interned, so these would be shared),
and usually string constants are short anyway (so the savings
is probably not significant).
Comment 1 Andrew Pinski 2004-10-13 21:43:43 UTC
Is this related to PR 1259 at all?
Comment 2 Tom Tromey 2004-10-13 21:46:43 UTC
I think PR 1259 relates to deficiencies in the compiler,
not the runtime (or at least not this part of the runtime).
This PR refers to a minor possible optimization when defining
an interpreted class; it doesn't affect whether or when
other classes are initialized.
Comment 3 Andrew Pinski 2016-09-30 22:53:58 UTC
Closing as won't fix as libgcj (and the java front-end) has been removed from the trunk.