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

com.oracle.graal.python.lib.PyDictKeysNodeGen Maven / Gradle / Ivy

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

import com.oracle.graal.python.builtins.objects.common.HashingStorageNodes.HashingStorageGetIterator;
import com.oracle.graal.python.builtins.objects.common.HashingStorageNodes.HashingStorageIteratorKey;
import com.oracle.graal.python.builtins.objects.common.HashingStorageNodes.HashingStorageIteratorNext;
import com.oracle.graal.python.builtins.objects.common.HashingStorageNodes.HashingStorageLen;
import com.oracle.graal.python.builtins.objects.common.HashingStorageNodesFactory.HashingStorageGetIteratorNodeGen;
import com.oracle.graal.python.builtins.objects.common.HashingStorageNodesFactory.HashingStorageIteratorKeyNodeGen;
import com.oracle.graal.python.builtins.objects.common.HashingStorageNodesFactory.HashingStorageIteratorNextNodeGen;
import com.oracle.graal.python.builtins.objects.common.HashingStorageNodesFactory.HashingStorageLenNodeGen;
import com.oracle.graal.python.builtins.objects.dict.PDict;
import com.oracle.graal.python.runtime.object.PythonObjectFactory;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.dsl.InlineSupport;
import com.oracle.truffle.api.dsl.NeverDefault;
import com.oracle.truffle.api.dsl.InlineSupport.InlineTarget;
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.nodes.DenyReplace;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.NodeCost;
import java.lang.invoke.VarHandle;
import java.util.Objects;

