RFR 8071627: Code refactoring to override == operator of Symbol*
Coleen Phillimore
coleen.phillimore at oracle.com
Wed Apr 8 22:03:09 UTC 2015
I've only looked at one part so far.
In symbol.hpp why do you duplicate functions in Symbol* in SymbolRef.
Why not overload operator () and -> like handles do:
/* Operators for ease of use */ \
type* operator () () const { return obj(); } \
type* operator -> () const { return
non_null_obj(); } \
Thanks,
Coleen
On 4/2/15, 8:48 PM, Calvin Cheung wrote:
> Please review this enhancement for Symbol comparison.
> This should allow future enhancement such as multiple SymbolTable and
> symbols with the same utf8 strings in different tables should be
> considered "equivalent".
>
> Although this changeset touches many files, the main change is in
> src/share/vm/oops/symbol.hpp with a new SymbolRef class. The rest of
> the change is mostly replacing Symbol* with SymbolRef.
>
> Since currently there's only one single SymbolTable, it isn't feasible
> to write a specific testcase for this enhancement. We will provide a
> testcase when this enhancement is used.
>
> Note also that the copyright header will be fixed before this
> changeset is committed.
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8071627
>
> webrev: http://cr.openjdk.java.net/~ccheung/8071627/webrev.00/
>
> Tests:
> JPRT
> nsk.jvmti on linux_x64
>
> the following performance benmarks on linux_x64, solaris_x64,
> solaris_sparc, mac, windows_x64 with no significant performance
> degradation:
> jetstream, scimark, specjbb2000, specjbb2005, specjvm98, volano25
>
> some internal class loading performance tests
>
> thanks,
> Calvin
More information about the hotspot-runtime-dev
mailing list