All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.oracle.graal.python.nodes.exception.ExceptMatchNodeGen Maven / Gradle / Ivy

There is a newer version: 24.1.1
Show newest version
// CheckStyle: start generated
package com.oracle.graal.python.nodes.exception;

import com.oracle.graal.python.builtins.objects.common.SequenceStorageNodes.GetItemScalarNode;
import com.oracle.graal.python.builtins.objects.common.SequenceStorageNodesFactory.GetItemScalarNodeGen;
import com.oracle.graal.python.builtins.objects.tuple.PTuple;
import com.oracle.graal.python.builtins.objects.type.TypeNodes.IsTypeNode;
import com.oracle.graal.python.builtins.objects.type.TypeNodesFactory.IsTypeNodeGen;
import com.oracle.graal.python.nodes.PGuards;
import com.oracle.graal.python.nodes.PRaiseNode;
import com.oracle.graal.python.nodes.classes.IsSubtypeNode;
import com.oracle.graal.python.nodes.object.GetClassNode;
import com.oracle.graal.python.nodes.object.GetClassNodeGen;
import com.oracle.graal.python.runtime.exception.PException;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.dsl.NeverDefault;
import com.oracle.truffle.api.dsl.DSLSupport.SpecializationDataNode;
import com.oracle.truffle.api.dsl.InlineSupport.InlineTarget;
import com.oracle.truffle.api.dsl.InlineSupport.ReferenceField;
import com.oracle.truffle.api.dsl.InlineSupport.StateField;
import com.oracle.truffle.api.dsl.InlineSupport.UnsafeAccessedField;
import com.oracle.truffle.api.exception.AbstractTruffleException;
import com.oracle.truffle.api.frame.Frame;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.interop.InteropLibrary;
import com.oracle.truffle.api.library.LibraryFactory;
import com.oracle.truffle.api.nodes.DenyReplace;
import com.oracle.truffle.api.nodes.EncapsulatingNodeReference;
import com.oracle.truffle.api.nodes.ExplodeLoop;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.NodeCost;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.lang.invoke.MethodHandles.Lookup;
import java.util.Objects;

