< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CheckGraalInvariants.java

Print this page
rev 52509 : [mq]: graal2


 164                 // @formatter:on
 165                 if (className.equals("org.graalvm.compiler.serviceprovider.GraalServices$Lazy")) {
 166                     return false;
 167                 }
 168             }
 169             return true;
 170         }
 171 
 172         protected void handleClassLoadingException(Throwable t) {
 173             GraalError.shouldNotReachHere(t);
 174         }
 175 
 176         protected void handleParsingException(Throwable t) {
 177             GraalError.shouldNotReachHere(t);
 178         }
 179     }
 180 
 181     @Test
 182     @SuppressWarnings("try")
 183     public void test() {

 184         runTest(new InvariantsTool());
 185     }
 186 
 187     @SuppressWarnings("try")
 188     public static void runTest(InvariantsTool tool) {
 189         RuntimeProvider rt = Graal.getRequiredCapability(RuntimeProvider.class);
 190         Providers providers = rt.getHostBackend().getProviders();
 191         MetaAccessProvider metaAccess = providers.getMetaAccess();
 192 
 193         PhaseSuite<HighTierContext> graphBuilderSuite = new PhaseSuite<>();
 194         Plugins plugins = new Plugins(new InvocationPlugins());
 195         GraphBuilderConfiguration config = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true).withUnresolvedIsError(true);
 196         graphBuilderSuite.appendPhase(new GraphBuilderPhase(config));
 197         HighTierContext context = new HighTierContext(providers, graphBuilderSuite, OptimisticOptimizations.NONE);
 198 
 199         Assume.assumeTrue(VerifyPhase.class.desiredAssertionStatus());
 200 
 201         String bootclasspath = tool.getClassPath();
 202         Assert.assertNotNull("Cannot find boot class path", bootclasspath);
 203 




 164                 // @formatter:on
 165                 if (className.equals("org.graalvm.compiler.serviceprovider.GraalServices$Lazy")) {
 166                     return false;
 167                 }
 168             }
 169             return true;
 170         }
 171 
 172         protected void handleClassLoadingException(Throwable t) {
 173             GraalError.shouldNotReachHere(t);
 174         }
 175 
 176         protected void handleParsingException(Throwable t) {
 177             GraalError.shouldNotReachHere(t);
 178         }
 179     }
 180 
 181     @Test
 182     @SuppressWarnings("try")
 183     public void test() {
 184         assumeManagementLibraryIsLoadable();
 185         runTest(new InvariantsTool());
 186     }
 187 
 188     @SuppressWarnings("try")
 189     public static void runTest(InvariantsTool tool) {
 190         RuntimeProvider rt = Graal.getRequiredCapability(RuntimeProvider.class);
 191         Providers providers = rt.getHostBackend().getProviders();
 192         MetaAccessProvider metaAccess = providers.getMetaAccess();
 193 
 194         PhaseSuite<HighTierContext> graphBuilderSuite = new PhaseSuite<>();
 195         Plugins plugins = new Plugins(new InvocationPlugins());
 196         GraphBuilderConfiguration config = GraphBuilderConfiguration.getDefault(plugins).withEagerResolving(true).withUnresolvedIsError(true);
 197         graphBuilderSuite.appendPhase(new GraphBuilderPhase(config));
 198         HighTierContext context = new HighTierContext(providers, graphBuilderSuite, OptimisticOptimizations.NONE);
 199 
 200         Assume.assumeTrue(VerifyPhase.class.desiredAssertionStatus());
 201 
 202         String bootclasspath = tool.getClassPath();
 203         Assert.assertNotNull("Cannot find boot class path", bootclasspath);
 204 


< prev index next >