2 ms·
HotSpot Escape Analysis and Scalar Replacement Status
- stefs 5y agoi don't understand why o would escape if it's not inlined public int conditionalEscape(boolean cond1) { otherMethod(cond1); MyPair o = new MyPair(/*p1=*/1, /*p2=*/2); return o.getP1(); } the reference still never leaves conditionalEscape (i.e. it's not assigned to a variable outside the methods scope), there's just a layer of indirection.
- vips7L 5y agoI'm assuming there's some bug with inlining that prevents EA from occuring after otherMethod gets inlined.