Skip to content

Commit

Permalink
code_gen_cleanup (#2636)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpalat committed Jun 28, 2024
1 parent 85fef6b commit ead1489
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ private void checkForPrimitives(BlockScope scope, TypeBinding checkedType, TypeB
|| route == PrimitiveConversionRoute.NARROWING_PRIMITVE_CONVERSION
|| route == PrimitiveConversionRoute.WIDENING_AND_NARROWING_PRIMITIVE_CONVERSION) {
// this.expression.computeConversion(scope, expressionType, checkedType);
addSecretExpressionValue(scope, expressionType);
} else if (route == PrimitiveConversionRoute.NO_CONVERSION_ROUTE) {
scope.problemReporter().notCompatibleTypesError(this, expressionType, checkedType);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5507,15 +5507,16 @@ public void invokeExactConversionsSupport(int typeFromTo) {
default :
return; // should not occur
}
char[] declaringClass = ConstantPool.JAVA_LANG_RUNTIME_EXACTCONVERSIONSSUPPORT;
invoke(
Opcodes.OPC_invokestatic,
receiverAndArgsSize, // receiverAndArgsSize
returnTypeSize, // return type size
ConstantPool.ExactConversionsSupport,
declaringClass,
methodName,
signature,
typeID,
getPopularBinding(ConstantPool.ExactConversionsSupport));
TypeBinding.BOOLEAN);
}

public void invokeThrowableToString() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ public class ConstantPool implements ClassFileConstants, TypeIds {

public static final char[] PROCESS = "process".toCharArray(); //$NON-NLS-1$

public static final char[] ExactConversionsSupport = "java/lang/runtime/ExactConversionsSupport".toCharArray(); //$NON-NLS-1$
public static final char[] JAVA_LANG_RUNTIME_EXACTCONVERSIONSSUPPORT = "java/lang/runtime/ExactConversionsSupport".toCharArray(); //$NON-NLS-1$
public static final char[] isIntToFloatExact = "isIntToFloatExact".toCharArray(); //$NON-NLS-1$
public static final char[] isIntToFloatExactSignature = "(I)Z".toCharArray(); //$NON-NLS-1$
public static final char[] isLongToFloatExact = "isLongToFloatExact".toCharArray(); //$NON-NLS-1$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ public static Test suite() {
// since_22.add(SuperAfterStatementsTest.class);
since_22.add(UnnamedPatternsAndVariablesTest.class);
since_22.add(UseOfUnderscoreJava22Test.class);
since_22.add(SuperAfterStatementsTest.class);
since_22.add(SwitchPatternTest21.class);

ArrayList since_23 = new ArrayList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private static boolean isNodeTypeSupportedinAST(int apiLevel, boolean previewEna
case ASTNode.RECORD_PATTERN:
return apiLevel >= AST.JLS21;
case ASTNode.EitherOr_MultiPattern:
return apiLevel >= AST.JLS21 && previewEnabled;
return apiLevel >= AST.JLS22;
}
return false;
}
Expand Down
24 changes: 24 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,30 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-p2-extras-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution> <!-- Checks versions are properly bumped from one stream to the other -->
<id>compare-attached-artifacts-with-release</id>
<goals>
<goal>compare-version-with-baselines</goal>
</goals>
<configuration>
<skip>${compare-version-with-baselines.skip}</skip>
<baselines>
<baseline>${previous-release.baseline}</baseline>
</baselines>
<comparator>zip</comparator>
<ignoredPatterns>
<pattern>META-INF/ECLIPSE_.RSA</pattern>
<pattern>META-INF/ECLIPSE_.SF</pattern>
</ignoredPatterns>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down

0 comments on commit ead1489

Please sign in to comment.