src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/OpaqueDirectiveTest.java
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 52910 583fd71c47d6
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
     1 /*
     1 /*
     2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   136     protected HighTierContext getDefaultHighTierContext() {
   136     protected HighTierContext getDefaultHighTierContext() {
   137         return new HighTierContext(getProviders(), getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL.remove(Optimization.RemoveNeverExecutedCode));
   137         return new HighTierContext(getProviders(), getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL.remove(Optimization.RemoveNeverExecutedCode));
   138     }
   138     }
   139 
   139 
   140     @Override
   140     @Override
   141     protected boolean checkLowTierGraph(StructuredGraph graph) {
   141     protected void checkLowTierGraph(StructuredGraph graph) {
   142         OpaqueSnippet snippet = graph.method().getAnnotation(OpaqueSnippet.class);
   142         OpaqueSnippet snippet = graph.method().getAnnotation(OpaqueSnippet.class);
   143         for (ReturnNode returnNode : graph.getNodes(ReturnNode.TYPE)) {
   143         for (ReturnNode returnNode : graph.getNodes(ReturnNode.TYPE)) {
   144             Assert.assertEquals(snippet.expectedReturnNode(), returnNode.result().getClass());
   144             Assert.assertEquals(snippet.expectedReturnNode(), returnNode.result().getClass());
   145         }
   145         }
   146         return true;
       
   147     }
   146     }
   148 }
   147 }