130 public void test() { |
130 public void test() { |
131 ResolvedJavaMethod testMethod = getResolvedJavaMethod(PEGraphDecoderTest.class, "doTest", Object.class); |
131 ResolvedJavaMethod testMethod = getResolvedJavaMethod(PEGraphDecoderTest.class, "doTest", Object.class); |
132 StructuredGraph targetGraph = null; |
132 StructuredGraph targetGraph = null; |
133 DebugContext debug = getDebugContext(); |
133 DebugContext debug = getDebugContext(); |
134 try (DebugContext.Scope scope = debug.scope("GraphPETest", testMethod)) { |
134 try (DebugContext.Scope scope = debug.scope("GraphPETest", testMethod)) { |
135 GraphBuilderConfiguration graphBuilderConfig = GraphBuilderConfiguration.getDefault(getDefaultGraphBuilderPlugins()).withEagerResolving(true); |
135 GraphBuilderConfiguration graphBuilderConfig = GraphBuilderConfiguration.getDefault(getDefaultGraphBuilderPlugins()).withEagerResolving(true).withUnresolvedIsError(true); |
136 registerPlugins(graphBuilderConfig.getPlugins().getInvocationPlugins()); |
136 registerPlugins(graphBuilderConfig.getPlugins().getInvocationPlugins()); |
137 targetGraph = new StructuredGraph.Builder(getInitialOptions(), debug, AllowAssumptions.YES).method(testMethod).build(); |
137 targetGraph = new StructuredGraph.Builder(getInitialOptions(), debug, AllowAssumptions.YES).method(testMethod).build(); |
138 CachingPEGraphDecoder decoder = new CachingPEGraphDecoder(getTarget().arch, targetGraph, getProviders(), graphBuilderConfig, OptimisticOptimizations.NONE, AllowAssumptions.YES, |
138 CachingPEGraphDecoder decoder = new CachingPEGraphDecoder(getTarget().arch, targetGraph, getProviders(), graphBuilderConfig, OptimisticOptimizations.NONE, AllowAssumptions.YES, |
139 null, null, new InlineInvokePlugin[]{new InlineAll()}, null, null); |
139 null, null, new InlineInvokePlugin[]{new InlineAll()}, null, null, null); |
140 |
140 |
141 decoder.decode(testMethod); |
141 decoder.decode(testMethod); |
142 debug.dump(DebugContext.BASIC_LEVEL, targetGraph, "Target Graph"); |
142 debug.dump(DebugContext.BASIC_LEVEL, targetGraph, "Target Graph"); |
143 targetGraph.verify(); |
143 targetGraph.verify(); |
144 |
144 |