src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ReplacementsParseTest.java
changeset 58877 aec7bf35d6f5
parent 58299 6df94ce3ab2f
equal deleted inserted replaced
58876:1a8d65e71a66 58877:aec7bf35d6f5
   316     }
   316     }
   317 
   317 
   318     @Override
   318     @Override
   319     protected void registerInvocationPlugins(InvocationPlugins invocationPlugins) {
   319     protected void registerInvocationPlugins(InvocationPlugins invocationPlugins) {
   320         BytecodeProvider replacementBytecodeProvider = getSystemClassLoaderBytecodeProvider();
   320         BytecodeProvider replacementBytecodeProvider = getSystemClassLoaderBytecodeProvider();
   321         Registration r = new Registration(invocationPlugins, TestObject.class, replacementBytecodeProvider);
   321         Registration r = new Registration(invocationPlugins, TestObject.class, getReplacements(), replacementBytecodeProvider);
   322         NodeIntrinsicPluginFactory.InjectionProvider injections = new DummyInjectionProvider();
   322         NodeIntrinsicPluginFactory.InjectionProvider injections = new DummyInjectionProvider();
   323         new PluginFactory_ReplacementsParseTest().registerPlugins(invocationPlugins, injections);
   323         new PluginFactory_ReplacementsParseTest().registerPlugins(invocationPlugins, injections);
   324         r.registerMethodSubstitution(TestObjectSubstitutions.class, "nextAfter", double.class, double.class);
   324         r.registerMethodSubstitution(TestObjectSubstitutions.class, "nextAfter", double.class, double.class);
   325         r.registerMethodSubstitution(TestObjectSubstitutions.class, "stringize", Object.class);
   325         r.registerMethodSubstitution(TestObjectSubstitutions.class, "stringize", Object.class);
   326         r.registerMethodSubstitution(TestObjectSubstitutions.class, "stringizeId", Receiver.class);
   326         r.registerMethodSubstitution(TestObjectSubstitutions.class, "stringizeId", Receiver.class);
   632         try (DebugContext.Scope s0 = graph.getDebug().scope(name, graph)) {
   632         try (DebugContext.Scope s0 = graph.getDebug().scope(name, graph)) {
   633             for (OpaqueNode node : graph.getNodes().filter(OpaqueNode.class)) {
   633             for (OpaqueNode node : graph.getNodes().filter(OpaqueNode.class)) {
   634                 node.remove();
   634                 node.remove();
   635             }
   635             }
   636             HighTierContext context = getDefaultHighTierContext();
   636             HighTierContext context = getDefaultHighTierContext();
   637             CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
   637             CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
   638             new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
   638             new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
   639             new FloatingReadPhase().apply(graph);
   639             new FloatingReadPhase().apply(graph);
   640             canonicalizer.apply(graph, context);
   640             canonicalizer.apply(graph, context);
   641             new DeadCodeEliminationPhase().apply(graph);
   641             new DeadCodeEliminationPhase().apply(graph);
   642             new GuardLoweringPhase().apply(graph, getDefaultMidTierContext());
   642             new GuardLoweringPhase().apply(graph, getDefaultMidTierContext());