changeset 11345:b3ddfc832f51

Merge.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sat, 17 Aug 2013 14:48:52 +0200
parents 4b3a6662deb1 (current diff) 75d9b7aedcfd (diff)
children b4009c075969
files
diffstat 5 files changed, 50 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCache.java	Sat Aug 17 12:25:28 2013 +0200
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCache.java	Sat Aug 17 14:48:52 2013 +0200
@@ -283,9 +283,6 @@
                             return inlineGraph;
                         }
                     });
-                    if (!methodCallTargetNode.isStatic() && ObjectStamp.isObjectAlwaysNull(methodCallTargetNode.receiver())) {
-                        return invoke.next();
-                    }
                     FixedNode fixedNode = (FixedNode) invoke.predecessor();
                     InliningUtil.inline(invoke, inlinedGraph, true);
                     return fixedNode;
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/FrameDescriptor.java	Sat Aug 17 12:25:28 2013 +0200
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/FrameDescriptor.java	Sat Aug 17 14:48:52 2013 +0200
@@ -101,10 +101,6 @@
         return Collections.unmodifiableSet(identifierToSlotMap.keySet());
     }
 
-    /**
-     * (db): this method is used for creating a clone of the {@link FrameDescriptor} object ready
-     * for parallel execution.
-     */
     public FrameDescriptor copy() {
         FrameDescriptor clonedFrameDescriptor = new FrameDescriptor(this.typeConversion);
         for (int i = 0; i < this.getSlots().size(); i++) {
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/FrameFactory.java	Sat Aug 17 12:25:28 2013 +0200
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/FrameFactory.java	Sat Aug 17 14:48:52 2013 +0200
@@ -27,8 +27,18 @@
 import com.oracle.truffle.api.*;
 import com.oracle.truffle.api.frame.*;
 
+/**
+ * Factory for virtual frame creation.
+ */
 public interface FrameFactory {
 
+    /**
+     * Creates a new virtual frame from the given frame descriptor and arguments.
+     * 
+     * @param descriptor describes the frame to be created
+     * @param caller the packed caller frame or {@code null}
+     * @param args {@link Arguments} object to be stored in the frame
+     * @return a new virtual frame
+     */
     VirtualFrame create(FrameDescriptor descriptor, PackedFrame caller, Arguments args);
-
 }
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/InlinableCallSite.java	Sat Aug 17 12:25:28 2013 +0200
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/InlinableCallSite.java	Sat Aug 17 14:48:52 2013 +0200
@@ -26,15 +26,44 @@
 
 import com.oracle.truffle.api.*;
 
+/**
+ * Denotes a call node that can inline the tree of its associated call target.
+ * 
+ * @see InlinedCallSite
+ */
 public interface InlinableCallSite {
 
+    /**
+     * Returns the number of calls since the last reset of the call count.
+     * 
+     * @return the current call count.
+     */
     int getCallCount();
 
+    /**
+     * Resets the call count to 0.
+     */
     void resetCallCount();
 
+    /**
+     * Returns the tree that would be inlined by a call to {@link #inline(FrameFactory)}.
+     * 
+     * @return the node tree to be inlined.
+     */
     Node getInlineTree();
 
+    /**
+     * Returns the call target associated with this call site.
+     * 
+     * @return the inlinable {@link CallTarget}.
+     */
     CallTarget getCallTarget();
 
+    /**
+     * Instructs the call node to inline the associated call target.
+     * 
+     * @param factory Frame factory for creating new virtual frames for inlined calls.
+     * @return {@code true} if call target was inlined; {@code false} otherwise.
+     */
     boolean inline(FrameFactory factory);
 }
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/InlinedCallSite.java	Sat Aug 17 12:25:28 2013 +0200
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/InlinedCallSite.java	Sat Aug 17 14:48:52 2013 +0200
@@ -26,7 +26,17 @@
 
 import com.oracle.truffle.api.*;
 
+/**
+ * Denotes a call node with an inlined call target. Allows for recursive call detection.
+ * 
+ * @see InlinableCallSite
+ */
 public interface InlinedCallSite {
 
+    /**
+     * Returns the call target that has been inlined at this call site.
+     * 
+     * @return the inlined call target.
+     */
     CallTarget getCallTarget();
 }