publicstaticint $noinline$foo(int internal, boolean check1, boolean check2) { int result = internal; if (check1) { // This block is to ensure `result` is a phi in the return block. Without this block // the compiler could just generate one block with selects. if (check2) {
mZenMode = 42;
}
result = (internal == 1) ? 1 : 0;
} // The optimization bug was to make the incorrect assumption that: // phi = (internal, (internal == 1)) // meant `internal` was a boolean. return result;
}
publicstaticvoid main(String[] args) { int result = $noinline$foo(2, true, true); if (result != 0) { thrownew Error("Expected 0, got " + result);
}
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.18 Sekunden
(vorverarbeitet am 2026-06-29)
¤
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.