Conservatively mark wide parameter used if it can only be partially marked.

This commit is contained in:
Oberon Swings
2024-01-03 14:31:56 +01:00
committed by Joren Hannes
parent 7160a9e484
commit a7265a3536
2 changed files with 17 additions and 0 deletions

View File

@@ -124,6 +124,22 @@ implements MemberVisitor,
-1L : -2L);
}
if (programMethod.processingInfo instanceof ProgramMethodOptimizationInfo
&& parameterSize >= 64) {
int parameterSizesCummulative = 0;
for (int index = 0; parameterSizesCummulative < 64; index++) {
boolean isCategory2 =
((ProgramMethodOptimizationInfo) programMethod.processingInfo).getParameterSize(index)
== 2;
if (parameterSizesCummulative == 63 && isCategory2) {
markParameterUsed(programMethod, 63);
}
parameterSizesCummulative +=
((ProgramMethodOptimizationInfo) programMethod.processingInfo)
.getParameterSize(index);
}
}
// Is it a native method?
if ((accessFlags & AccessConstants.NATIVE) != 0)
{

View File

@@ -5,6 +5,7 @@
- Fix potential access issues when backporting.
- Fix potential NoClassDefFoundError when using type specialization optimization. (#373)
- Improve processing of Kotlin metadata flags to prevent unnecessary null checks for consumers of protected library artifacts.
- Prevent potential `StackGeneralizationException` during optimization when processing methods with many arguments.
## Version 7.4.1