mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8287061: Support for rematerializing scalar replaced objects participating in allocation merges
Reviewed-by: kvn, vlivanov
This commit is contained in:
parent
3236ba0be4
commit
a53345ad03
26 changed files with 2631 additions and 254 deletions
|
@ -778,6 +778,13 @@ public final class AccessController {
|
|||
T result = action.run();
|
||||
assert isPrivileged(); // sanity check invariant
|
||||
|
||||
// The 'getStackAccessControlContext' call inside 'isPrivileged'
|
||||
// requires that no Local was scalar replaced. However, in some
|
||||
// situations, after inlining, 'result' (or part of a possibly
|
||||
// allocation merge Phi leading to it) might become NonEscaping and get
|
||||
// scalar replaced. The call below enforces 'result' to always escape.
|
||||
ensureMaterializedForStackWalk(result);
|
||||
|
||||
// Keep these alive across the run() call so they can be
|
||||
// retrieved by getStackAccessControlContext().
|
||||
Reference.reachabilityFence(context);
|
||||
|
@ -809,6 +816,13 @@ public final class AccessController {
|
|||
T result = action.run();
|
||||
assert isPrivileged(); // sanity check invariant
|
||||
|
||||
// The 'getStackAccessControlContext' call inside 'isPrivileged'
|
||||
// requires that no Local was scalar replaced. However, in some
|
||||
// situations, after inlining, 'result' (or part of a possibly
|
||||
// allocation merge Phi leading to it) might become NonEscaping and get
|
||||
// scalar replaced. The call below enforces 'result' to always escape.
|
||||
ensureMaterializedForStackWalk(result);
|
||||
|
||||
// Keep these alive across the run() call so they can be
|
||||
// retrieved by getStackAccessControlContext().
|
||||
Reference.reachabilityFence(context);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue