changeset 17074:899dd861f081

Update comment about usages of streams
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Tue, 09 Sep 2014 12:14:23 +0200
parents 1d69b5c58bfe
children c24ea91c30ba
files graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/FixedNodeProbabilityCache.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/FixedNodeProbabilityCache.java	Tue Sep 09 11:53:53 2014 +0200
+++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/FixedNodeProbabilityCache.java	Tue Sep 09 12:14:23 2014 +0200
@@ -104,7 +104,11 @@
             if (current instanceof MergeNode) {
                 MergeNode currentMerge = (MergeNode) current;
                 NodeInputList<AbstractEndNode> currentForwardEnds = currentMerge.forwardEnds();
-                // Using simple iteration instead of lambda as the lambda blows up the stack
+                /*
+                 * Use simple iteration instead of streams, since the stream infrastructure adds
+                 * many frames which causes the recursion to overflow the stack earlier than it
+                 * would otherwise.
+                 */
                 for (AbstractEndNode endNode : currentForwardEnds) {
                     probability += applyAsDouble(endNode);
                 }