src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ExceptionObjectNode.java
changeset 58877 aec7bf35d6f5
parent 52910 583fd71c47d6
equal deleted inserted replaced
58876:1a8d65e71a66 58877:aec7bf35d6f5
     1 /*
     1 /*
     2  * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    58     public ExceptionObjectNode(MetaAccessProvider metaAccess) {
    58     public ExceptionObjectNode(MetaAccessProvider metaAccess) {
    59         super(TYPE, StampFactory.objectNonNull(TypeReference.createTrustedWithoutAssumptions(metaAccess.lookupJavaType(Throwable.class))));
    59         super(TYPE, StampFactory.objectNonNull(TypeReference.createTrustedWithoutAssumptions(metaAccess.lookupJavaType(Throwable.class))));
    60     }
    60     }
    61 
    61 
    62     @Override
    62     @Override
    63     public LocationIdentity getLocationIdentity() {
    63     public LocationIdentity getKilledLocationIdentity() {
    64         return LocationIdentity.any();
    64         return LocationIdentity.any();
    65     }
    65     }
    66 
    66 
    67     /**
    67     /**
    68      * An exception handler is an entry point to a method from the runtime and so represents an
    68      * An exception handler is an entry point to a method from the runtime and so represents an
    78         if (graph().getGuardsStage() == StructuredGraph.GuardsStage.FIXED_DEOPTS) {
    78         if (graph().getGuardsStage() == StructuredGraph.GuardsStage.FIXED_DEOPTS) {
    79             /*
    79             /*
    80              * Now the lowering to BeginNode+LoadExceptionNode can be performed, since no more
    80              * Now the lowering to BeginNode+LoadExceptionNode can be performed, since no more
    81              * deopts can float in between the begin node and the load exception node.
    81              * deopts can float in between the begin node and the load exception node.
    82              */
    82              */
    83             LocationIdentity locationsKilledByInvoke = ((InvokeWithExceptionNode) predecessor()).getLocationIdentity();
    83             LocationIdentity locationsKilledByInvoke = ((InvokeWithExceptionNode) predecessor()).getKilledLocationIdentity();
    84             AbstractBeginNode entry = graph().add(KillingBeginNode.create(locationsKilledByInvoke));
    84             AbstractBeginNode entry = graph().add(KillingBeginNode.create(locationsKilledByInvoke));
    85             LoadExceptionObjectNode loadException = graph().add(new LoadExceptionObjectNode(stamp(NodeView.DEFAULT)));
    85             LoadExceptionObjectNode loadException = graph().add(new LoadExceptionObjectNode(stamp(NodeView.DEFAULT)));
    86 
    86 
    87             loadException.setStateAfter(stateAfter());
    87             loadException.setStateAfter(stateAfter());
    88             replaceAtUsages(InputType.Value, loadException);
    88             replaceAtUsages(InputType.Value, loadException);