/**
 * Debug Info: 
 *   Specialization {@link ExceptMatchNode#matchPythonSingle}
 *     Activation probability: 0.32000
 *     With/without class size: 14/15 bytes
 *   Specialization {@link ExceptMatchNode#matchJava}
 *     Activation probability: 0.26000
 *     With/without class size: 11/8 bytes
 *   Specialization {@link ExceptMatchNode#matchJava}
 *     Activation probability: 0.20000
 *     With/without class size: 6/0 bytes
 *   Specialization {@link ExceptMatchNode#matchTuple}
 *     Activation probability: 0.14000
 *     With/without class size: 7/9 bytes
 *   Specialization {@link ExceptMatchNode#fallback}
 *     Activation probability: 0.08000
 *     With/without class size: 4/0 bytes
 * 
*/ @GeneratedBy(ExceptMatchNode.class) @SuppressWarnings("javadoc") public final class ExceptMatchNodeGen extends ExceptMatchNode { private static final StateField MATCH_PYTHON_SINGLE__EXCEPT_MATCH_NODE_MATCH_PYTHON_SINGLE_STATE_0_UPDATER = StateField.create(MatchPythonSingleData.lookup_(), "matchPythonSingle_state_0_"); private static final StateField MATCH_TUPLE__EXCEPT_MATCH_NODE_MATCH_TUPLE_STATE_0_UPDATER = StateField.create(MatchTupleData.lookup_(), "matchTuple_state_0_"); static final ReferenceField MATCH_PYTHON_SINGLE_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "matchPythonSingle_cache", MatchPythonSingleData.class); static final ReferenceField MATCH_JAVA0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "matchJava0_cache", MatchJava0Data.class); /** * Source Info:
     *   Specialization: {@link ExceptMatchNode#matchPythonSingle}
     *   Parameter: {@link IsTypeNode} isTypeNode
     *   Inline method: {@link IsTypeNodeGen#inline}
*/ private static final IsTypeNode INLINED_MATCH_PYTHON_SINGLE_IS_TYPE_NODE_ = IsTypeNodeGen.inline(InlineTarget.create(IsTypeNode.class, MATCH_PYTHON_SINGLE__EXCEPT_MATCH_NODE_MATCH_PYTHON_SINGLE_STATE_0_UPDATER.subUpdater(0, 5), ReferenceField.create(MatchPythonSingleData.lookup_(), "matchPythonSingle_isTypeNode__field1_", Node.class))); /** * Source Info:
     *   Specialization: {@link ExceptMatchNode#matchPythonSingle}
     *   Parameter: {@link GetClassNode} getClassNode
     *   Inline method: {@link GetClassNodeGen#inline}
*/ private static final GetClassNode INLINED_MATCH_PYTHON_SINGLE_GET_CLASS_NODE_ = GetClassNodeGen.inline(InlineTarget.create(GetClassNode.class, MATCH_PYTHON_SINGLE__EXCEPT_MATCH_NODE_MATCH_PYTHON_SINGLE_STATE_0_UPDATER.subUpdater(5, 17), ReferenceField.create(MatchPythonSingleData.lookup_(), "matchPythonSingle_getClassNode__field1_", Node.class))); /** * Source Info:
     *   Specialization: {@link ExceptMatchNode#matchTuple}
     *   Parameter: {@link GetItemScalarNode} getItemNode
     *   Inline method: {@link GetItemScalarNodeGen#inline}
*/ private static final GetItemScalarNode INLINED_MATCH_TUPLE_GET_ITEM_NODE_ = GetItemScalarNodeGen.inline(InlineTarget.create(GetItemScalarNode.class, MATCH_TUPLE__EXCEPT_MATCH_NODE_MATCH_TUPLE_STATE_0_UPDATER.subUpdater(0, 8), ReferenceField.create(MatchTupleData.lookup_(), "matchTuple_getItemNode__field1_", Node.class))); private static final Uncached UNCACHED = new Uncached(); private static final LibraryFactory INTEROP_LIBRARY_ = LibraryFactory.resolve(InteropLibrary.class); /** * State Info:
     *   0: SpecializationActive {@link ExceptMatchNode#matchPythonSingle}
     *   1: SpecializationActive {@link ExceptMatchNode#matchJava}
     *   2: SpecializationActive {@link ExceptMatchNode#matchJava}
     *   3: SpecializationActive {@link ExceptMatchNode#matchTuple}
     *   4: SpecializationActive {@link ExceptMatchNode#fallback}
     * 
*/ @CompilationFinal private int state_0_; /** * Source Info:
     *   Specialization: {@link ExceptMatchNode#matchPythonSingle}
     *   Parameter: {@link ValidExceptionNode} isValidException
*/ @Child private ValidExceptionNode isValidException; /** * Source Info:
     *   Specialization: {@link ExceptMatchNode#matchPythonSingle}
     *   Parameter: {@link PRaiseNode} raiseNode
*/ @Child private PRaiseNode raiseNode; @UnsafeAccessedField @Child private MatchPythonSingleData matchPythonSingle_cache; @UnsafeAccessedField @Child private MatchJava0Data matchJava0_cache; @Child private MatchTupleData matchTuple_cache; private ExceptMatchNodeGen() { } @SuppressWarnings("static-method") private boolean fallbackGuard_(int state_0, Object arg0Value, Object arg1Value) { if (arg0Value instanceof AbstractTruffleException) { AbstractTruffleException arg0Value_ = (AbstractTruffleException) arg0Value; if (((INTEROP_LIBRARY_.getUncached()).isException(arg0Value_)) && ((INTEROP_LIBRARY_.getUncached()).isMetaObject(arg1Value))) { return false; } } if (!((state_0 & 0b1000) != 0 /* is SpecializationActive[ExceptMatchNode.matchTuple(VirtualFrame, Object, PTuple, Node, ExceptMatchNode, GetItemScalarNode)] */) && arg1Value instanceof PTuple) { return false; } return true; } @ExplodeLoop @Override public boolean executeMatch(Frame frameValue, Object arg0Value, Object arg1Value) { int state_0 = this.state_0_; if (state_0 != 0 /* is SpecializationActive[ExceptMatchNode.matchPythonSingle(VirtualFrame, PException, Object, Node, IsTypeNode, ValidExceptionNode, GetClassNode, IsSubtypeNode, PRaiseNode)] || SpecializationActive[ExceptMatchNode.matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)] || SpecializationActive[ExceptMatchNode.matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)] || SpecializationActive[ExceptMatchNode.matchTuple(VirtualFrame, Object, PTuple, Node, ExceptMatchNode, GetItemScalarNode)] || SpecializationActive[ExceptMatchNode.fallback(VirtualFrame, Object, Object, PRaiseNode)] */) { if ((state_0 & 0b111) != 0 /* is SpecializationActive[ExceptMatchNode.matchPythonSingle(VirtualFrame, PException, Object, Node, IsTypeNode, ValidExceptionNode, GetClassNode, IsSubtypeNode, PRaiseNode)] || SpecializationActive[ExceptMatchNode.matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)] || SpecializationActive[ExceptMatchNode.matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[ExceptMatchNode.matchPythonSingle(VirtualFrame, PException, Object, Node, IsTypeNode, ValidExceptionNode, GetClassNode, IsSubtypeNode, PRaiseNode)] */ && arg0Value instanceof PException) { PException arg0Value_ = (PException) arg0Value; MatchPythonSingleData s0_ = this.matchPythonSingle_cache; if (s0_ != null) { { ValidExceptionNode isValidException_ = this.isValidException; if (isValidException_ != null) { PRaiseNode raiseNode_ = this.raiseNode; if (raiseNode_ != null) { Node inliningTarget__ = (s0_); if ((PGuards.isClass(inliningTarget__, arg1Value, INLINED_MATCH_PYTHON_SINGLE_IS_TYPE_NODE_))) { return ExceptMatchNode.matchPythonSingle((VirtualFrame) frameValue, arg0Value_, arg1Value, inliningTarget__, INLINED_MATCH_PYTHON_SINGLE_IS_TYPE_NODE_, isValidException_, INLINED_MATCH_PYTHON_SINGLE_GET_CLASS_NODE_, s0_.isSubtype_, raiseNode_); } } } } } } if ((state_0 & 0b110) != 0 /* is SpecializationActive[ExceptMatchNode.matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)] || SpecializationActive[ExceptMatchNode.matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)] */ && arg0Value instanceof AbstractTruffleException) { AbstractTruffleException arg0Value_ = (AbstractTruffleException) arg0Value; if ((state_0 & 0b10) != 0 /* is SpecializationActive[ExceptMatchNode.matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)] */) { MatchJava0Data s1_ = this.matchJava0_cache; while (s1_ != null) { { ValidExceptionNode isValidException_1 = this.isValidException; if (isValidException_1 != null) { PRaiseNode raiseNode_1 = this.raiseNode; if (raiseNode_1 != null) { if ((s1_.eLib_.accepts(arg0Value_)) && (s1_.clauseLib_.accepts(arg1Value)) && (s1_.eLib_.isException(arg0Value_)) && (s1_.clauseLib_.isMetaObject(arg1Value))) { return ExceptMatchNode.matchJava((VirtualFrame) frameValue, arg0Value_, arg1Value, isValidException_1, s1_.eLib_, s1_.clauseLib_, raiseNode_1); } } } } s1_ = s1_.next_; } } if ((state_0 & 0b100) != 0 /* is SpecializationActive[ExceptMatchNode.matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)] */) { EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent(); Node prev_ = encapsulating_.set(this); try { { ValidExceptionNode isValidException_1 = this.isValidException; if (isValidException_1 != null) { PRaiseNode raiseNode_1 = this.raiseNode; if (raiseNode_1 != null) { InteropLibrary eLib__ = (INTEROP_LIBRARY_.getUncached()); if ((eLib__.isException(arg0Value_))) { InteropLibrary clauseLib__ = (INTEROP_LIBRARY_.getUncached()); if ((clauseLib__.isMetaObject(arg1Value))) { return ExceptMatchNode.matchJava((VirtualFrame) frameValue, arg0Value_, arg1Value, isValidException_1, eLib__, clauseLib__, raiseNode_1); } } } } } } finally { encapsulating_.set(prev_); } } } } if ((state_0 & 0b11000) != 0 /* is SpecializationActive[ExceptMatchNode.matchTuple(VirtualFrame, Object, PTuple, Node, ExceptMatchNode, GetItemScalarNode)] || SpecializationActive[ExceptMatchNode.fallback(VirtualFrame, Object, Object, PRaiseNode)] */) { if ((state_0 & 0b1000) != 0 /* is SpecializationActive[ExceptMatchNode.matchTuple(VirtualFrame, Object, PTuple, Node, ExceptMatchNode, GetItemScalarNode)] */ && arg1Value instanceof PTuple) { PTuple arg1Value_ = (PTuple) arg1Value; MatchTupleData s3_ = this.matchTuple_cache; if (s3_ != null) { { Node inliningTarget__1 = (s3_); return ExceptMatchNode.matchTuple((VirtualFrame) frameValue, arg0Value, arg1Value_, inliningTarget__1, s3_.recursiveNode_, INLINED_MATCH_TUPLE_GET_ITEM_NODE_); } } } if ((state_0 & 0b10000) != 0 /* is SpecializationActive[ExceptMatchNode.fallback(VirtualFrame, Object, Object, PRaiseNode)] */) { { PRaiseNode raiseNode_2 = this.raiseNode; if (raiseNode_2 != null) { if (fallbackGuard_(state_0, arg0Value, arg1Value)) { return ExceptMatchNode.fallback((VirtualFrame) frameValue, arg0Value, arg1Value, raiseNode_2); } } } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(frameValue, arg0Value, arg1Value); } @SuppressWarnings("unused") private boolean executeAndSpecialize(Frame frameValue, Object arg0Value, Object arg1Value) { int state_0 = this.state_0_; { Node inliningTarget__ = null; if (((state_0 & 0b110)) == 0 /* is-not SpecializationActive[ExceptMatchNode.matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)] && SpecializationActive[ExceptMatchNode.matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)] */ && arg0Value instanceof PException) { PException arg0Value_ = (PException) arg0Value; while (true) { int count0_ = 0; MatchPythonSingleData s0_ = MATCH_PYTHON_SINGLE_CACHE_UPDATER.getVolatile(this); MatchPythonSingleData s0_original = s0_; while (s0_ != null) { { ValidExceptionNode isValidException_ = this.isValidException; if (isValidException_ != null) { PRaiseNode raiseNode_ = this.raiseNode; if (raiseNode_ != null) { inliningTarget__ = (s0_); if ((PGuards.isClass(inliningTarget__, arg1Value, INLINED_MATCH_PYTHON_SINGLE_IS_TYPE_NODE_))) { break; } } } } count0_++; s0_ = null; break; } if (s0_ == null && count0_ < 1) { { s0_ = this.insert(new MatchPythonSingleData()); inliningTarget__ = (s0_); if ((PGuards.isClass(inliningTarget__, arg1Value, INLINED_MATCH_PYTHON_SINGLE_IS_TYPE_NODE_))) { ValidExceptionNode isValidException_; ValidExceptionNode isValidException__shared = this.isValidException; if (isValidException__shared != null) { isValidException_ = isValidException__shared; } else { isValidException_ = s0_.insert((ValidExceptionNodeGen.create())); if (isValidException_ == null) { throw new IllegalStateException("Specialization 'matchPythonSingle(VirtualFrame, PException, Object, Node, IsTypeNode, ValidExceptionNode, GetClassNode, IsSubtypeNode, PRaiseNode)' contains a shared cache with name 'isValidException' that returned a default value for the cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.isValidException == null) { this.isValidException = isValidException_; } IsSubtypeNode isSubtype__ = s0_.insert((IsSubtypeNode.create())); Objects.requireNonNull(isSubtype__, "Specialization 'matchPythonSingle(VirtualFrame, PException, Object, Node, IsTypeNode, ValidExceptionNode, GetClassNode, IsSubtypeNode, PRaiseNode)' cache 'isSubtype' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s0_.isSubtype_ = isSubtype__; PRaiseNode raiseNode_; PRaiseNode raiseNode__shared = this.raiseNode; if (raiseNode__shared != null) { raiseNode_ = raiseNode__shared; } else { raiseNode_ = s0_.insert((PRaiseNode.create())); if (raiseNode_ == null) { throw new IllegalStateException("Specialization 'matchPythonSingle(VirtualFrame, PException, Object, Node, IsTypeNode, ValidExceptionNode, GetClassNode, IsSubtypeNode, PRaiseNode)' contains a shared cache with name 'raiseNode' that returned a default value for the cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.raiseNode == null) { this.raiseNode = raiseNode_; } if (!MATCH_PYTHON_SINGLE_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) { continue; } state_0 = state_0 | 0b1 /* add SpecializationActive[ExceptMatchNode.matchPythonSingle(VirtualFrame, PException, Object, Node, IsTypeNode, ValidExceptionNode, GetClassNode, IsSubtypeNode, PRaiseNode)] */; this.state_0_ = state_0; } else { s0_ = null; } } } if (s0_ != null) { return ExceptMatchNode.matchPythonSingle((VirtualFrame) frameValue, arg0Value_, arg1Value, inliningTarget__, INLINED_MATCH_PYTHON_SINGLE_IS_TYPE_NODE_, this.isValidException, INLINED_MATCH_PYTHON_SINGLE_GET_CLASS_NODE_, s0_.isSubtype_, this.raiseNode); } break; } } } if (arg0Value instanceof AbstractTruffleException) { AbstractTruffleException arg0Value_ = (AbstractTruffleException) arg0Value; if (((state_0 & 0b100)) == 0 /* is-not SpecializationActive[ExceptMatchNode.matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)] */) { while (true) { int count1_ = 0; MatchJava0Data s1_ = MATCH_JAVA0_CACHE_UPDATER.getVolatile(this); MatchJava0Data s1_original = s1_; while (s1_ != null) { { ValidExceptionNode isValidException_1 = this.isValidException; if (isValidException_1 != null) { PRaiseNode raiseNode_1 = this.raiseNode; if (raiseNode_1 != null) { if ((s1_.eLib_.accepts(arg0Value_)) && (s1_.clauseLib_.accepts(arg1Value)) && (s1_.eLib_.isException(arg0Value_)) && (s1_.clauseLib_.isMetaObject(arg1Value))) { break; } } } } count1_++; s1_ = s1_.next_; } if (s1_ == null) { { InteropLibrary eLib__ = this.insert((INTEROP_LIBRARY_.create(arg0Value_))); // assert (s1_.eLib_.accepts(arg0Value_)); // assert (s1_.clauseLib_.accepts(arg1Value)); if ((eLib__.isException(arg0Value_))) { InteropLibrary clauseLib__ = this.insert((INTEROP_LIBRARY_.create(arg1Value))); if ((clauseLib__.isMetaObject(arg1Value)) && count1_ < (3)) { s1_ = this.insert(new MatchJava0Data(s1_original)); ValidExceptionNode isValidException_1; ValidExceptionNode isValidException_1_shared = this.isValidException; if (isValidException_1_shared != null) { isValidException_1 = isValidException_1_shared; } else { isValidException_1 = s1_.insert((ValidExceptionNodeGen.create())); if (isValidException_1 == null) { throw new IllegalStateException("Specialization 'matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)' contains a shared cache with name 'isValidException' that returned a default value for the cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.isValidException == null) { this.isValidException = isValidException_1; } Objects.requireNonNull(s1_.insert(eLib__), "Specialization 'matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)' cache 'eLib' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s1_.eLib_ = eLib__; Objects.requireNonNull(s1_.insert(clauseLib__), "Specialization 'matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)' cache 'clauseLib' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s1_.clauseLib_ = clauseLib__; PRaiseNode raiseNode_1; PRaiseNode raiseNode_1_shared = this.raiseNode; if (raiseNode_1_shared != null) { raiseNode_1 = raiseNode_1_shared; } else { raiseNode_1 = s1_.insert((PRaiseNode.create())); if (raiseNode_1 == null) { throw new IllegalStateException("Specialization 'matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)' contains a shared cache with name 'raiseNode' that returned a default value for the cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.raiseNode == null) { this.raiseNode = raiseNode_1; } if (!MATCH_JAVA0_CACHE_UPDATER.compareAndSet(this, s1_original, s1_)) { continue; } this.matchPythonSingle_cache = null; state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[ExceptMatchNode.matchPythonSingle(VirtualFrame, PException, Object, Node, IsTypeNode, ValidExceptionNode, GetClassNode, IsSubtypeNode, PRaiseNode)] */; state_0 = state_0 | 0b10 /* add SpecializationActive[ExceptMatchNode.matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)] */; this.state_0_ = state_0; } } } } if (s1_ != null) { return ExceptMatchNode.matchJava((VirtualFrame) frameValue, arg0Value_, arg1Value, this.isValidException, s1_.eLib_, s1_.clauseLib_, this.raiseNode); } break; } } { InteropLibrary clauseLib__ = null; InteropLibrary eLib__ = null; { EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent(); Node prev_ = encapsulating_.set(this); try { { eLib__ = (INTEROP_LIBRARY_.getUncached()); if ((eLib__.isException(arg0Value_))) { clauseLib__ = (INTEROP_LIBRARY_.getUncached()); if ((clauseLib__.isMetaObject(arg1Value))) { ValidExceptionNode isValidException_1; ValidExceptionNode isValidException_1_shared = this.isValidException; if (isValidException_1_shared != null) { isValidException_1 = isValidException_1_shared; } else { isValidException_1 = this.insert((ValidExceptionNodeGen.create())); if (isValidException_1 == null) { throw new IllegalStateException("Specialization 'matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)' contains a shared cache with name 'isValidException' that returned a default value for the cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.isValidException == null) { VarHandle.storeStoreFence(); this.isValidException = isValidException_1; } PRaiseNode raiseNode_1; PRaiseNode raiseNode_1_shared = this.raiseNode; if (raiseNode_1_shared != null) { raiseNode_1 = raiseNode_1_shared; } else { raiseNode_1 = this.insert((PRaiseNode.create())); if (raiseNode_1 == null) { throw new IllegalStateException("Specialization 'matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)' contains a shared cache with name 'raiseNode' that returned a default value for the cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.raiseNode == null) { VarHandle.storeStoreFence(); this.raiseNode = raiseNode_1; } this.matchPythonSingle_cache = null; this.matchJava0_cache = null; state_0 = state_0 & 0xfffffffc /* remove SpecializationActive[ExceptMatchNode.matchPythonSingle(VirtualFrame, PException, Object, Node, IsTypeNode, ValidExceptionNode, GetClassNode, IsSubtypeNode, PRaiseNode)], SpecializationActive[ExceptMatchNode.matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)] */; state_0 = state_0 | 0b100 /* add SpecializationActive[ExceptMatchNode.matchJava(VirtualFrame, AbstractTruffleException, Object, ValidExceptionNode, InteropLibrary, InteropLibrary, PRaiseNode)] */; this.state_0_ = state_0; return ExceptMatchNode.matchJava((VirtualFrame) frameValue, arg0Value_, arg1Value, isValidException_1, eLib__, clauseLib__, raiseNode_1); } } } } finally { encapsulating_.set(prev_); } } } } { Node inliningTarget__1 = null; if (arg1Value instanceof PTuple) { PTuple arg1Value_ = (PTuple) arg1Value; MatchTupleData s3_ = this.insert(new MatchTupleData()); inliningTarget__1 = (s3_); ExceptMatchNode recursiveNode__ = s3_.insert((ExceptMatchNode.create())); Objects.requireNonNull(recursiveNode__, "Specialization 'matchTuple(VirtualFrame, Object, PTuple, Node, ExceptMatchNode, GetItemScalarNode)' cache 'recursiveNode' returned a 'null' default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns 'null'."); s3_.recursiveNode_ = recursiveNode__; VarHandle.storeStoreFence(); this.matchTuple_cache = s3_; state_0 = state_0 | 0b1000 /* add SpecializationActive[ExceptMatchNode.matchTuple(VirtualFrame, Object, PTuple, Node, ExceptMatchNode, GetItemScalarNode)] */; this.state_0_ = state_0; return ExceptMatchNode.matchTuple((VirtualFrame) frameValue, arg0Value, arg1Value_, inliningTarget__1, recursiveNode__, INLINED_MATCH_TUPLE_GET_ITEM_NODE_); } } PRaiseNode raiseNode_2; PRaiseNode raiseNode_2_shared = this.raiseNode; if (raiseNode_2_shared != null) { raiseNode_2 = raiseNode_2_shared; } else { raiseNode_2 = this.insert((PRaiseNode.create())); if (raiseNode_2 == null) { throw new IllegalStateException("Specialization 'fallback(VirtualFrame, Object, Object, PRaiseNode)' contains a shared cache with name 'raiseNode' that returned a default value for the cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.raiseNode == null) { VarHandle.storeStoreFence(); this.raiseNode = raiseNode_2; } state_0 = state_0 | 0b10000 /* add SpecializationActive[ExceptMatchNode.fallback(VirtualFrame, Object, Object, PRaiseNode)] */; this.state_0_ = state_0; return ExceptMatchNode.fallback((VirtualFrame) frameValue, arg0Value, arg1Value, raiseNode_2); } @Override public NodeCost getCost() { int state_0 = this.state_0_; if (state_0 == 0) { return NodeCost.UNINITIALIZED; } else { if ((state_0 & (state_0 - 1)) == 0 /* is-single */) { MatchJava0Data s1_ = this.matchJava0_cache; if ((s1_ == null || s1_.next_ == null)) { return NodeCost.MONOMORPHIC; } } } return NodeCost.POLYMORPHIC; } @NeverDefault public static ExceptMatchNode create() { return new ExceptMatchNodeGen(); } @NeverDefault public static ExceptMatchNode getUncached() { return ExceptMatchNodeGen.UNCACHED; } @GeneratedBy(ExceptMatchNode.class) @DenyReplace private static final class MatchPythonSingleData extends Node implements SpecializationDataNode { /** * State Info:
         *   0-4: InlinedCache
         *        Specialization: {@link ExceptMatchNode#matchPythonSingle}
         *        Parameter: {@link IsTypeNode} isTypeNode
         *        Inline method: {@link IsTypeNodeGen#inline}
         *   5-21: InlinedCache
         *        Specialization: {@link ExceptMatchNode#matchPythonSingle}
         *        Parameter: {@link GetClassNode} getClassNode
         *        Inline method: {@link GetClassNodeGen#inline}
         * 
*/ @CompilationFinal @UnsafeAccessedField private int matchPythonSingle_state_0_; /** * Source Info:
         *   Specialization: {@link ExceptMatchNode#matchPythonSingle}
         *   Parameter: {@link IsTypeNode} isTypeNode
         *   Inline method: {@link IsTypeNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node matchPythonSingle_isTypeNode__field1_; /** * Source Info:
         *   Specialization: {@link ExceptMatchNode#matchPythonSingle}
         *   Parameter: {@link GetClassNode} getClassNode
         *   Inline method: {@link GetClassNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node matchPythonSingle_getClassNode__field1_; /** * Source Info:
         *   Specialization: {@link ExceptMatchNode#matchPythonSingle}
         *   Parameter: {@link IsSubtypeNode} isSubtype
*/ @Child IsSubtypeNode isSubtype_; MatchPythonSingleData() { } @Override public NodeCost getCost() { return NodeCost.NONE; } private static Lookup lookup_() { return MethodHandles.lookup(); } } @GeneratedBy(ExceptMatchNode.class) @DenyReplace private static final class MatchJava0Data extends Node implements SpecializationDataNode { @Child MatchJava0Data next_; /** * Source Info:
         *   Specialization: {@link ExceptMatchNode#matchJava}
         *   Parameter: {@link InteropLibrary} eLib
*/ @Child InteropLibrary eLib_; /** * Source Info:
         *   Specialization: {@link ExceptMatchNode#matchJava}
         *   Parameter: {@link InteropLibrary} clauseLib
*/ @Child InteropLibrary clauseLib_; MatchJava0Data(MatchJava0Data next_) { this.next_ = next_; } @Override public NodeCost getCost() { return NodeCost.NONE; } } @GeneratedBy(ExceptMatchNode.class) @DenyReplace private static final class MatchTupleData extends Node implements SpecializationDataNode { /** * State Info:
         *   0-7: InlinedCache
         *        Specialization: {@link ExceptMatchNode#matchTuple}
         *        Parameter: {@link GetItemScalarNode} getItemNode
         *        Inline method: {@link GetItemScalarNodeGen#inline}
         * 
*/ @CompilationFinal @UnsafeAccessedField private int matchTuple_state_0_; /** * Source Info:
         *   Specialization: {@link ExceptMatchNode#matchTuple}
         *   Parameter: {@link ExceptMatchNode} recursiveNode
*/ @Child ExceptMatchNode recursiveNode_; /** * Source Info:
         *   Specialization: {@link ExceptMatchNode#matchTuple}
         *   Parameter: {@link GetItemScalarNode} getItemNode
         *   Inline method: {@link GetItemScalarNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node matchTuple_getItemNode__field1_; MatchTupleData() { } @Override public NodeCost getCost() { return NodeCost.NONE; } private static Lookup lookup_() { return MethodHandles.lookup(); } } @GeneratedBy(ExceptMatchNode.class) @DenyReplace private static final class Uncached extends ExceptMatchNode { @Override public boolean executeMatch(Frame frameValue, Object arg0Value, Object arg1Value) { CompilerDirectives.transferToInterpreterAndInvalidate(); if (arg0Value instanceof AbstractTruffleException) { AbstractTruffleException arg0Value_ = (AbstractTruffleException) arg0Value; if (((INTEROP_LIBRARY_.getUncached(arg0Value_)).isException(arg0Value_)) && ((INTEROP_LIBRARY_.getUncached(arg1Value)).isMetaObject(arg1Value))) { return ExceptMatchNode.matchJava((VirtualFrame) frameValue, arg0Value_, arg1Value, (ValidExceptionNodeGen.getUncached()), (INTEROP_LIBRARY_.getUncached(arg0Value_)), (INTEROP_LIBRARY_.getUncached(arg1Value)), (PRaiseNode.getUncached())); } } if (arg1Value instanceof PTuple) { PTuple arg1Value_ = (PTuple) arg1Value; return ExceptMatchNode.matchTuple((VirtualFrame) frameValue, arg0Value, arg1Value_, (this), (ExceptMatchNode.getUncached()), (GetItemScalarNodeGen.getUncached())); } return ExceptMatchNode.fallback((VirtualFrame) frameValue, arg0Value, arg1Value, (PRaiseNode.getUncached())); } @Override public NodeCost getCost() { return NodeCost.MEGAMORPHIC; } @Override public boolean isAdoptable() { return false; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy