changeset 11684:7e661dbea359

Truffle: always expand methods with virtual frame receiver.
author Andreas Woess <andreas.woess@jku.at>
date Tue, 17 Sep 2013 22:03:47 +0200
parents 7aed6a236e0b
children 13b3c8cd5e52
files graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java	Tue Sep 17 14:26:28 2013 -0400
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java	Tue Sep 17 22:03:47 2013 +0200
@@ -138,7 +138,7 @@
                 Debug.dump(graph, "Before inlining");
 
                 // Make sure frame does not escape.
-                expandTree(config, graph, newFrameNode, assumptions);
+                expandTree(graph, assumptions);
 
                 new VerifyFrameDoesNotEscapePhase().apply(graph, false);
 
@@ -200,14 +200,14 @@
         return graph;
     }
 
-    private void expandTree(@SuppressWarnings("unused") GraphBuilderConfiguration config, StructuredGraph graph, @SuppressWarnings("unused") NewFrameNode newFrameNode, Assumptions assumptions) {
+    private void expandTree(StructuredGraph graph, Assumptions assumptions) {
         PhaseContext context = new PhaseContext(metaAccessProvider, assumptions, replacements);
         boolean changed;
         do {
             changed = false;
             for (MethodCallTargetNode methodCallTargetNode : graph.getNodes(MethodCallTargetNode.class)) {
                 InvokeKind kind = methodCallTargetNode.invokeKind();
-                if (kind == InvokeKind.Static || (kind == InvokeKind.Special && methodCallTargetNode.receiver().isConstant())) {
+                if (kind == InvokeKind.Static || (kind == InvokeKind.Special && (methodCallTargetNode.receiver().isConstant() || methodCallTargetNode.receiver() instanceof NewFrameNode))) {
                     if (TruffleInlinePrinter.getValue()) {
                         InlinePrinterProcessor.addInlining(MethodHolder.getNewTruffleExecuteMethod(methodCallTargetNode));
                     }