diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/CallNode.java @ 15089:448338c9ce96

Truffle: Made inlining context-insensitive again to reduce complexity.
author Christian Humer <christian.humer@gmail.com>
date Mon, 14 Apr 2014 18:25:23 +0200
parents f675818d9ad0
children 07e7aae05983
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/CallNode.java	Mon Apr 14 18:20:09 2014 +0200
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/CallNode.java	Mon Apr 14 18:25:23 2014 +0200
@@ -25,8 +25,6 @@
 package com.oracle.truffle.api.nodes;
 
 import com.oracle.truffle.api.*;
-import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
-import com.oracle.truffle.api.frame.FrameInstance.FrameAccess;
 import com.oracle.truffle.api.frame.*;
 
 /**
@@ -40,7 +38,7 @@
  * Please note: This class is not intended to be subclassed by guest language implementations.
  *
  * @see TruffleRuntime#createCallNode(CallTarget)
- * @see #inline()
+ * @see #forceInlining()
  * @see #split()
  */
 public abstract class CallNode extends Node {
@@ -79,19 +77,28 @@
     public abstract boolean isInlinable();
 
     /**
-     * Returns <code>true</code> if the {@link CallTarget} in this {@link CallNode} is inlined. A
-     * {@link CallNode} can either be inlined manually by invoking {@link #inline()} or by the
-     * runtime system which may at any point decide to inline.
+     * Returns <code>true</code> if the {@link CallTarget} is forced to be inlined. A
+     * {@link CallNode} can either be inlined manually by invoking {@link #forceInlining()} or by
+     * the runtime system which may at any point decide to inline.
      *
      * @return true if this method was inlined else false.
      */
-    public abstract boolean isInlined();
+    public abstract boolean isInliningForced();
 
     /**
      * Enforces the runtime system to inline the {@link CallTarget} at this call site. If the
      * runtime system does not support inlining or it is already inlined this method has no effect.
      */
-    public abstract void inline();
+    public abstract void forceInlining();
+
+    /**
+     * Returns true if the runtime system has decided to inline this call-site. If the
+     * {@link CallNode} was forced to inline then this does not necessarily mean that the
+     * {@link CallNode} is really going to be inlined. This depends on whether or not the runtime
+     * system supports inlining or not. The runtime system may also decide to ignore calls to
+     * {@link #forceInlining()}.
+     */
+    public abstract boolean isInlined();
 
     /**
      * Returns <code>true</code> if this {@link CallNode} can be split. A {@link CallNode} can only