< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DeoptimizeOnIntegerExactTest.java

Print this page




 117     }
 118 
 119     @Test
 120     public void testIncrementExact() throws InvalidInstalledCodeException {
 121         testAgainIfDeopt("testIncrementExactSnippet", Integer.MAX_VALUE, 1);
 122     }
 123 
 124     @Test
 125     public void testDecrementExact() throws InvalidInstalledCodeException {
 126         testAgainIfDeopt("testDecrementExactSnippet", Integer.MIN_VALUE, 1);
 127     }
 128 
 129     @Override
 130     protected SpeculationLog getSpeculationLog() {
 131         speculationLog.collectFailedSpeculations();
 132         return speculationLog;
 133     }
 134 
 135     @Override
 136     protected InstalledCode addMethod(DebugContext debug, final ResolvedJavaMethod method, final CompilationResult compilationResult) {
 137         return getBackend().createInstalledCode(debug, method, compilationResult, speculationLog, null, false);

 138     }
 139 }


 117     }
 118 
 119     @Test
 120     public void testIncrementExact() throws InvalidInstalledCodeException {
 121         testAgainIfDeopt("testIncrementExactSnippet", Integer.MAX_VALUE, 1);
 122     }
 123 
 124     @Test
 125     public void testDecrementExact() throws InvalidInstalledCodeException {
 126         testAgainIfDeopt("testDecrementExactSnippet", Integer.MIN_VALUE, 1);
 127     }
 128 
 129     @Override
 130     protected SpeculationLog getSpeculationLog() {
 131         speculationLog.collectFailedSpeculations();
 132         return speculationLog;
 133     }
 134 
 135     @Override
 136     protected InstalledCode addMethod(DebugContext debug, final ResolvedJavaMethod method, final CompilationResult compilationResult) {
 137         assert speculationLog == compilationResult.getSpeculationLog();
 138         return getBackend().createInstalledCode(debug, method, compilationResult, null, false);
 139     }
 140 }
< prev index next >