Mercurial > hg > graal-compiler
changeset 23167:e1dcae68639a
Remove DispatchBeginNode.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sun, 13 Dec 2015 15:58:04 +0100 |
parents | 16e7baf4fd2d |
children | 2ad910b35d66 |
files | graal/com.oracle.graal.java/src/com/oracle/graal/java/BytecodeParser.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/DispatchBeginNode.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/ExceptionObjectNode.java |
diffstat | 3 files changed, 9 insertions(+), 55 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.java/src/com/oracle/graal/java/BytecodeParser.java Sun Dec 13 13:58:46 2015 +0100 +++ b/graal/com.oracle.graal.java/src/com/oracle/graal/java/BytecodeParser.java Sun Dec 13 15:58:04 2015 +0100 @@ -324,7 +324,6 @@ import com.oracle.graal.nodes.ConstantNode; import com.oracle.graal.nodes.ControlSplitNode; import com.oracle.graal.nodes.DeoptimizeNode; -import com.oracle.graal.nodes.DispatchBeginNode; import com.oracle.graal.nodes.EndNode; import com.oracle.graal.nodes.EntryMarkerNode; import com.oracle.graal.nodes.EntryProxyNode; @@ -1222,24 +1221,24 @@ append(new DeoptimizeNode(InvalidateRecompile, Unresolved)); } - private DispatchBeginNode handleException(ValueNode exceptionObject, int bci) { + private AbstractBeginNode handleException(ValueNode exceptionObject, int bci) { assert bci == BytecodeFrame.BEFORE_BCI || bci == bci() : "invalid bci"; Debug.log("Creating exception dispatch edges at %d, exception object=%s, exception seen=%s", bci, exceptionObject, (profilingInfo == null ? "" : profilingInfo.getExceptionSeen(bci))); FrameStateBuilder dispatchState = frameState.copy(); dispatchState.clearStack(); - DispatchBeginNode dispatchBegin; + AbstractBeginNode dispatchBegin; if (exceptionObject == null) { - dispatchBegin = graph.add(new ExceptionObjectNode(metaAccess)); + ExceptionObjectNode newExceptionObject = graph.add(new ExceptionObjectNode(metaAccess)); + dispatchBegin = newExceptionObject; dispatchState.push(JavaKind.Object, dispatchBegin); dispatchState.setRethrowException(true); - dispatchBegin.setStateAfter(dispatchState.create(bci, dispatchBegin)); + newExceptionObject.setStateAfter(dispatchState.create(bci, newExceptionObject)); } else { - dispatchBegin = graph.add(new DispatchBeginNode()); + dispatchBegin = graph.add(new BeginNode()); dispatchState.push(JavaKind.Object, exceptionObject); dispatchState.setRethrowException(true); - dispatchBegin.setStateAfter(dispatchState.create(bci, dispatchBegin)); } this.controlFlowSplit = true; FixedWithNextNode finishedDispatch = finishInstruction(dispatchBegin, dispatchState); @@ -1917,7 +1916,7 @@ frameState.clearNonLiveLocals(currentBlock, liveness, false); } - DispatchBeginNode exceptionEdge = handleException(null, bci()); + AbstractBeginNode exceptionEdge = handleException(null, bci()); InvokeWithExceptionNode invoke = append(new InvokeWithExceptionNode(callTarget, exceptionEdge, bci())); frameState.pushReturn(resultType, invoke); invoke.setStateAfter(createFrameState(stream.nextBCI(), invoke));
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/DispatchBeginNode.java Sun Dec 13 13:58:46 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012, 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.nodes; - -import com.oracle.graal.compiler.common.type.Stamp; -import com.oracle.graal.graph.NodeClass; -import com.oracle.graal.nodeinfo.NodeInfo; - -/** - * The entry node of an exception dispatcher block. - */ -@NodeInfo -public class DispatchBeginNode extends BeginStateSplitNode { - - public static final NodeClass<DispatchBeginNode> TYPE = NodeClass.create(DispatchBeginNode.class); - - public DispatchBeginNode() { - super(TYPE); - } - - protected DispatchBeginNode(NodeClass<? extends DispatchBeginNode> c, Stamp stamp) { - super(c, stamp); - } - -}
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/ExceptionObjectNode.java Sun Dec 13 13:58:46 2015 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/ExceptionObjectNode.java Sun Dec 13 15:58:04 2015 +0100 @@ -30,7 +30,7 @@ import com.oracle.graal.nodeinfo.InputType; import com.oracle.graal.nodeinfo.NodeInfo; import com.oracle.graal.nodes.AbstractBeginNode; -import com.oracle.graal.nodes.DispatchBeginNode; +import com.oracle.graal.nodes.BeginStateSplitNode; import com.oracle.graal.nodes.InvokeWithExceptionNode; import com.oracle.graal.nodes.KillingBeginNode; import com.oracle.graal.nodes.StructuredGraph; @@ -43,7 +43,7 @@ * throw instruction or implicit exception). */ @NodeInfo(allowedUsageTypes = {InputType.Memory}) -public final class ExceptionObjectNode extends DispatchBeginNode implements Lowerable, MemoryCheckpoint.Single { +public final class ExceptionObjectNode extends BeginStateSplitNode implements Lowerable, MemoryCheckpoint.Single { public static final NodeClass<ExceptionObjectNode> TYPE = NodeClass.create(ExceptionObjectNode.class); public ExceptionObjectNode(MetaAccessProvider metaAccess) {