Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v4]

2022-02-28 Thread Ioi Lam
On Thu, 17 Feb 2022 23:20:41 GMT, Calvin Cheung wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use InstanceKlass::do_local_static_fields for some field iterations > > Looks good. Minor comment below. > Also, several fi

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v7]

2022-02-27 Thread Ioi Lam
> **Background:** > > In the Java Language, Enums can be tested for equality, so the constants in > an Enum type must be unique. Javac compiles an enum declaration like this: > > > public enum Day { SUNDAY, MONDAY ... } > > > to > > > public class Day extends java.lang.Enum { > public

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v3]

2022-02-25 Thread Coleen Phillimore
On Wed, 19 Jan 2022 05:44:10 GMT, Ioi Lam wrote: >> src/hotspot/share/cds/heapShared.cpp line 433: >> >>> 431: oop mirror = k->java_mirror(); >>> 432: int i = 0; >>> 433: for (JavaFieldStream fs(k); !fs.done(); fs.next()) { >> >> This seems like it should also use InstanceKlass::do_local_

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v6]

2022-02-25 Thread Coleen Phillimore
On Wed, 23 Feb 2022 04:15:28 GMT, Ioi Lam wrote: >> **Background:** >> >> In the Java Language, Enums can be tested for equality, so the constants in >> an Enum type must be unique. Javac compiles an enum declaration like this: >> >> >> public enum Day { SUNDAY, MONDAY ... } >> >> >> to >

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v6]

2022-02-22 Thread Ioi Lam
> **Background:** > > In the Java Language, Enums can be tested for equality, so the constants in > an Enum type must be unique. Javac compiles an enum declaration like this: > > > public enum Day { SUNDAY, MONDAY ... } > > > to > > > public class Day extends java.lang.Enum { > public

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v5]

2022-02-22 Thread Ioi Lam
> **Background:** > > In the Java Language, Enums can be tested for equality, so the constants in > an Enum type must be unique. Javac compiles an enum declaration like this: > > > public enum Day { SUNDAY, MONDAY ... } > > > to > > > public class Day extends java.lang.Enum { > public

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v4]

2022-02-17 Thread Calvin Cheung
On Wed, 19 Jan 2022 05:47:57 GMT, Ioi Lam wrote: >> **Background:** >> >> In the Java Language, Enums can be tested for equality, so the constants in >> an Enum type must be unique. Javac compiles an enum declaration like this: >> >> >> public enum Day { SUNDAY, MONDAY ... } >> >> >> to >

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v3]

2022-02-16 Thread Ioi Lam
On Wed, 19 Jan 2022 05:50:50 GMT, Ioi Lam wrote: >> I don't really know this code well enough to do a good code review. I had >> some comments though. > >> I don't really know this code well enough to do a good code review. I had >> some comments though. > > Hi Coleen, thanks for taking a loo

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v3]

2022-01-18 Thread Ioi Lam
On Mon, 17 Jan 2022 19:22:23 GMT, Coleen Phillimore wrote: > I don't really know this code well enough to do a good code review. I had > some comments though. Hi Coleen, thanks for taking a look. This PR has two major parts: 1. Check for inappropriate reference to static fields. This is mainl

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v3]

2022-01-18 Thread Ioi Lam
On Mon, 17 Jan 2022 18:36:35 GMT, Coleen Phillimore wrote: >> Ioi Lam has updated the pull request with a new target base due to a merge >> or a rebase. The incremental webrev excludes the unrelated changes brought >> in by the merge/rebase. The pull request contains four additional commits >>

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v4]

2022-01-18 Thread Ioi Lam
> **Background:** > > In the Java Language, Enums can be tested for equality, so the constants in > an Enum type must be unique. Javac compiles an enum declaration like this: > > > public enum Day { SUNDAY, MONDAY ... } > > > to > > > public class Day extends java.lang.Enum { > public

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v3]

2022-01-17 Thread Coleen Phillimore
On Sat, 11 Dec 2021 01:55:50 GMT, Ioi Lam wrote: >> **Background:** >> >> In the Java Language, Enums can be tested for equality, so the constants in >> an Enum type must be unique. Javac compiles an enum declaration like this: >> >> >> public enum Day { SUNDAY, MONDAY ... } >> >> >> to >

[Ping] RFR: 8275731: CDS archived enums objects are recreated at runtime

2022-01-04 Thread Ioi Lam
Still looking for reviewers Thanks - Ioi On 12/1/21 1:02 PM, Ioi Lam wrote: **Background:** In the Java Language, Enums can be tested for equality, so the constants in an Enum type must be unique. Javac compiles an enum declaration like this: public enum Day { SUNDAY, MONDAY ... } t

Re: RFR: 8275731: CDS archived enums objects are recreated at runtime [v3]

2021-12-10 Thread Ioi Lam
> **Background:** > > In the Java Language, Enums can be tested for equality, so the constants in > an Enum type must be unique. Javac compiles an enum declaration like this: > > > public enum Day { SUNDAY, MONDAY ... } > > > to > > > public class Day extends java.lang.Enum { > public

RFR: 8275731: CDS archived enums objects are recreated at runtime

2021-12-01 Thread Ioi Lam
**Background:** In the Java Language, Enums can be tested for equality, so the constants in an Enum type must be unique. Javac compiles an enum declaration like this: public enum Day { SUNDAY, MONDAY ... } to public class Day extends java.lang.Enum { public static final SUNDAY = new D