You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current escape analysis, more than 90% of all entities are flagged with AtMost(...) (which is currently equivalent to GlobalEscape), because they were stored into arrays or fields.
Consider the following example:
static Object global = null;
void foo() {
Object o = new Object(); // may be local, iff the array arr is local and no read from the array escapes
Object[] arr = new Object[] { o }; // the array is local
Object o2 = arr[0]; // here the three-address code provides no information that o2 might be an alias of o
// global = o2; // would let o escape. if the stmt is omitted, o would not escape.
}
As a first step we would need such a field/array may alias analysis. Afterwards we would need to modify the escape analysis.
The text was updated successfully, but these errors were encountered:
Taken from Bitbucket#176:
In the current escape analysis, more than 90% of all entities are flagged with AtMost(...) (which is currently equivalent to GlobalEscape), because they were stored into arrays or fields.
Consider the following example:
static Object global = null;
void foo() {
Object o = new Object(); // may be local, iff the array arr is local and no read from the array escapes
Object[] arr = new Object[] { o }; // the array is local
Object o2 = arr[0]; // here the three-address code provides no information that o2 might be an alias of o
// global = o2; // would let o escape. if the stmt is omitted, o would not escape.
}
As a first step we would need such a field/array may alias analysis. Afterwards we would need to modify the escape analysis.
The text was updated successfully, but these errors were encountered: