RFR: 8332394: Add friendly output when @IR rule missing value [v2]

Hamlin Li mli at openjdk.org
Thu May 16 16:09:28 UTC 2024


On Thu, 16 May 2024 14:26:24 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   add more information in output
>
> test/hotspot/jtreg/compiler/lib/ir_framework/test/IREncodingPrinter.java line 293:
> 
>> 291:             String platform = andRules[i].trim();
>> 292:             i++;
>> 293:             TestFormat.check(i < andRules.length, "Missing value for platform " + platform + failAt());
> 
> I suggest to also add the `ruleType` as in `hasAllRequiredFlags()`, for example. Then it is even more precise. For even more readability you could add some `""`:
> Current:
> 
>  Missing value for platform xyz in @IR rule 1 at foo()
> 
> vs.
> Improved:
> 
>  Missing value for platform "xyz" in @IR rule 1 in "applyIfPlatform" at foo()

Thanks, it makes sense.

I also created https://bugs.openjdk.org/browse/JDK-8332402 to track adding tests in `TestBadFormat`

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19270#discussion_r1603656946


More information about the hotspot-compiler-dev mailing list