# HG changeset patch # User Doug Simon # Date 1403095561 -7200 # Node ID f3330ba9974c2beb335a7c22884c2fc28aed716e # Parent 17af09bd9e7573f38fe92fa65286419aa1d99cfe remove barrier to escape analysis introduced by d568574e6448 diff -r 17af09bd9e75 -r f3330ba9974c graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Graph.java --- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Graph.java Wed Jun 18 11:57:47 2014 +0200 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Graph.java Wed Jun 18 14:46:01 2014 +0200 @@ -22,8 +22,6 @@ */ package com.oracle.graal.graph; -import static com.oracle.graal.graph.iterators.EmptyNodeIterable.*; - import java.util.*; import com.oracle.graal.compiler.common.*; @@ -535,9 +533,6 @@ * mark}. */ public NodeIterable getNewNodes(Mark mark) { - if (mark.isCurrent()) { - return emptyNodeIterable(); - } final int index = mark.getValue(); return new NodeIterable() { diff -r 17af09bd9e75 -r f3330ba9974c graal/com.oracle.graal.graph/src/com/oracle/graal/graph/iterators/EmptyNodeIterable.java --- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/iterators/EmptyNodeIterable.java Wed Jun 18 11:57:47 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package com.oracle.graal.graph.iterators; - -import java.util.*; - -import com.oracle.graal.graph.*; - -/** - * Provides an immutable {@link NodeIterable} implementation that returns no elements. - */ -public final class EmptyNodeIterable implements NodeIterable { - - /** - * Returns an empty NodeIterable (immutable). - */ - @SuppressWarnings("unchecked") - public static final NodeIterable emptyNodeIterable() { - return EMPTY_LIST; - } - - @SuppressWarnings("rawtypes") private static final NodeIterable EMPTY_LIST = new EmptyNodeIterable(); - - private final Iterator iterator = new Iterator() { - - public void remove() { - throw new UnsupportedOperationException(); - } - - public T next() { - throw new NoSuchElementException(); - } - - public boolean hasNext() { - return false; - } - }; - - /** - * Only {@link #emptyNodeIterable()} should be used. - */ - private EmptyNodeIterable() { - } - - public Iterator iterator() { - return iterator; - } -} \ No newline at end of file diff -r 17af09bd9e75 -r f3330ba9974c graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CanonicalizerPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CanonicalizerPhase.java Wed Jun 18 11:57:47 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CanonicalizerPhase.java Wed Jun 18 14:46:01 2014 +0200 @@ -197,8 +197,10 @@ } } - for (Node newNode : graph.getNewNodes(mark)) { - workList.add(newNode); + if (!mark.isCurrent()) { + for (Node newNode : graph.getNewNodes(mark)) { + workList.add(newNode); + } } } }