com.oracle.graal.python.nodes.bytecode.SetupAnnotationsNodeGen Maven / Gradle / Ivy
// CheckStyle: start generated
package com.oracle.graal.python.nodes.bytecode;
import com.oracle.graal.python.builtins.objects.dict.PDict;
import com.oracle.graal.python.builtins.objects.module.PythonModule;
import com.oracle.graal.python.lib.PyDictGetItem;
import com.oracle.graal.python.lib.PyDictGetItemNodeGen;
import com.oracle.graal.python.lib.PyDictSetItem;
import com.oracle.graal.python.lib.PyDictSetItemNodeGen;
import com.oracle.graal.python.lib.PyObjectGetItem;
import com.oracle.graal.python.lib.PyObjectGetItemNodeGen;
import com.oracle.graal.python.lib.PyObjectSetItem;
import com.oracle.graal.python.lib.PyObjectSetItemNodeGen;
import com.oracle.graal.python.nodes.PGuards;
import com.oracle.graal.python.nodes.attributes.ReadAttributeFromObjectNode;
import com.oracle.graal.python.nodes.attributes.WriteAttributeToObjectNode;
import com.oracle.graal.python.nodes.object.BuiltinClassProfiles.IsBuiltinObjectProfile;
import com.oracle.graal.python.nodes.object.BuiltinClassProfilesFactory.IsBuiltinObjectProfileNodeGen;
import com.oracle.graal.python.runtime.object.PythonObjectFactory;
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.IntField;
import com.oracle.truffle.api.dsl.InlineSupport.ReferenceField;
import com.oracle.truffle.api.dsl.InlineSupport.RequiredField;
import com.oracle.truffle.api.dsl.InlineSupport.StateField;
import com.oracle.truffle.api.dsl.InlineSupport.UnsafeAccessedField;
import com.oracle.truffle.api.frame.Frame;
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.profiles.InlinedConditionProfile;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.lang.invoke.MethodHandles.Lookup;
import java.util.Objects;
/**
* Debug Info:
* Specialization {@link SetupAnnotationsNode#doLocals}
* Activation probability: 1.00000
* With/without class size: 44/21 bytes
*
*/
@GeneratedBy(SetupAnnotationsNode.class)
@SuppressWarnings({"javadoc", "unused"})
public final class SetupAnnotationsNodeGen extends SetupAnnotationsNode {
private static final StateField STATE_0_SetupAnnotationsNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
/**
* Source Info:
* Specialization: {@link SetupAnnotationsNode#doLocals}
* Parameter: {@link InlinedConditionProfile} hasLocals
* Inline method: {@link InlinedConditionProfile#inline}
*/
private static final InlinedConditionProfile INLINED_HAS_LOCALS_ = InlinedConditionProfile.inline(InlineTarget.create(InlinedConditionProfile.class, STATE_0_SetupAnnotationsNode_UPDATER.subUpdater(0, 2)));
/**
* Source Info:
* Specialization: {@link SetupAnnotationsNode#doLocals}
* Parameter: {@link SetupAnnotationsFromDictOrModuleNode} setup
* Inline method: {@link SetupAnnotationsFromDictOrModuleNodeGen#inline}
*/
private static final SetupAnnotationsFromDictOrModuleNode INLINED_SETUP_ = SetupAnnotationsFromDictOrModuleNodeGen.inline(InlineTarget.create(SetupAnnotationsFromDictOrModuleNode.class, STATE_0_SetupAnnotationsNode_UPDATER.subUpdater(2, 3), ReferenceField.create(MethodHandles.lookup(), "setup__field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "setup__field2_", Node.class), ReferenceField.create(MethodHandles.lookup(), "setup__field3_", Node.class), ReferenceField.create(MethodHandles.lookup(), "setup__field4_", Node.class), ReferenceField.create(MethodHandles.lookup(), "setup__field5_", Node.class)));
private static final Uncached UNCACHED = new Uncached();
/**
* State Info:
* 0-1: InlinedCache
* Specialization: {@link SetupAnnotationsNode#doLocals}
* Parameter: {@link InlinedConditionProfile} hasLocals
* Inline method: {@link InlinedConditionProfile#inline}
* 2-4: InlinedCache
* Specialization: {@link SetupAnnotationsNode#doLocals}
* Parameter: {@link SetupAnnotationsFromDictOrModuleNode} setup
* Inline method: {@link SetupAnnotationsFromDictOrModuleNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsNode#doLocals}
* Parameter: {@link SetupAnnotationsFromDictOrModuleNode} setup
* Inline method: {@link SetupAnnotationsFromDictOrModuleNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node setup__field1_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsNode#doLocals}
* Parameter: {@link SetupAnnotationsFromDictOrModuleNode} setup
* Inline method: {@link SetupAnnotationsFromDictOrModuleNodeGen#inline}
* Inline field: {@link Node} field2
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node setup__field2_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsNode#doLocals}
* Parameter: {@link SetupAnnotationsFromDictOrModuleNode} setup
* Inline method: {@link SetupAnnotationsFromDictOrModuleNodeGen#inline}
* Inline field: {@link Node} field3
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node setup__field3_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsNode#doLocals}
* Parameter: {@link SetupAnnotationsFromDictOrModuleNode} setup
* Inline method: {@link SetupAnnotationsFromDictOrModuleNodeGen#inline}
* Inline field: {@link Node} field4
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node setup__field4_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsNode#doLocals}
* Parameter: {@link SetupAnnotationsFromDictOrModuleNode} setup
* Inline method: {@link SetupAnnotationsFromDictOrModuleNodeGen#inline}
* Inline field: {@link Node} field5
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node setup__field5_;
private SetupAnnotationsNodeGen() {
}
@Override
public void execute(Frame frameValue) {
{
Node inliningTarget__ = (this);
doLocals((VirtualFrame) frameValue, inliningTarget__, INLINED_HAS_LOCALS_, INLINED_SETUP_);
return;
}
}
@Override
public NodeCost getCost() {
return NodeCost.MONOMORPHIC;
}
@NeverDefault
public static SetupAnnotationsNode create() {
return new SetupAnnotationsNodeGen();
}
@NeverDefault
public static SetupAnnotationsNode getUncached() {
return SetupAnnotationsNodeGen.UNCACHED;
}
@GeneratedBy(SetupAnnotationsNode.class)
@DenyReplace
private static final class Uncached extends SetupAnnotationsNode {
@Override
public void execute(Frame frameValue) {
CompilerDirectives.transferToInterpreterAndInvalidate();
doLocals((VirtualFrame) frameValue, (this), (InlinedConditionProfile.getUncached()), (SetupAnnotationsFromDictOrModuleNodeGen.getUncached()));
return;
}
@Override
public NodeCost getCost() {
return NodeCost.MEGAMORPHIC;
}
@Override
public boolean isAdoptable() {
return false;
}
}
/**
* Debug Info:
* Specialization {@link SetupAnnotationsFromDictOrModuleNode#doModule}
* Activation probability: 0.48333
* With/without class size: 15/8 bytes
* Specialization {@link SetupAnnotationsFromDictOrModuleNode#doBuiltinDict}
* Activation probability: 0.33333
* With/without class size: 21/34 bytes
* Specialization {@link SetupAnnotationsFromDictOrModuleNode#doOther}
* Activation probability: 0.18333
* With/without class size: 12/32 bytes
*
*/
@GeneratedBy(SetupAnnotationsFromDictOrModuleNode.class)
@SuppressWarnings("javadoc")
static final class SetupAnnotationsFromDictOrModuleNodeGen {
private static final StateField BUILTIN_DICT__SETUP_ANNOTATIONS_FROM_DICT_OR_MODULE_NODE_BUILTIN_DICT_STATE_0_UPDATER = StateField.create(BuiltinDictData.lookup_(), "builtinDict_state_0_");
private static final StateField FALLBACK__SETUP_ANNOTATIONS_FROM_DICT_OR_MODULE_NODE_FALLBACK_STATE_0_UPDATER = StateField.create(FallbackData.lookup_(), "fallback_state_0_");
private static final Uncached UNCACHED = new Uncached();
@NeverDefault
public static SetupAnnotationsFromDictOrModuleNode getUncached() {
return SetupAnnotationsFromDictOrModuleNodeGen.UNCACHED;
}
/**
* Required Fields:
* - {@link Inlined#state_0_}
*
- {@link Inlined#factory}
*
- {@link Inlined#module_read_}
*
- {@link Inlined#module_write_}
*
- {@link Inlined#builtinDict_cache}
*
- {@link Inlined#fallback_cache}
*
*/
@NeverDefault
public static SetupAnnotationsFromDictOrModuleNode inline(@RequiredField(bits = 3, value = StateField.class)@RequiredField(type = Node.class, value = ReferenceField.class)@RequiredField(type = Node.class, value = ReferenceField.class)@RequiredField(type = Node.class, value = ReferenceField.class)@RequiredField(type = Node.class, value = ReferenceField.class)@RequiredField(type = Node.class, value = ReferenceField.class) InlineTarget target) {
return new SetupAnnotationsFromDictOrModuleNodeGen.Inlined(target);
}
@GeneratedBy(SetupAnnotationsFromDictOrModuleNode.class)
@DenyReplace
private static final class Inlined extends SetupAnnotationsFromDictOrModuleNode {
/**
* State Info:
* 0: SpecializationActive {@link SetupAnnotationsFromDictOrModuleNode#doModule}
* 1: SpecializationActive {@link SetupAnnotationsFromDictOrModuleNode#doBuiltinDict}
* 2: SpecializationActive {@link SetupAnnotationsFromDictOrModuleNode#doOther}
*
*/
private final StateField state_0_;
private final ReferenceField factory;
private final ReferenceField module_read_;
private final ReferenceField module_write_;
private final ReferenceField builtinDict_cache;
private final ReferenceField fallback_cache;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doBuiltinDict}
* Parameter: {@link PyDictGetItem} getItem
* Inline method: {@link PyDictGetItemNodeGen#inline}
*/
private final PyDictGetItem builtinDict_getItem_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doBuiltinDict}
* Parameter: {@link PyDictSetItem} setItem
* Inline method: {@link PyDictSetItemNodeGen#inline}
*/
private final PyDictSetItem builtinDict_setItem_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doOther}
* Parameter: {@link PyObjectGetItem} getItem
* Inline method: {@link PyObjectGetItemNodeGen#inline}
*/
private final PyObjectGetItem fallback_getItem_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doOther}
* Parameter: {@link PyObjectSetItem} setItem
* Inline method: {@link PyObjectSetItemNodeGen#inline}
*/
private final PyObjectSetItem fallback_setItem_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doOther}
* Parameter: {@link IsBuiltinObjectProfile} errorProfile
* Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
*/
private final IsBuiltinObjectProfile fallback_errorProfile_;
@SuppressWarnings("unchecked")
private Inlined(InlineTarget target) {
assert target.getTargetClass().isAssignableFrom(SetupAnnotationsFromDictOrModuleNode.class);
this.state_0_ = target.getState(0, 3);
this.factory = target.getReference(1, PythonObjectFactory.class);
this.module_read_ = target.getReference(2, ReadAttributeFromObjectNode.class);
this.module_write_ = target.getReference(3, WriteAttributeToObjectNode.class);
this.builtinDict_cache = target.getReference(4, BuiltinDictData.class);
this.fallback_cache = target.getReference(5, FallbackData.class);
this.builtinDict_getItem_ = PyDictGetItemNodeGen.inline(InlineTarget.create(PyDictGetItem.class, BUILTIN_DICT__SETUP_ANNOTATIONS_FROM_DICT_OR_MODULE_NODE_BUILTIN_DICT_STATE_0_UPDATER.subUpdater(0, 11), ReferenceField.create(BuiltinDictData.lookup_(), "builtinDict_getItem__field1_", Node.class), ReferenceField.create(BuiltinDictData.lookup_(), "builtinDict_getItem__field2_", Node.class), ReferenceField.create(BuiltinDictData.lookup_(), "builtinDict_getItem__field3_", Node.class), ReferenceField.create(BuiltinDictData.lookup_(), "builtinDict_getItem__field4_", Node.class), ReferenceField.create(BuiltinDictData.lookup_(), "builtinDict_getItem__field5_", Node.class)));
this.builtinDict_setItem_ = PyDictSetItemNodeGen.inline(InlineTarget.create(PyDictSetItem.class, BUILTIN_DICT__SETUP_ANNOTATIONS_FROM_DICT_OR_MODULE_NODE_BUILTIN_DICT_STATE_0_UPDATER.subUpdater(11, 3), ReferenceField.create(BuiltinDictData.lookup_(), "builtinDict_setItem__field1_", Node.class), IntField.create(BuiltinDictData.lookup_(), "builtinDict_setItem__field2_"), IntField.create(BuiltinDictData.lookup_(), "builtinDict_setItem__field3_")));
this.fallback_getItem_ = PyObjectGetItemNodeGen.inline(InlineTarget.create(PyObjectGetItem.class, FALLBACK__SETUP_ANNOTATIONS_FROM_DICT_OR_MODULE_NODE_FALLBACK_STATE_0_UPDATER.subUpdater(0, 4), ReferenceField.create(FallbackData.lookup_(), "fallback_getItem__field1_", Node.class), ReferenceField.create(FallbackData.lookup_(), "fallback_getItem__field2_", Node.class), ReferenceField.create(FallbackData.lookup_(), "fallback_getItem__field3_", Node.class), ReferenceField.create(FallbackData.lookup_(), "fallback_getItem__field4_", Node.class)));
this.fallback_setItem_ = PyObjectSetItemNodeGen.inline(InlineTarget.create(PyObjectSetItem.class, FALLBACK__SETUP_ANNOTATIONS_FROM_DICT_OR_MODULE_NODE_FALLBACK_STATE_0_UPDATER.subUpdater(4, 2), ReferenceField.create(FallbackData.lookup_(), "fallback_setItem__field1_", Node.class), ReferenceField.create(FallbackData.lookup_(), "fallback_setItem__field2_", Node.class)));
this.fallback_errorProfile_ = IsBuiltinObjectProfileNodeGen.inline(InlineTarget.create(IsBuiltinObjectProfile.class, FALLBACK__SETUP_ANNOTATIONS_FROM_DICT_OR_MODULE_NODE_FALLBACK_STATE_0_UPDATER.subUpdater(6, 20), ReferenceField.create(FallbackData.lookup_(), "fallback_errorProfile__field1_", Node.class)));
}
@SuppressWarnings("static-method")
private boolean fallbackGuard_(int state_0, Node arg0Value, Object arg1Value) {
if (!((state_0 & 0b1) != 0 /* is SpecializationActive[SetupAnnotationsNode.SetupAnnotationsFromDictOrModuleNode.doModule(PythonModule, ReadAttributeFromObjectNode, WriteAttributeToObjectNode, PythonObjectFactory)] */) && arg1Value instanceof PythonModule) {
return false;
}
if (arg1Value instanceof PDict) {
PDict arg1Value_ = (PDict) arg1Value;
if ((PGuards.isBuiltinDict(arg1Value_))) {
return false;
}
}
return true;
}
@Override
public void execute(Frame frameValue, Node arg0Value, Object arg1Value) {
int state_0 = this.state_0_.get(arg0Value);
if (state_0 != 0 /* is SpecializationActive[SetupAnnotationsNode.SetupAnnotationsFromDictOrModuleNode.doModule(PythonModule, ReadAttributeFromObjectNode, WriteAttributeToObjectNode, PythonObjectFactory)] || SpecializationActive[SetupAnnotationsNode.SetupAnnotationsFromDictOrModuleNode.doBuiltinDict(VirtualFrame, Node, PDict, PyDictGetItem, PyDictSetItem, PythonObjectFactory)] || SpecializationActive[SetupAnnotationsNode.SetupAnnotationsFromDictOrModuleNode.doOther(VirtualFrame, Node, Object, PyObjectGetItem, PyObjectSetItem, IsBuiltinObjectProfile, PythonObjectFactory)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[SetupAnnotationsNode.SetupAnnotationsFromDictOrModuleNode.doModule(PythonModule, ReadAttributeFromObjectNode, WriteAttributeToObjectNode, PythonObjectFactory)] */ && arg1Value instanceof PythonModule) {
PythonModule arg1Value_ = (PythonModule) arg1Value;
{
ReadAttributeFromObjectNode read__ = this.module_read_.get(arg0Value);
if (read__ != null) {
WriteAttributeToObjectNode write__ = this.module_write_.get(arg0Value);
if (write__ != null) {
PythonObjectFactory factory_ = this.factory.get(arg0Value);
if (factory_ != null) {
SetupAnnotationsFromDictOrModuleNode.doModule(arg1Value_, read__, write__, factory_);
return;
}
}
}
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[SetupAnnotationsNode.SetupAnnotationsFromDictOrModuleNode.doBuiltinDict(VirtualFrame, Node, PDict, PyDictGetItem, PyDictSetItem, PythonObjectFactory)] */ && arg1Value instanceof PDict) {
PDict arg1Value_ = (PDict) arg1Value;
BuiltinDictData s1_ = this.builtinDict_cache.get(arg0Value);
if (s1_ != null) {
{
PythonObjectFactory factory_1 = this.factory.get(arg0Value);
if (factory_1 != null) {
if ((PGuards.isBuiltinDict(arg1Value_))) {
SetupAnnotationsFromDictOrModuleNode.doBuiltinDict((VirtualFrame) frameValue, s1_, arg1Value_, this.builtinDict_getItem_, this.builtinDict_setItem_, factory_1);
return;
}
}
}
}
}
if ((state_0 & 0b100) != 0 /* is SpecializationActive[SetupAnnotationsNode.SetupAnnotationsFromDictOrModuleNode.doOther(VirtualFrame, Node, Object, PyObjectGetItem, PyObjectSetItem, IsBuiltinObjectProfile, PythonObjectFactory)] */) {
FallbackData s2_ = this.fallback_cache.get(arg0Value);
if (s2_ != null) {
{
PythonObjectFactory factory_2 = this.factory.get(arg0Value);
if (factory_2 != null) {
if (fallbackGuard_(state_0, arg0Value, arg1Value)) {
SetupAnnotationsFromDictOrModuleNode.doOther((VirtualFrame) frameValue, s2_, arg1Value, this.fallback_getItem_, this.fallback_setItem_, this.fallback_errorProfile_, factory_2);
return;
}
}
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
executeAndSpecialize(frameValue, arg0Value, arg1Value);
return;
}
private void executeAndSpecialize(Frame frameValue, Node arg0Value, Object arg1Value) {
int state_0 = this.state_0_.get(arg0Value);
if (arg1Value instanceof PythonModule) {
PythonModule arg1Value_ = (PythonModule) arg1Value;
ReadAttributeFromObjectNode read__ = arg0Value.insert((ReadAttributeFromObjectNode.create()));
Objects.requireNonNull(read__, "Specialization 'doModule(PythonModule, ReadAttributeFromObjectNode, WriteAttributeToObjectNode, PythonObjectFactory)' cache 'read' 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'.");
VarHandle.storeStoreFence();
this.module_read_.set(arg0Value, read__);
WriteAttributeToObjectNode write__ = arg0Value.insert((WriteAttributeToObjectNode.create()));
Objects.requireNonNull(write__, "Specialization 'doModule(PythonModule, ReadAttributeFromObjectNode, WriteAttributeToObjectNode, PythonObjectFactory)' cache 'write' 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'.");
VarHandle.storeStoreFence();
this.module_write_.set(arg0Value, write__);
PythonObjectFactory factory_;
PythonObjectFactory factory__shared = this.factory.get(arg0Value);
if (factory__shared != null) {
factory_ = factory__shared;
} else {
factory_ = arg0Value.insert((PythonObjectFactory.create()));
if (factory_ == null) {
throw new IllegalStateException("Specialization 'doModule(PythonModule, ReadAttributeFromObjectNode, WriteAttributeToObjectNode, PythonObjectFactory)' contains a shared cache with name 'factory' 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.factory.get(arg0Value) == null) {
VarHandle.storeStoreFence();
this.factory.set(arg0Value, factory_);
}
state_0 = state_0 | 0b1 /* add SpecializationActive[SetupAnnotationsNode.SetupAnnotationsFromDictOrModuleNode.doModule(PythonModule, ReadAttributeFromObjectNode, WriteAttributeToObjectNode, PythonObjectFactory)] */;
this.state_0_.set(arg0Value, state_0);
SetupAnnotationsFromDictOrModuleNode.doModule(arg1Value_, read__, write__, factory_);
return;
}
if (arg1Value instanceof PDict) {
PDict arg1Value_ = (PDict) arg1Value;
if ((PGuards.isBuiltinDict(arg1Value_))) {
BuiltinDictData s1_ = arg0Value.insert(new BuiltinDictData());
PythonObjectFactory factory_1;
PythonObjectFactory factory_1_shared = this.factory.get(arg0Value);
if (factory_1_shared != null) {
factory_1 = factory_1_shared;
} else {
factory_1 = s1_.insert((PythonObjectFactory.create()));
if (factory_1 == null) {
throw new IllegalStateException("Specialization 'doBuiltinDict(VirtualFrame, Node, PDict, PyDictGetItem, PyDictSetItem, PythonObjectFactory)' contains a shared cache with name 'factory' 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.factory.get(arg0Value) == null) {
this.factory.set(arg0Value, factory_1);
}
VarHandle.storeStoreFence();
this.builtinDict_cache.set(arg0Value, s1_);
state_0 = state_0 | 0b10 /* add SpecializationActive[SetupAnnotationsNode.SetupAnnotationsFromDictOrModuleNode.doBuiltinDict(VirtualFrame, Node, PDict, PyDictGetItem, PyDictSetItem, PythonObjectFactory)] */;
this.state_0_.set(arg0Value, state_0);
SetupAnnotationsFromDictOrModuleNode.doBuiltinDict((VirtualFrame) frameValue, s1_, arg1Value_, this.builtinDict_getItem_, this.builtinDict_setItem_, factory_1);
return;
}
}
FallbackData s2_ = arg0Value.insert(new FallbackData());
PythonObjectFactory factory_2;
PythonObjectFactory factory_2_shared = this.factory.get(arg0Value);
if (factory_2_shared != null) {
factory_2 = factory_2_shared;
} else {
factory_2 = s2_.insert((PythonObjectFactory.create()));
if (factory_2 == null) {
throw new IllegalStateException("Specialization 'doOther(VirtualFrame, Node, Object, PyObjectGetItem, PyObjectSetItem, IsBuiltinObjectProfile, PythonObjectFactory)' contains a shared cache with name 'factory' 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.factory.get(arg0Value) == null) {
this.factory.set(arg0Value, factory_2);
}
VarHandle.storeStoreFence();
this.fallback_cache.set(arg0Value, s2_);
state_0 = state_0 | 0b100 /* add SpecializationActive[SetupAnnotationsNode.SetupAnnotationsFromDictOrModuleNode.doOther(VirtualFrame, Node, Object, PyObjectGetItem, PyObjectSetItem, IsBuiltinObjectProfile, PythonObjectFactory)] */;
this.state_0_.set(arg0Value, state_0);
SetupAnnotationsFromDictOrModuleNode.doOther((VirtualFrame) frameValue, s2_, arg1Value, this.fallback_getItem_, this.fallback_setItem_, this.fallback_errorProfile_, factory_2);
return;
}
@Override
public boolean isAdoptable() {
return false;
}
}
@GeneratedBy(SetupAnnotationsFromDictOrModuleNode.class)
@DenyReplace
private static final class BuiltinDictData extends Node implements SpecializationDataNode {
/**
* State Info:
* 0-10: InlinedCache
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doBuiltinDict}
* Parameter: {@link PyDictGetItem} getItem
* Inline method: {@link PyDictGetItemNodeGen#inline}
* 11-13: InlinedCache
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doBuiltinDict}
* Parameter: {@link PyDictSetItem} setItem
* Inline method: {@link PyDictSetItemNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int builtinDict_state_0_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doBuiltinDict}
* Parameter: {@link PyDictGetItem} getItem
* Inline method: {@link PyDictGetItemNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node builtinDict_getItem__field1_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doBuiltinDict}
* Parameter: {@link PyDictGetItem} getItem
* Inline method: {@link PyDictGetItemNodeGen#inline}
* Inline field: {@link Node} field2
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node builtinDict_getItem__field2_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doBuiltinDict}
* Parameter: {@link PyDictGetItem} getItem
* Inline method: {@link PyDictGetItemNodeGen#inline}
* Inline field: {@link Node} field3
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node builtinDict_getItem__field3_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doBuiltinDict}
* Parameter: {@link PyDictGetItem} getItem
* Inline method: {@link PyDictGetItemNodeGen#inline}
* Inline field: {@link Node} field4
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node builtinDict_getItem__field4_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doBuiltinDict}
* Parameter: {@link PyDictGetItem} getItem
* Inline method: {@link PyDictGetItemNodeGen#inline}
* Inline field: {@link Node} field5
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node builtinDict_getItem__field5_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doBuiltinDict}
* Parameter: {@link PyDictSetItem} setItem
* Inline method: {@link PyDictSetItemNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node builtinDict_setItem__field1_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doBuiltinDict}
* Parameter: {@link PyDictSetItem} setItem
* Inline method: {@link PyDictSetItemNodeGen#inline}
* Inline field: int field2
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private int builtinDict_setItem__field2_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doBuiltinDict}
* Parameter: {@link PyDictSetItem} setItem
* Inline method: {@link PyDictSetItemNodeGen#inline}
* Inline field: int field3
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private int builtinDict_setItem__field3_;
BuiltinDictData() {
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
@GeneratedBy(SetupAnnotationsFromDictOrModuleNode.class)
@DenyReplace
private static final class FallbackData extends Node implements SpecializationDataNode {
/**
* State Info:
* 0-3: InlinedCache
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doOther}
* Parameter: {@link PyObjectGetItem} getItem
* Inline method: {@link PyObjectGetItemNodeGen#inline}
* 4-5: InlinedCache
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doOther}
* Parameter: {@link PyObjectSetItem} setItem
* Inline method: {@link PyObjectSetItemNodeGen#inline}
* 6-25: InlinedCache
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doOther}
* Parameter: {@link IsBuiltinObjectProfile} errorProfile
* Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int fallback_state_0_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doOther}
* Parameter: {@link PyObjectGetItem} getItem
* Inline method: {@link PyObjectGetItemNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node fallback_getItem__field1_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doOther}
* Parameter: {@link PyObjectGetItem} getItem
* Inline method: {@link PyObjectGetItemNodeGen#inline}
* Inline field: {@link Node} field2
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node fallback_getItem__field2_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doOther}
* Parameter: {@link PyObjectGetItem} getItem
* Inline method: {@link PyObjectGetItemNodeGen#inline}
* Inline field: {@link Node} field3
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node fallback_getItem__field3_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doOther}
* Parameter: {@link PyObjectGetItem} getItem
* Inline method: {@link PyObjectGetItemNodeGen#inline}
* Inline field: {@link Node} field4
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node fallback_getItem__field4_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doOther}
* Parameter: {@link PyObjectSetItem} setItem
* Inline method: {@link PyObjectSetItemNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node fallback_setItem__field1_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doOther}
* Parameter: {@link PyObjectSetItem} setItem
* Inline method: {@link PyObjectSetItemNodeGen#inline}
* Inline field: {@link Node} field2
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node fallback_setItem__field2_;
/**
* Source Info:
* Specialization: {@link SetupAnnotationsFromDictOrModuleNode#doOther}
* Parameter: {@link IsBuiltinObjectProfile} errorProfile
* Inline method: {@link IsBuiltinObjectProfileNodeGen#inline}
* Inline field: {@link Node} field1
*/
@Child @UnsafeAccessedField @SuppressWarnings("unused") private Node fallback_errorProfile__field1_;
FallbackData() {
}
@Override
public NodeCost getCost() {
return NodeCost.NONE;
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
@GeneratedBy(SetupAnnotationsFromDictOrModuleNode.class)
@DenyReplace
private static final class Uncached extends SetupAnnotationsFromDictOrModuleNode {
@Override
public void execute(Frame frameValue, Node arg0Value, Object arg1Value) {
CompilerDirectives.transferToInterpreterAndInvalidate();
if (arg1Value instanceof PythonModule) {
PythonModule arg1Value_ = (PythonModule) arg1Value;
SetupAnnotationsFromDictOrModuleNode.doModule(arg1Value_, (ReadAttributeFromObjectNode.getUncached()), (WriteAttributeToObjectNode.getUncached()), (PythonObjectFactory.getUncached()));
return;
}
if (arg1Value instanceof PDict) {
PDict arg1Value_ = (PDict) arg1Value;
if ((PGuards.isBuiltinDict(arg1Value_))) {
SetupAnnotationsFromDictOrModuleNode.doBuiltinDict((VirtualFrame) frameValue, arg0Value, arg1Value_, (PyDictGetItem.getUncached()), (PyDictSetItem.getUncached()), (PythonObjectFactory.getUncached()));
return;
}
}
SetupAnnotationsFromDictOrModuleNode.doOther((VirtualFrame) frameValue, arg0Value, arg1Value, (PyObjectGetItem.getUncached()), (PyObjectSetItem.getUncached()), (IsBuiltinObjectProfile.getUncached()), (PythonObjectFactory.getUncached()));
return;
}
@Override
public NodeCost getCost() {
return NodeCost.MEGAMORPHIC;
}
@Override
public boolean isAdoptable() {
return false;
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy