On Thu, 9 Jul 2026 04:56:42 GMT, Joe Darcy <[email protected]> wrote:

>> This is some extremely basic overview about value class migrations.
>> 
>> 1. Build: I intentionally skipped the streamlined build system installed by 
>> David Beaumont. Instead, I stressed the custom handling used by Value 
>> Objects JEP. (The "Preview Classes in Interim `javac`" section might go to 
>> general documentation later.)
>> 
>> 2. Testing: I started from the motivations/goals and describe how those 
>> goals are accomplished.
>> 3. Wrapper class caches: Some simple overview.
>> 
>> There are definitely more topics to cover; feel free to raise.
>> 
>> Paging @jddarcy and @viktorklang-ora for proofreading.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> doc/value-class-preview.md line 27:
> 
>> 25: source files where these occurrences are replaced by `value class` and
>> 26: `value record`, respectively.
>> 27: 
> 
> So, with the current system, consequently, any needed testing of "is preview 
> enabled" must be done at runtime rather than via a compile-time macro?
> (The other little code gen systems used in the JDK have a more expressive set 
> of primitives. In my estimation, the simple system here is good for the 
> purpose it is being used for, but it is helpful to document it here.)

Yes. I don't understand how a compile-time macro can work - we have one runtime 
that must support both preview-on and preview-off runs.

-------------

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2633#discussion_r3555027831

Reply via email to