< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/NodePlugin.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2015, 2018, 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. --- 1,7 ---- /* ! * Copyright (c) 2015, 2019, 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.
*** 22,31 **** --- 22,34 ---- */ package org.graalvm.compiler.nodes.graphbuilderconf; + import org.graalvm.compiler.graph.Node.ValueNumberable; + import org.graalvm.compiler.nodes.FixedWithNextNode; + import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.ValueNode; import org.graalvm.compiler.nodes.extended.GuardingNode; import jdk.vm.ci.meta.JavaKind; import jdk.vm.ci.meta.JavaTypeProfile;
*** 208,217 **** --- 211,237 ---- default boolean handleNewMultiArray(GraphBuilderContext b, ResolvedJavaType type, ValueNode[] dimensions) { return false; } /** + * Allows this plugin to add nodes after the exception object has been loaded in the dispatch + * sequence. Note that a {@link StructuredGraph} is provided to this call instead of a + * {@link GraphBuilderContext} so that the caller has a guarantee that its current control flow + * insertion point is not changed by this call. This means nodes must be added to the graph with + * the appropriate method (e.g., {@link StructuredGraph#unique} for {@link ValueNumberable} + * nodes) and fixed nodes must be manually {@linkplain FixedWithNextNode#setNext added} as + * successors of {@code afterExceptionLoaded}. + * + * @param graph the graph being parsed + * @param afterExceptionLoaded the last fixed node after loading the exception + * @return the last fixed node after instrumentation + */ + default FixedWithNextNode instrumentExceptionDispatch(StructuredGraph graph, FixedWithNextNode afterExceptionLoaded) { + return afterExceptionLoaded; + } + + /** * If the plugin {@link GraphBuilderContext#push pushes} a value with a different * {@link JavaKind} than specified by the bytecode, it must override this method and return * {@code true}. This disables assertion checking for value kinds. * * @param b the context
< prev index next >