# HG changeset patch # User Thomas Wuerthinger # Date 1376743732 -7200 # Node ID b3ddfc832f514c2ee62de5c927864bb9e5ff7631 # Parent 4b3a6662deb1e1934c500cb5f703871f8c72b361# Parent 75d9b7aedcfdc7364250d1c8f932651923503af9 Merge. diff -r 4b3a6662deb1 -r b3ddfc832f51 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCache.java --- 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; diff -r 4b3a6662deb1 -r b3ddfc832f51 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/FrameDescriptor.java --- 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++) { diff -r 4b3a6662deb1 -r b3ddfc832f51 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/FrameFactory.java --- 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); - } diff -r 4b3a6662deb1 -r b3ddfc832f51 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/InlinableCallSite.java --- 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); } diff -r 4b3a6662deb1 -r b3ddfc832f51 graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/InlinedCallSite.java --- 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(); }