src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java

Print this page




 199                         assert destroyedCallerRegisters != null;
 200                         // Add a GeneratePIC check here later, we don't want to install
 201                         // code if we don't have a corresponding VM global symbol.
 202                         HotSpotCompiledCode compiledCode = HotSpotCompiledCodeBuilder.createCompiledCode(codeCache, null, null, compResult);
 203                         code = codeCache.installCode(null, compiledCode, null, null, false);
 204                     } catch (Throwable e) {
 205                         throw debug.handle(e);
 206                     }
 207                 } catch (Throwable e) {
 208                     throw debug.handle(e);
 209                 }
 210                 assert code != null : "error installing stub " + this;
 211             }
 212         }
 213 
 214         return code;
 215     }
 216 
 217     @SuppressWarnings("try")
 218     private CompilationResult buildCompilationResult(DebugContext debug, final Backend backend) {
 219         CompilationResult compResult = new CompilationResult(toString(), GeneratePIC.getValue(options));
 220         final StructuredGraph graph = getGraph(debug, getStubCompilationId());

 221 
 222         // Stubs cannot be recompiled so they cannot be compiled with assumptions
 223         assert graph.getAssumptions() == null;
 224 
 225         if (!(graph.start() instanceof StubStartNode)) {
 226             StubStartNode newStart = graph.add(new StubStartNode(Stub.this));
 227             newStart.setStateAfter(graph.start().stateAfter());
 228             graph.replaceFixed(graph.start(), newStart);
 229         }
 230 
 231         try (DebugContext.Scope s0 = debug.scope("StubCompilation", graph, providers.getCodeCache())) {
 232             Suites suites = createSuites();
 233             emitFrontEnd(providers, backend, graph, providers.getSuites().getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL, DefaultProfilingInfo.get(TriState.UNKNOWN), suites);
 234             LIRSuites lirSuites = createLIRSuites();
 235             emitBackEnd(graph, Stub.this, getInstalledCodeOwner(), backend, compResult, CompilationResultBuilderFactory.Default, getRegisterConfig(), lirSuites);
 236             assert checkStubInvariants(compResult);
 237         } catch (Throwable e) {
 238             throw debug.handle(e);
 239         }
 240         return compResult;




 199                         assert destroyedCallerRegisters != null;
 200                         // Add a GeneratePIC check here later, we don't want to install
 201                         // code if we don't have a corresponding VM global symbol.
 202                         HotSpotCompiledCode compiledCode = HotSpotCompiledCodeBuilder.createCompiledCode(codeCache, null, null, compResult);
 203                         code = codeCache.installCode(null, compiledCode, null, null, false);
 204                     } catch (Throwable e) {
 205                         throw debug.handle(e);
 206                     }
 207                 } catch (Throwable e) {
 208                     throw debug.handle(e);
 209                 }
 210                 assert code != null : "error installing stub " + this;
 211             }
 212         }
 213 
 214         return code;
 215     }
 216 
 217     @SuppressWarnings("try")
 218     private CompilationResult buildCompilationResult(DebugContext debug, final Backend backend) {
 219         CompilationIdentifier compilationId = getStubCompilationId();
 220         final StructuredGraph graph = getGraph(debug, compilationId);
 221         CompilationResult compResult = new CompilationResult(compilationId, toString(), GeneratePIC.getValue(options));
 222 
 223         // Stubs cannot be recompiled so they cannot be compiled with assumptions
 224         assert graph.getAssumptions() == null;
 225 
 226         if (!(graph.start() instanceof StubStartNode)) {
 227             StubStartNode newStart = graph.add(new StubStartNode(Stub.this));
 228             newStart.setStateAfter(graph.start().stateAfter());
 229             graph.replaceFixed(graph.start(), newStart);
 230         }
 231 
 232         try (DebugContext.Scope s0 = debug.scope("StubCompilation", graph, providers.getCodeCache())) {
 233             Suites suites = createSuites();
 234             emitFrontEnd(providers, backend, graph, providers.getSuites().getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL, DefaultProfilingInfo.get(TriState.UNKNOWN), suites);
 235             LIRSuites lirSuites = createLIRSuites();
 236             emitBackEnd(graph, Stub.this, getInstalledCodeOwner(), backend, compResult, CompilationResultBuilderFactory.Default, getRegisterConfig(), lirSuites);
 237             assert checkStubInvariants(compResult);
 238         } catch (Throwable e) {
 239             throw debug.handle(e);
 240         }
 241         return compResult;


src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/Stub.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File