91 |
91 |
92 private void test(String name, int expectedResolves, int expectedStubCalls) { |
92 private void test(String name, int expectedResolves, int expectedStubCalls) { |
93 StructuredGraph graph = parseEager(name, AllowAssumptions.NO, new OptionValues(getInitialOptions(), GraalOptions.GeneratePIC, true)); |
93 StructuredGraph graph = parseEager(name, AllowAssumptions.NO, new OptionValues(getInitialOptions(), GraalOptions.GeneratePIC, true)); |
94 MidTierContext midTierContext = new MidTierContext(getProviders(), getTargetProvider(), OptimisticOptimizations.ALL, graph.getProfilingInfo()); |
94 MidTierContext midTierContext = new MidTierContext(getProviders(), getTargetProvider(), OptimisticOptimizations.ALL, graph.getProfilingInfo()); |
95 |
95 |
96 CanonicalizerPhase canonicalizer = new CanonicalizerPhase(); |
96 CanonicalizerPhase canonicalizer = createCanonicalizerPhase(); |
97 Assert.assertEquals(expectedResolves, graph.getNodes().filter(ResolveDynamicConstantNode.class).count()); |
97 Assert.assertEquals(expectedResolves, graph.getNodes().filter(ResolveDynamicConstantNode.class).count()); |
98 Assert.assertEquals(0, graph.getNodes().filter(ResolveDynamicStubCall.class).count()); |
98 Assert.assertEquals(0, graph.getNodes().filter(ResolveDynamicStubCall.class).count()); |
99 CoreProviders context = getProviders(); |
99 CoreProviders context = getProviders(); |
100 new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context); |
100 new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context); |
101 new GuardLoweringPhase().apply(graph, midTierContext); |
101 new GuardLoweringPhase().apply(graph, midTierContext); |