Skip to content

Commit 2da6777

Browse files
committed
8281122: [IR Framework] Cleanup IR matching code in preparation for JDK-8280378
Reviewed-by: thartmann, kvn
1 parent d0eb6fa commit 2da6777

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2739
-752
lines changed

test/hotspot/jtreg/compiler/lib/ir_framework/IR.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
2323

2424
package compiler.lib.ir_framework;
2525

26-
import compiler.lib.ir_framework.driver.IRViolationException;
26+
import compiler.lib.ir_framework.driver.irmatching.IRViolationException;
2727

2828
import java.lang.annotation.Repeatable;
2929
import java.lang.annotation.Retention;
@@ -58,8 +58,8 @@
5858
* If the specified preconditions fail, then the framework does not apply the IR rule. These preconditions can be
5959
* set with {@link #applyIf()}, {@link #applyIfNot()}, {@link #applyIfAnd()}, or {@link #applyIfOr()}.
6060
* <p>
61-
* Examples on how to write tests with IR rules can be found in {@link jdk.test.lib.hotspot.ir_framework.examples.IRExample}
62-
* and also as part of the internal testing in {@link jdk.test.lib.hotspot.ir_framework.tests.TestIRMatching}.
61+
* Examples on how to write tests with IR rules can be found in {@link ir_framework.examples.IRExample}
62+
* and also as part of the internal testing in {@link ir_framework.tests.TestIRMatching}.
6363
*
6464
* @see Test
6565
* @see IRNode

test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
package compiler.lib.ir_framework;
2525

26-
import compiler.lib.ir_framework.driver.IRMatcher;
26+
import compiler.lib.ir_framework.driver.irmatching.IRMatcher;
2727
import compiler.lib.ir_framework.shared.*;
2828
import jdk.test.lib.Platform;
2929
import sun.hotspot.WhiteBox;

test/hotspot/jtreg/compiler/lib/ir_framework/TestFramework.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,8 @@
2424
package compiler.lib.ir_framework;
2525

2626
import compiler.lib.ir_framework.driver.*;
27+
import compiler.lib.ir_framework.driver.irmatching.IRMatcher;
28+
import compiler.lib.ir_framework.driver.irmatching.IRViolationException;
2729
import compiler.lib.ir_framework.shared.*;
2830
import compiler.lib.ir_framework.test.*;
2931
import jdk.test.lib.Platform;
@@ -603,11 +605,11 @@ private void reportScenarioFailures(Map<Scenario, Exception> exceptionMap) {
603605
// Print stack trace otherwise
604606
StringWriter errors = new StringWriter();
605607
e.printStackTrace(new PrintWriter(errors));
606-
builder.append(errors.toString());
608+
builder.append(errors);
607609
}
608610
builder.append(System.lineSeparator());
609611
}
610-
System.err.println(builder.toString());
612+
System.err.println(builder);
611613
if (!VERBOSE && !REPORT_STDOUT && !TESTLIST && !EXCLUDELIST) {
612614
// Provide a hint to the user how to get additional output/debugging information.
613615
System.err.println(RERUN_HINT);

0 commit comments

Comments
 (0)