Final CONSTANT_Dynamic spec
daniel.smith at oracle.com
Wed Feb 7 23:55:40 UTC 2018
> On Feb 4, 2018, at 9:59 AM, Daniel Heidinga <Daniel_Heidinga at ca.ibm.com> wrote:
> Can you clarify this sentence:
> Note that an implementation is free to try to re-resolve X multiple times and keep looping until the stack actually overflows—once you've reached the nested X the first time, all further computation is not observable by users.
> In particular this statement "not observable by users" has some unpleasant implications. Does that mean that side-effects that occur during the re-resolution should be undone?That the StackOverflowError's backtrace should only include a single loop of the re-resolution?
> There are a lot of ways that users could observe further computation and if the JVM needs to detect and prevent them from seeing the effects, this actually mandates early detection. Was that the intention or am I being overly pedantic?
The dashes (-----) are to delineate the actual spec. The sentence you're asking about is just me explaining for this mailing list how this rule interacts with our current implementation strategy.
So, nothing being mandated here.
That said, what side-effects are you concerned about? My claim is that re-resolution in this scenario would not, for example, trigger any class loading or bootstrap invocations.
My use if "observable to users" was not meant to include things that are implementation details anyway, like stack traces, CPU usage, debugger interactions, etc.
More information about the valhalla-spec-observers