/**
 * Debug Info: 
 *   Specialization {@link PyDictKeys#getString}
 *     Activation probability: 1.00000
 *     With/without class size: 36/15 bytes
 * 
*/ @GeneratedBy(PyDictKeys.class) @SuppressWarnings("javadoc") public final class PyDictKeysNodeGen { private static final Uncached UNCACHED = new Uncached(); @NeverDefault public static PyDictKeys getUncached() { return PyDictKeysNodeGen.UNCACHED; } /** * Required Fields:
    *
  • {@link Inlined#state_0_} *
  • {@link Inlined#factory_} *
  • {@link Inlined#lenNode__field1_} *
  • {@link Inlined#getIter__field1_} *
*/ @NeverDefault public static PyDictKeys inline(@RequiredField(bits = 20, value = StateField.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 PyDictKeysNodeGen.Inlined(target); } @GeneratedBy(PyDictKeys.class) @DenyReplace private static final class Inlined extends PyDictKeys { /** * State Info:
         *   0: SpecializationActive {@link PyDictKeys#getString}
         *   1-4: InlinedCache
         *        Specialization: {@link PyDictKeys#getString}
         *        Parameter: {@link HashingStorageLen} lenNode
         *        Inline method: {@link HashingStorageLenNodeGen#inline}
         *   5-8: InlinedCache
         *        Specialization: {@link PyDictKeys#getString}
         *        Parameter: {@link HashingStorageGetIterator} getIter
         *        Inline method: {@link HashingStorageGetIteratorNodeGen#inline}
         *   9-15: InlinedCache
         *        Specialization: {@link PyDictKeys#getString}
         *        Parameter: {@link HashingStorageIteratorNext} iterNext
         *        Inline method: {@link HashingStorageIteratorNextNodeGen#inline}
         *   16-19: InlinedCache
         *        Specialization: {@link PyDictKeys#getString}
         *        Parameter: {@link HashingStorageIteratorKey} iterKey
         *        Inline method: {@link HashingStorageIteratorKeyNodeGen#inline}
         * 
*/ private final StateField state_0_; private final ReferenceField factory_; private final ReferenceField lenNode__field1_; private final ReferenceField getIter__field1_; /** * Source Info:
         *   Specialization: {@link PyDictKeys#getString}
         *   Parameter: {@link HashingStorageLen} lenNode
         *   Inline method: {@link HashingStorageLenNodeGen#inline}
*/ private final HashingStorageLen lenNode_; /** * Source Info:
         *   Specialization: {@link PyDictKeys#getString}
         *   Parameter: {@link HashingStorageGetIterator} getIter
         *   Inline method: {@link HashingStorageGetIteratorNodeGen#inline}
*/ private final HashingStorageGetIterator getIter_; /** * Source Info:
         *   Specialization: {@link PyDictKeys#getString}
         *   Parameter: {@link HashingStorageIteratorNext} iterNext
         *   Inline method: {@link HashingStorageIteratorNextNodeGen#inline}
*/ private final HashingStorageIteratorNext iterNext_; /** * Source Info:
         *   Specialization: {@link PyDictKeys#getString}
         *   Parameter: {@link HashingStorageIteratorKey} iterKey
         *   Inline method: {@link HashingStorageIteratorKeyNodeGen#inline}
*/ private final HashingStorageIteratorKey iterKey_; @SuppressWarnings("unchecked") private Inlined(InlineTarget target) { assert target.getTargetClass().isAssignableFrom(PyDictKeys.class); this.state_0_ = target.getState(0, 20); this.factory_ = target.getReference(1, PythonObjectFactory.class); this.lenNode__field1_ = target.getReference(2, Node.class); this.getIter__field1_ = target.getReference(3, Node.class); this.lenNode_ = HashingStorageLenNodeGen.inline(InlineTarget.create(HashingStorageLen.class, state_0_.subUpdater(1, 4), lenNode__field1_)); this.getIter_ = HashingStorageGetIteratorNodeGen.inline(InlineTarget.create(HashingStorageGetIterator.class, state_0_.subUpdater(5, 4), getIter__field1_)); this.iterNext_ = HashingStorageIteratorNextNodeGen.inline(InlineTarget.create(HashingStorageIteratorNext.class, state_0_.subUpdater(9, 7))); this.iterKey_ = HashingStorageIteratorKeyNodeGen.inline(InlineTarget.create(HashingStorageIteratorKey.class, state_0_.subUpdater(16, 4))); } @Override public Object execute(Node arg0Value, PDict arg1Value) { int state_0 = this.state_0_.get(arg0Value); if ((state_0 & 0b1) != 0 /* is SpecializationActive[PyDictKeys.getString(Node, PDict, PythonObjectFactory, HashingStorageLen, HashingStorageGetIterator, HashingStorageIteratorNext, HashingStorageIteratorKey)] */) { { PythonObjectFactory factory__ = this.factory_.get(arg0Value); if (factory__ != null) { assert InlineSupport.validate(arg0Value, this.state_0_, this.lenNode__field1_, this.state_0_, this.getIter__field1_, this.state_0_, this.state_0_); return PyDictKeys.getString(arg0Value, arg1Value, factory__, this.lenNode_, this.getIter_, this.iterNext_, this.iterKey_); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arg0Value, arg1Value); } private Object executeAndSpecialize(Node arg0Value, PDict arg1Value) { int state_0 = this.state_0_.get(arg0Value); PythonObjectFactory factory__ = arg0Value.insert((PythonObjectFactory.create())); Objects.requireNonNull(factory__, "Specialization 'getString(Node, PDict, PythonObjectFactory, HashingStorageLen, HashingStorageGetIterator, HashingStorageIteratorNext, HashingStorageIteratorKey)' cache 'factory' 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.factory_.set(arg0Value, factory__); state_0 = state_0 | 0b1 /* add SpecializationActive[PyDictKeys.getString(Node, PDict, PythonObjectFactory, HashingStorageLen, HashingStorageGetIterator, HashingStorageIteratorNext, HashingStorageIteratorKey)] */; this.state_0_.set(arg0Value, state_0); assert InlineSupport.validate(arg0Value, this.state_0_, this.lenNode__field1_, this.state_0_, this.getIter__field1_, this.state_0_, this.state_0_); return PyDictKeys.getString(arg0Value, arg1Value, factory__, this.lenNode_, this.getIter_, this.iterNext_, this.iterKey_); } @Override public boolean isAdoptable() { return false; } } @GeneratedBy(PyDictKeys.class) @DenyReplace private static final class Uncached extends PyDictKeys { @TruffleBoundary @Override public Object execute(Node arg0Value, PDict arg1Value) { return PyDictKeys.getString(arg0Value, arg1Value, (PythonObjectFactory.getUncached()), (HashingStorageLenNodeGen.getUncached()), (HashingStorageGetIteratorNodeGen.getUncached()), (HashingStorageIteratorNextNodeGen.getUncached()), (HashingStorageIteratorKeyNodeGen.getUncached())); } @Override public NodeCost getCost() { return NodeCost.MEGAMORPHIC; } @Override public boolean isAdoptable() { return false; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy