staticboolean test1() {
Integer box; if (flag) {
box = 0;
} else {
box = 1;
} if (box == 2) { // Not reachable but that's only known after Incremental Boxing Inline for (int i = 0; i < 1000;) { if (notInlined()) { break;
}
}
MyValue val = new MyValue(4);
escape = new MyValue(42);
// Trigger scalarization of val in safepoint debug info
notInlined(); if (val.x < 0) { returntrue;
}
} returnfalse;
}
staticboolean test2() {
MyValue box = new MyValue(1); if (box.x == 0) { // Not reachable but that's only known once the box.x load is folded during IGVN for (int i = 0; i < 1000;) { if (notInlined()) { break;
}
}
MyValue val = new MyValue(4);
escape = new MyValue(42);
// Trigger scalarization of val in safepoint debug info
notInlined(); if (val.x < 0) { returntrue;
}
} returnfalse;
}
staticvoid test3() {
Integer box = 0; if (flag) {
box = 1;
} if (box == 2) { for (int i = 0; i < 1000;) { if (notInlined()) { break;
}
}
escape = new MyValue(42);
}
}
staticvoid test4() {
MyValue box = new MyValue(1); if (box.x == 0) { for (int i = 0; i < 1000;) { if (notInlined()) { break;
}
}
escape = new MyValue(42);
}
}
staticvoid test5() {
MyValue box = new MyValue(1); if (box.x == 0) { while (true) { if (notInlined()) { break;
}
}
escape = new MyValue(42);
}
}
staticvoid test6() {
MyValue box = new MyValue(1); if (box.x == 0) { while (notInlined()) { }
escape = new MyValue(42);
}
}
staticvoid test7() {
MyValue box = new MyValue(1); if (box.x == 0) { while (true) {
escape = new MyValue(2); if (notInlined()) { break;
}
}
escape = new MyValue(42);
}
}
staticvoid test8() {
MyValue box = new MyValue(1); if (box.x == 0) { for (int i = 0; i < 1000;) {
notInlined(); if (flag) { break;
}
}
escape = new MyValue(42);
}
}
staticboolean test9() {
Integer box; if (flag) {
box = 0;
} else {
box = 1;
} if (box == 2) { for (int i = 0; i < 1000;) { // MemBarRelease as only Phi user
volInt = 42; if (flag) { break;
}
}
MyValue val = new MyValue(4);
staticvoid test10() {
MyValue box = new MyValue(1); if (box.x == 0) { while (true) { // Allocate node as only Phi user
escape = new MyValue(2); if (flag) { break;
}
}
escape = new MyValue(42);
}
}
staticlong l;
staticvoid test11(boolean never) { float f = 1; boolean b; for (int i = 0; i < 5; ++i) {
b = (never || l < 0);
l = notInlined2(); if (!never) {
f += i;
}
}
l += f;
}
publicstaticboolean notInlined() { returnfalse;
}
publicstaticint notInlined2() { return42;
}
publicstaticvoid main(String[] args) { // Make sure classes are initialized
Integer i = 42; new MyValue(i);
test1();
test2();
test3();
test4();
test5();
test6();
test7();
test8();
test9();
test10();
test11(false);
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-10-01)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.