On Mon, 13 Jul 2026 17:16:28 GMT, Chris Plummer <[email protected]> wrote:

>> Not sure what "beholden to the spec" actually means in this context, but to 
>> say JDI value object support is "consistent with JLS/JVMS" really doesn't 
>> tell you anything IMO. The main point here is simply that you can obtain an 
>> `ObjectReference` for a value object, just like any identity object. The 
>> only, very important, difference, is that it is a snapshot of the value 
>> object at that point in time. And whilst the value object is immutable, 
>> different ObjectReferences obtained during construction could capture 
>> different initalization states.
>
> Your summary is correct. I was just trying to provide more context and 
> understanding. I can take a stab at a more succinct version that makes no 
> spec references.

...but keep in mind that I'm also trying to satisfy Joe's requests:

>Additional comment: for JDI, I recommend including a short discussion of 
>objects of value classes somewhere in the API; this would supplement the links 
>to Class.isValue already in the patch.

And

> my request is posed from the perspective of a reader of the JDI docs who is 
> trying to find out how JDI works with respect to value classes. Value classes 
> differ on == semantics, no locking, etc. So besides the point changes in 
> various methods reflecting those updates, I think a brief paragraph (which 
> could potentially be linked to from elsewhere in the JDI javadoc) explaining 
> those points would be useful.

I don't want this to end up being reduced to just restating what is in 
StackFrame::thisObject(), which seems to be where your suggestions are headed.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2639#discussion_r3572753796

Reply via email to