예제 #1
0
 public final void compile() {
   if (!isCompiling()) {
     ensureCloned();
     runtime.compile(
         this,
         TruffleBackgroundCompilation.getValue()
             && !TruffleCompilationExceptionsAreThrown.getValue());
   }
 }
예제 #2
0
 public OptimizedCallTarget cloneUninitialized() {
   ensureCloned();
   RootNode copiedRoot = cloneRootNode(uninitializedRootNode);
   if (copiedRoot == null) {
     return null;
   }
   OptimizedCallTarget splitTarget =
       (OptimizedCallTarget) runtime.createClonedCallTarget(this, copiedRoot);
   splitTarget.cloneIndex = cloneIndex++;
   return splitTarget;
 }
예제 #3
0
 private void interpreterCall() {
   if (isValid()) {
     // Stubs were deoptimized => reinstall.
     this.runtime.reinstallStubs();
   } else {
     if (uninitializedRootNode == UNINITIALIZED) {
       ensureCloned();
     }
     compilationProfile.reportInterpreterCall();
     if (!isCompiling()
         && compilationPolicy.shouldCompile(compilationProfile, getCompilerOptions())) {
       compile();
     }
   }
 }