RFR: 8352617: IR framework test TestCompileCommandFileWriter.java runs TestCompilePhaseCollector instead of itself
Marc Chevalier
mchevalier at openjdk.org
Thu Mar 27 07:27:13 UTC 2025
On Wed, 26 Mar 2025 09:34:49 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/flag/TestCompileCommandFileWriter.java line 85:
>>
>>> 83: private void check(Class<?> testClass, boolean findIdeal, boolean findOpto, CompilePhase... compilePhases) throws IOException {
>>> 84: var compilerDirectivesFlagBuilder = new CompilerDirectivesFlagBuilder(testClass);
>>> 85: compilerDirectivesFlagBuilder.build();
>>
>> I was tempted to write
>>
>> new CompilerDirectivesFlagBuilder(testClass).build();
>>
>> since we don't use `compilerDirectivesFlagBuilder` after. But I felt like the style might not be liked. Opinions on that?
>
> I guess it's fine to go with `new CompilerDirectivesFlagBuilder(testClass).build()`.
If there is no strong preference, I'll just leave it as it is: having the variable doesn't hurt, as far as I know, and it helps slightly if one wants to debug, to make a breakpoint, to inspect the state of the object etc..
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24240#discussion_r2015817777
More information about the hotspot-compiler-dev
mailing list