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

com.oracle.graal.python.nodes.frame.DeleteGlobalNodeGen Maven / Gradle / Ivy

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

import com.oracle.graal.python.builtins.objects.dict.PDict;
import com.oracle.graal.python.builtins.objects.module.PythonModule;
import com.oracle.graal.python.lib.PyObjectDelItem;
import com.oracle.graal.python.lib.PyObjectDelItemNodeGen;
import com.oracle.graal.python.nodes.attributes.DeleteAttributeNode;
import com.oracle.graal.python.nodes.attributes.DeleteAttributeNodeGen;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.dsl.DSLSupport;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.dsl.NeverDefault;
import com.oracle.truffle.api.dsl.UnsupportedSpecializationException;
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.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.DenyReplace;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.NodeCost;
import com.oracle.truffle.api.strings.TruffleString;
import com.oracle.truffle.api.utilities.TruffleWeakReference;
import java.lang.invoke.MethodHandles;

/**
 * Debug Info: 
 *   Specialization {@link DeleteGlobalNode#deleteDictCached}
 *     Activation probability: 0.38500
 *     With/without class size: 11/4 bytes
 *   Specialization {@link DeleteGlobalNode#deleteDict}
 *     Activation probability: 0.29500
 *     With/without class size: 8/0 bytes
 *   Specialization {@link DeleteGlobalNode#deleteModuleCached}
 *     Activation probability: 0.20500
 *     With/without class size: 8/4 bytes
 *   Specialization {@link DeleteGlobalNode#deleteModule}
 *     Activation probability: 0.11500
 *     With/without class size: 5/0 bytes
 * 
*/ @GeneratedBy(DeleteGlobalNode.class) @SuppressWarnings("javadoc") public final class DeleteGlobalNodeGen extends DeleteGlobalNode { private static final StateField STATE_0_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_"); static final ReferenceField DELETE_DICT_CACHED_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "deleteDictCached_cache", DeleteDictCachedData.class); static final ReferenceField DELETE_MODULE_CACHED_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "deleteModuleCached_cache", DeleteModuleCachedData.class); /** * Source Info:
     *   Specialization: {@link DeleteGlobalNode#deleteDictCached}
     *   Parameter: {@link PyObjectDelItem} deleteNode
     *   Inline method: {@link PyObjectDelItemNodeGen#inline}
*/ private static final PyObjectDelItem INLINED_DEL_ITEM = PyObjectDelItemNodeGen.inline(InlineTarget.create(PyObjectDelItem.class, STATE_0_UPDATER.subUpdater(4, 20), ReferenceField.create(MethodHandles.lookup(), "delItem_field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "delItem_field2_", Node.class), ReferenceField.create(MethodHandles.lookup(), "delItem_field3_", Node.class), ReferenceField.create(MethodHandles.lookup(), "delItem_field4_", Node.class), ReferenceField.create(MethodHandles.lookup(), "delItem_field5_", Node.class))); /** * Source Info:
     *   Specialization: {@link DeleteGlobalNode#deleteModuleCached}
     *   Parameter: {@link DeleteAttributeNode} storeNode
     *   Inline method: {@link DeleteAttributeNodeGen#inline}
*/ private static final DeleteAttributeNode INLINED_STORE_NODE = DeleteAttributeNodeGen.inline(InlineTarget.create(DeleteAttributeNode.class, STATE_0_UPDATER.subUpdater(24, 2), ReferenceField.create(MethodHandles.lookup(), "storeNode_field1_", Node.class))); private static final Uncached UNCACHED = new Uncached(); /** * State Info:
     *   0: SpecializationActive {@link DeleteGlobalNode#deleteDictCached}
     *   1: SpecializationActive {@link DeleteGlobalNode#deleteDict}
     *   2: SpecializationActive {@link DeleteGlobalNode#deleteModuleCached}
     *   3: SpecializationActive {@link DeleteGlobalNode#deleteModule}
     *   4-23: InlinedCache
     *        Specialization: {@link DeleteGlobalNode#deleteDictCached}
     *        Parameter: {@link PyObjectDelItem} deleteNode
     *        Inline method: {@link PyObjectDelItemNodeGen#inline}
     *   24-25: InlinedCache
     *        Specialization: {@link DeleteGlobalNode#deleteModuleCached}
     *        Parameter: {@link DeleteAttributeNode} storeNode
     *        Inline method: {@link DeleteAttributeNodeGen#inline}
     * 
*/ @CompilationFinal @UnsafeAccessedField private int state_0_; /** * Source Info:
     *   Specialization: {@link DeleteGlobalNode#deleteDictCached}
     *   Parameter: {@link PyObjectDelItem} deleteNode
     *   Inline method: {@link PyObjectDelItemNodeGen#inline}
     *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node delItem_field1_; /** * Source Info:
     *   Specialization: {@link DeleteGlobalNode#deleteDictCached}
     *   Parameter: {@link PyObjectDelItem} deleteNode
     *   Inline method: {@link PyObjectDelItemNodeGen#inline}
     *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node delItem_field2_; /** * Source Info:
     *   Specialization: {@link DeleteGlobalNode#deleteDictCached}
     *   Parameter: {@link PyObjectDelItem} deleteNode
     *   Inline method: {@link PyObjectDelItemNodeGen#inline}
     *   Inline field: {@link Node} field3
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node delItem_field3_; /** * Source Info:
     *   Specialization: {@link DeleteGlobalNode#deleteDictCached}
     *   Parameter: {@link PyObjectDelItem} deleteNode
     *   Inline method: {@link PyObjectDelItemNodeGen#inline}
     *   Inline field: {@link Node} field4
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node delItem_field4_; /** * Source Info:
     *   Specialization: {@link DeleteGlobalNode#deleteDictCached}
     *   Parameter: {@link PyObjectDelItem} deleteNode
     *   Inline method: {@link PyObjectDelItemNodeGen#inline}
     *   Inline field: {@link Node} field5
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node delItem_field5_; /** * Source Info:
     *   Specialization: {@link DeleteGlobalNode#deleteModuleCached}
     *   Parameter: {@link DeleteAttributeNode} storeNode
     *   Inline method: {@link DeleteAttributeNodeGen#inline}
     *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node storeNode_field1_; @UnsafeAccessedField @Child private DeleteDictCachedData deleteDictCached_cache; @UnsafeAccessedField @Child private DeleteModuleCachedData deleteModuleCached_cache; private DeleteGlobalNodeGen() { } @Override public void executeWithGlobalsImpl(VirtualFrame frameValue, Object arg0Value, TruffleString arg1Value) { int state_0 = this.state_0_; if ((state_0 & 0b1111) != 0 /* is SpecializationActive[DeleteGlobalNode.deleteDictCached(VirtualFrame, PDict, TruffleString, Node, PDict, PyObjectDelItem)] || SpecializationActive[DeleteGlobalNode.deleteDict(VirtualFrame, PDict, TruffleString, Node, PyObjectDelItem)] || SpecializationActive[DeleteGlobalNode.deleteModuleCached(VirtualFrame, PythonModule, TruffleString, Node, PythonModule, DeleteAttributeNode)] || SpecializationActive[DeleteGlobalNode.deleteModule(VirtualFrame, PythonModule, TruffleString, Node, DeleteAttributeNode)] */) { if ((state_0 & 0b11) != 0 /* is SpecializationActive[DeleteGlobalNode.deleteDictCached(VirtualFrame, PDict, TruffleString, Node, PDict, PyObjectDelItem)] || SpecializationActive[DeleteGlobalNode.deleteDict(VirtualFrame, PDict, TruffleString, Node, PyObjectDelItem)] */ && arg0Value instanceof PDict) { PDict arg0Value_ = (PDict) arg0Value; if ((state_0 & 0b1) != 0 /* is SpecializationActive[DeleteGlobalNode.deleteDictCached(VirtualFrame, PDict, TruffleString, Node, PDict, PyObjectDelItem)] */) { DeleteDictCachedData s0_ = this.deleteDictCached_cache; if (s0_ != null) { { PDict cachedGlobals__ = (s0_.weakCachedGlobalsGen__.get()); assert DSLSupport.assertIdempotence((isSingleContext())); if ((cachedGlobals__ != null) && (arg0Value_ == cachedGlobals__)) { Node inliningTarget__ = (this); DeleteGlobalNode.deleteDictCached(frameValue, arg0Value_, arg1Value, inliningTarget__, cachedGlobals__, INLINED_DEL_ITEM); return; } } } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[DeleteGlobalNode.deleteDict(VirtualFrame, PDict, TruffleString, Node, PyObjectDelItem)] */) { { Node inliningTarget__1 = (this); DeleteGlobalNode.deleteDict(frameValue, arg0Value_, arg1Value, inliningTarget__1, INLINED_DEL_ITEM); return; } } } if ((state_0 & 0b1100) != 0 /* is SpecializationActive[DeleteGlobalNode.deleteModuleCached(VirtualFrame, PythonModule, TruffleString, Node, PythonModule, DeleteAttributeNode)] || SpecializationActive[DeleteGlobalNode.deleteModule(VirtualFrame, PythonModule, TruffleString, Node, DeleteAttributeNode)] */ && arg0Value instanceof PythonModule) { PythonModule arg0Value_ = (PythonModule) arg0Value; if ((state_0 & 0b100) != 0 /* is SpecializationActive[DeleteGlobalNode.deleteModuleCached(VirtualFrame, PythonModule, TruffleString, Node, PythonModule, DeleteAttributeNode)] */) { DeleteModuleCachedData s2_ = this.deleteModuleCached_cache; if (s2_ != null) { { PythonModule cachedGlobals__1 = (s2_.weakCachedGlobalsGen__.get()); assert DSLSupport.assertIdempotence((isSingleContext())); if ((cachedGlobals__1 != null) && (arg0Value_ == cachedGlobals__1)) { Node inliningTarget__2 = (this); DeleteGlobalNode.deleteModuleCached(frameValue, arg0Value_, arg1Value, inliningTarget__2, cachedGlobals__1, INLINED_STORE_NODE); return; } } } } if ((state_0 & 0b1000) != 0 /* is SpecializationActive[DeleteGlobalNode.deleteModule(VirtualFrame, PythonModule, TruffleString, Node, DeleteAttributeNode)] */) { { Node inliningTarget__3 = (this); DeleteGlobalNode.deleteModule(frameValue, arg0Value_, arg1Value, inliningTarget__3, INLINED_STORE_NODE); return; } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); executeAndSpecialize(frameValue, arg0Value, arg1Value); return; } private void executeAndSpecialize(VirtualFrame frameValue, Object arg0Value, TruffleString arg1Value) { int state_0 = this.state_0_; if (arg0Value instanceof PDict) { PDict arg0Value_ = (PDict) arg0Value; { PDict cachedGlobals__ = null; Node inliningTarget__ = null; if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[DeleteGlobalNode.deleteDict(VirtualFrame, PDict, TruffleString, Node, PyObjectDelItem)] */) { while (true) { int count0_ = 0; DeleteDictCachedData s0_ = DELETE_DICT_CACHED_CACHE_UPDATER.getVolatile(this); DeleteDictCachedData s0_original = s0_; while (s0_ != null) { { cachedGlobals__ = (s0_.weakCachedGlobalsGen__.get()); assert DSLSupport.assertIdempotence((isSingleContext())); if ((cachedGlobals__ != null) && (arg0Value_ == cachedGlobals__)) { inliningTarget__ = (this); break; } } count0_++; s0_ = null; break; } if (s0_ == null && count0_ < 1) { if ((isSingleContext())) { TruffleWeakReference weakCachedGlobalsGen___ = (new TruffleWeakReference<>(arg0Value_)); cachedGlobals__ = (weakCachedGlobalsGen___.get()); if ((cachedGlobals__ != null) && (arg0Value_ == cachedGlobals__)) { s0_ = this.insert(new DeleteDictCachedData()); s0_.weakCachedGlobalsGen__ = weakCachedGlobalsGen___; inliningTarget__ = (this); if (!DELETE_DICT_CACHED_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) { continue; } state_0 = state_0 | 0b1 /* add SpecializationActive[DeleteGlobalNode.deleteDictCached(VirtualFrame, PDict, TruffleString, Node, PDict, PyObjectDelItem)] */; this.state_0_ = state_0; } } } if (s0_ != null) { DeleteGlobalNode.deleteDictCached(frameValue, arg0Value_, arg1Value, inliningTarget__, cachedGlobals__, INLINED_DEL_ITEM); return; } break; } } } { Node inliningTarget__1 = null; inliningTarget__1 = (this); this.deleteDictCached_cache = null; state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[DeleteGlobalNode.deleteDictCached(VirtualFrame, PDict, TruffleString, Node, PDict, PyObjectDelItem)] */; state_0 = state_0 | 0b10 /* add SpecializationActive[DeleteGlobalNode.deleteDict(VirtualFrame, PDict, TruffleString, Node, PyObjectDelItem)] */; this.state_0_ = state_0; DeleteGlobalNode.deleteDict(frameValue, arg0Value_, arg1Value, inliningTarget__1, INLINED_DEL_ITEM); return; } } if (arg0Value instanceof PythonModule) { PythonModule arg0Value_ = (PythonModule) arg0Value; { PythonModule cachedGlobals__1 = null; Node inliningTarget__2 = null; if (((state_0 & 0b1000)) == 0 /* is-not SpecializationActive[DeleteGlobalNode.deleteModule(VirtualFrame, PythonModule, TruffleString, Node, DeleteAttributeNode)] */) { while (true) { int count2_ = 0; DeleteModuleCachedData s2_ = DELETE_MODULE_CACHED_CACHE_UPDATER.getVolatile(this); DeleteModuleCachedData s2_original = s2_; while (s2_ != null) { { cachedGlobals__1 = (s2_.weakCachedGlobalsGen__.get()); assert DSLSupport.assertIdempotence((isSingleContext())); if ((cachedGlobals__1 != null) && (arg0Value_ == cachedGlobals__1)) { inliningTarget__2 = (this); break; } } count2_++; s2_ = null; break; } if (s2_ == null && count2_ < 1) { if ((isSingleContext())) { TruffleWeakReference weakCachedGlobalsGen___1 = (new TruffleWeakReference<>(arg0Value_)); cachedGlobals__1 = (weakCachedGlobalsGen___1.get()); if ((cachedGlobals__1 != null) && (arg0Value_ == cachedGlobals__1)) { s2_ = this.insert(new DeleteModuleCachedData()); s2_.weakCachedGlobalsGen__ = weakCachedGlobalsGen___1; inliningTarget__2 = (this); if (!DELETE_MODULE_CACHED_CACHE_UPDATER.compareAndSet(this, s2_original, s2_)) { continue; } state_0 = state_0 | 0b100 /* add SpecializationActive[DeleteGlobalNode.deleteModuleCached(VirtualFrame, PythonModule, TruffleString, Node, PythonModule, DeleteAttributeNode)] */; this.state_0_ = state_0; } } } if (s2_ != null) { DeleteGlobalNode.deleteModuleCached(frameValue, arg0Value_, arg1Value, inliningTarget__2, cachedGlobals__1, INLINED_STORE_NODE); return; } break; } } } { Node inliningTarget__3 = null; inliningTarget__3 = (this); this.deleteModuleCached_cache = null; state_0 = state_0 & 0xfffffffb /* remove SpecializationActive[DeleteGlobalNode.deleteModuleCached(VirtualFrame, PythonModule, TruffleString, Node, PythonModule, DeleteAttributeNode)] */; state_0 = state_0 | 0b1000 /* add SpecializationActive[DeleteGlobalNode.deleteModule(VirtualFrame, PythonModule, TruffleString, Node, DeleteAttributeNode)] */; this.state_0_ = state_0; DeleteGlobalNode.deleteModule(frameValue, arg0Value_, arg1Value, inliningTarget__3, INLINED_STORE_NODE); return; } } throw new UnsupportedSpecializationException(this, new Node[] {null, null}, arg0Value, arg1Value); } @Override public NodeCost getCost() { int state_0 = this.state_0_; if ((state_0 & 0b1111) == 0) { return NodeCost.UNINITIALIZED; } else { if (((state_0 & 0b1111) & ((state_0 & 0b1111) - 1)) == 0 /* is-single */) { return NodeCost.MONOMORPHIC; } } return NodeCost.POLYMORPHIC; } @NeverDefault public static DeleteGlobalNode create() { return new DeleteGlobalNodeGen(); } @NeverDefault public static DeleteGlobalNode getUncached() { return DeleteGlobalNodeGen.UNCACHED; } @GeneratedBy(DeleteGlobalNode.class) @DenyReplace private static final class DeleteDictCachedData extends Node implements SpecializationDataNode { /** * Source Info:
         *   Specialization: {@link DeleteGlobalNode#deleteDictCached}
         *   Parameter: {@link TruffleWeakReference} weakCachedGlobalsGen_
*/ @CompilationFinal TruffleWeakReference weakCachedGlobalsGen__; DeleteDictCachedData() { } @Override public NodeCost getCost() { return NodeCost.NONE; } } @GeneratedBy(DeleteGlobalNode.class) @DenyReplace private static final class DeleteModuleCachedData extends Node implements SpecializationDataNode { /** * Source Info:
         *   Specialization: {@link DeleteGlobalNode#deleteModuleCached}
         *   Parameter: {@link TruffleWeakReference} weakCachedGlobalsGen_
*/ @CompilationFinal TruffleWeakReference weakCachedGlobalsGen__; DeleteModuleCachedData() { } @Override public NodeCost getCost() { return NodeCost.NONE; } } @GeneratedBy(DeleteGlobalNode.class) @DenyReplace private static final class Uncached extends DeleteGlobalNode { @Override public void executeWithGlobalsImpl(VirtualFrame frameValue, Object arg0Value, TruffleString arg1Value) { CompilerDirectives.transferToInterpreterAndInvalidate(); if (arg0Value instanceof PDict) { PDict arg0Value_ = (PDict) arg0Value; DeleteGlobalNode.deleteDict(frameValue, arg0Value_, arg1Value, (this), (PyObjectDelItem.getUncached())); return; } if (arg0Value instanceof PythonModule) { PythonModule arg0Value_ = (PythonModule) arg0Value; DeleteGlobalNode.deleteModule(frameValue, arg0Value_, arg1Value, (this), (DeleteAttributeNodeGen.getUncached())); return; } throw new UnsupportedSpecializationException(this, new Node[] {null, null}, arg0Value, arg1Value); } @Override public NodeCost getCost() { return NodeCost.MEGAMORPHIC; } @Override public boolean isAdoptable() { return false; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy