|
30 | 30 | import static jdk.graal.compiler.replacements.SnippetTemplate.DEFAULT_REPLACER;
|
31 | 31 |
|
32 | 32 | import jdk.graal.compiler.api.replacements.Snippet;
|
33 |
| -import jdk.graal.compiler.api.replacements.Snippet.ConstantParameter; |
34 | 33 | import jdk.graal.compiler.core.common.spi.ForeignCallDescriptor;
|
35 | 34 | import jdk.graal.compiler.core.common.type.StampFactory;
|
36 | 35 | import jdk.graal.compiler.graph.Node.ConstantNodeParameter;
|
|
54 | 53 | public class AssertionSnippets implements Snippets {
|
55 | 54 |
|
56 | 55 | @Snippet
|
57 |
| - public static void assertion(boolean condition, @ConstantParameter Word message, long l1, long l2) { |
| 56 | + public static void assertion(boolean condition, Word message, long l1, long l2) { |
58 | 57 | if (injectBranchProbability(SLOWPATH_PROBABILITY, !condition)) {
|
59 | 58 | vmMessageC(VM_MESSAGE_C, true, message, l1, l2, 0L);
|
60 | 59 | }
|
61 | 60 | }
|
62 | 61 |
|
63 | 62 | @Snippet
|
64 |
| - public static void stubAssertion(boolean condition, @ConstantParameter Word message, long l1, long l2) { |
| 63 | + public static void stubAssertion(boolean condition, Word message, long l1, long l2) { |
65 | 64 | if (injectBranchProbability(SLOWPATH_PROBABILITY, !condition)) {
|
66 | 65 | vmMessageStub(VM_MESSAGE_C, true, message, l1, l2, 0L);
|
67 | 66 | }
|
@@ -90,7 +89,7 @@ public void lower(AssertionNode assertionNode, LoweringTool tool) {
|
90 | 89 | StructuredGraph graph = assertionNode.graph();
|
91 | 90 | Arguments args = new Arguments(graph.start() instanceof StubStartNode ? stubAssertion : assertion, graph.getGuardsStage(), tool.getLoweringStage());
|
92 | 91 | args.add("condition", assertionNode.condition());
|
93 |
| - args.addConst("message", |
| 92 | + args.add("message", |
94 | 93 | graph.unique(new ConstantNode(new CStringConstant("failed runtime assertion in snippet/stub: " + assertionNode.message() + " (" + graph.method() + ")"),
|
95 | 94 | StampFactory.pointer())));
|
96 | 95 | args.add("l1", assertionNode.getL1());
|
|
0 commit comments