Mercurial > hg > truffle
comparison graal/com.oracle.graal.java.decompiler.test/src/com/oracle/graal/java/decompiler/test/TestUtil.java @ 12362:f53dc8bbb88c
refactored isReexecutable(), getKilledLocations() and canDeoptimize() out of MetaAccessProvider into ForeignCallsProvider (GRAAL-511)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sat, 12 Oct 2013 00:31:37 +0200 |
parents | bba234a1670e |
children | 1a4dc163cd0a |
comparison
equal
deleted
inserted
replaced
12361:ec57cc36371e | 12362:f53dc8bbb88c |
---|---|
41 | 41 |
42 public static void compileMethod(ResolvedJavaMethod method) { | 42 public static void compileMethod(ResolvedJavaMethod method) { |
43 Providers providers = GraalCompiler.getGraalProviders(); | 43 Providers providers = GraalCompiler.getGraalProviders(); |
44 Suites suites = Graal.getRequiredCapability(SuitesProvider.class).createSuites(); | 44 Suites suites = Graal.getRequiredCapability(SuitesProvider.class).createSuites(); |
45 StructuredGraph graph = new StructuredGraph(method); | 45 StructuredGraph graph = new StructuredGraph(method); |
46 new GraphBuilderPhase(providers.getMetaAccess(), GraphBuilderConfiguration.getEagerDefault(), OptimisticOptimizations.ALL).apply(graph); | 46 MetaAccessProvider metaAccess = providers.getMetaAccess(); |
47 ForeignCallsProvider foreignCalls = providers.getForeignCalls(); | |
48 new GraphBuilderPhase(metaAccess, foreignCalls, GraphBuilderConfiguration.getEagerDefault(), OptimisticOptimizations.ALL).apply(graph); | |
47 PhasePlan phasePlan = new PhasePlan(); | 49 PhasePlan phasePlan = new PhasePlan(); |
48 GraphBuilderPhase graphBuilderPhase = new GraphBuilderPhase(providers.getMetaAccess(), GraphBuilderConfiguration.getDefault(), OptimisticOptimizations.ALL); | 50 GraphBuilderPhase graphBuilderPhase = new GraphBuilderPhase(metaAccess, foreignCalls, GraphBuilderConfiguration.getDefault(), OptimisticOptimizations.ALL); |
49 phasePlan.addPhase(PhasePosition.AFTER_PARSING, graphBuilderPhase); | 51 phasePlan.addPhase(PhasePosition.AFTER_PARSING, graphBuilderPhase); |
50 CallingConvention cc = getCallingConvention(providers.getCodeCache(), Type.JavaCallee, graph.method(), false); | 52 CallingConvention cc = getCallingConvention(providers.getCodeCache(), Type.JavaCallee, graph.method(), false); |
51 Backend backend = Graal.getRequiredCapability(Backend.class); | 53 Backend backend = Graal.getRequiredCapability(Backend.class); |
52 GraalCompiler.compileGraph(graph, cc, method, providers, backend, providers.getCodeCache().getTarget(), null, phasePlan, OptimisticOptimizations.ALL, new SpeculationLog(), suites, | 54 GraalCompiler.compileGraph(graph, cc, method, providers, backend, providers.getCodeCache().getTarget(), null, phasePlan, OptimisticOptimizations.ALL, new SpeculationLog(), suites, |
53 new CompilationResult()); | 55 new CompilationResult()); |