On Thu, 25 Jan 2024 05:06:12 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> I agree. All values are produced by evaluating expressions. In this case we >> want to query whether a value produced by the compiler evaluating its >> expression is a constant value (inputs to the expression are constants and >> the expression had no material side-effects). Meaning if the method returns >> true then we could use that knowledge in subsequent expressions that may >> also produce constants or some specific behavior. > >> the method compilation has the expression in its original form > > So the JIT analyses the bytecode used to place the result on the call stack, > before the call, and from that determines if the expression were a constant? > This kind of self-analysis is not something I was aware of. I see, changed `expr` to `val`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/17527#discussion_r1466418470