RFR: 8332394: Add friendly output when @IR rule missing value [v2]
Christian Hagedorn
chagedorn at openjdk.org
Fri May 17 07:36:06 UTC 2024
On Thu, 16 May 2024 16:04:59 GMT, Hamlin Li <mli at openjdk.org> wrote:
>> 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`
Thanks!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19270#discussion_r1604478783
More information about the hotspot-compiler-dev
mailing list