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

org.pkl.thirdparty.truffle.polyglot.PolyglotObjectProxyHandlerFactory Maven / Gradle / Ivy

Go to download

Shaded fat Jar for pkl-config-java, a Java config library based on the Pkl config language.

There is a newer version: 0.27.1
Show newest version
// CheckStyle: start generated
package org.pkl.thirdparty.truffle.polyglot;

import org.pkl.thirdparty.truffle.api.CompilerDirectives;
import org.pkl.thirdparty.truffle.api.CompilerDirectives.CompilationFinal;
import org.pkl.thirdparty.truffle.api.CompilerDirectives.TruffleBoundary;
import org.pkl.thirdparty.truffle.api.dsl.GeneratedBy;
import org.pkl.thirdparty.truffle.api.dsl.NeverDefault;
import org.pkl.thirdparty.truffle.api.dsl.UnsupportedSpecializationException;
import org.pkl.thirdparty.truffle.api.dsl.InlineSupport.InlineTarget;
import org.pkl.thirdparty.truffle.api.dsl.InlineSupport.ReferenceField;
import org.pkl.thirdparty.truffle.api.dsl.InlineSupport.StateField;
import org.pkl.thirdparty.truffle.api.dsl.InlineSupport.UnsafeAccessedField;
import org.pkl.thirdparty.truffle.api.interop.InteropLibrary;
import org.pkl.thirdparty.truffle.api.library.LibraryFactory;
import org.pkl.thirdparty.truffle.api.nodes.DenyReplace;
import org.pkl.thirdparty.truffle.api.nodes.EncapsulatingNodeReference;
import org.pkl.thirdparty.truffle.api.nodes.ExplodeLoop;
import org.pkl.thirdparty.truffle.api.nodes.Node;
import org.pkl.thirdparty.truffle.api.nodes.NodeCost;
import org.pkl.thirdparty.truffle.api.profiles.InlinedBranchProfile;
import org.pkl.thirdparty.truffle.api.profiles.InlinedConditionProfile;
import org.pkl.thirdparty.truffle.polyglot.PolyglotLanguageContext.ToGuestValuesNode;
import org.pkl.thirdparty.truffle.polyglot.PolyglotLanguageContextFactory.ToGuestValuesNodeGen;
import org.pkl.thirdparty.truffle.polyglot.PolyglotObjectProxyHandler.ObjectProxyNode;
import org.pkl.thirdparty.truffle.polyglot.PolyglotObjectProxyHandler.ProxyInvokeNode;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.lang.invoke.MethodHandles.Lookup;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.Objects;

@GeneratedBy(PolyglotObjectProxyHandler.class)
@SuppressWarnings({"javadoc", "unused"})
final class PolyglotObjectProxyHandlerFactory {

    private static final LibraryFactory INTEROP_LIBRARY_ = LibraryFactory.resolve(InteropLibrary.class);

    /**
     * Debug Info: 
     *   Specialization {@link ObjectProxyNode#doDefault}
     *     Activation probability: 1.00000
     *     With/without class size: 36/13 bytes
     * 
*/ @GeneratedBy(ObjectProxyNode.class) @SuppressWarnings("javadoc") static final class ObjectProxyNodeGen extends ObjectProxyNode { private static final StateField STATE_0_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_"); /** * Source Info:
         *   Specialization: {@link ObjectProxyNode#doDefault}
         *   Parameter: {@link ToGuestValuesNode} toGuests
         *   Inline method: {@link ToGuestValuesNodeGen#inline}
*/ private static final ToGuestValuesNode INLINED_TO_GUESTS_ = ToGuestValuesNodeGen.inline(InlineTarget.create(ToGuestValuesNode.class, STATE_0_UPDATER.subUpdater(1, 7), ReferenceField.create(MethodHandles.lookup(), "toGuests__field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "toGuests__field2_", Object.class))); /** * State Info:
         *   0: SpecializationActive {@link ObjectProxyNode#doDefault}
         *   1-7: InlinedCache
         *        Specialization: {@link ObjectProxyNode#doDefault}
         *        Parameter: {@link ToGuestValuesNode} toGuests
         *        Inline method: {@link ToGuestValuesNodeGen#inline}
         * 
*/ @CompilationFinal @UnsafeAccessedField private int state_0_; /** * Source Info:
         *   Specialization: {@link ObjectProxyNode#doDefault}
         *   Parameter: {@link ProxyInvokeNode} proxyInvoke
*/ @Child private ProxyInvokeNode proxyInvoke_; /** * Source Info:
         *   Specialization: {@link ObjectProxyNode#doDefault}
         *   Parameter: {@link ToGuestValuesNode} toGuests
         *   Inline method: {@link ToGuestValuesNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node toGuests__field1_; /** * Source Info:
         *   Specialization: {@link ObjectProxyNode#doDefault}
         *   Parameter: {@link ToGuestValuesNode} toGuests
         *   Inline method: {@link ToGuestValuesNodeGen#inline}
         *   Inline field: {@link Object} field2
*/ @CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object toGuests__field2_; private ObjectProxyNodeGen(PolyglotLanguageInstance languageInstance, Class receiverType, Class interfaceType) { super(languageInstance, receiverType, interfaceType); } @Override protected Object executeImpl(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) { int state_0 = this.state_0_; if ((state_0 & 0b1) != 0 /* is SpecializationActive[PolyglotObjectProxyHandler.ObjectProxyNode.doDefault(PolyglotLanguageContext, Object, Object[], Node, ProxyInvokeNode, ToGuestValuesNode)] */) { { ProxyInvokeNode proxyInvoke__ = this.proxyInvoke_; if (proxyInvoke__ != null) { Node node__ = (this); return ObjectProxyNode.doDefault(arg0Value, arg1Value, arg2Value, node__, proxyInvoke__, INLINED_TO_GUESTS_); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arg0Value, arg1Value, arg2Value); } private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Object[] arg2Value) { int state_0 = this.state_0_; { Node node__ = null; node__ = (this); ProxyInvokeNode proxyInvoke__ = this.insert((ProxyInvokeNodeGen.create())); Objects.requireNonNull(proxyInvoke__, "Specialization 'doDefault(PolyglotLanguageContext, Object, Object[], Node, ProxyInvokeNode, ToGuestValuesNode)' cache 'proxyInvoke' 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.proxyInvoke_ = proxyInvoke__; state_0 = state_0 | 0b1 /* add SpecializationActive[PolyglotObjectProxyHandler.ObjectProxyNode.doDefault(PolyglotLanguageContext, Object, Object[], Node, ProxyInvokeNode, ToGuestValuesNode)] */; this.state_0_ = state_0; return ObjectProxyNode.doDefault(arg0Value, arg1Value, arg2Value, node__, proxyInvoke__, INLINED_TO_GUESTS_); } } @Override public NodeCost getCost() { int state_0 = this.state_0_; if ((state_0 & 0b1) == 0) { return NodeCost.UNINITIALIZED; } else { return NodeCost.MONOMORPHIC; } } @NeverDefault public static ObjectProxyNode create(PolyglotLanguageInstance languageInstance, Class receiverType, Class interfaceType) { return new ObjectProxyNodeGen(languageInstance, receiverType, interfaceType); } } /** * Debug Info:
     *   Specialization {@link ProxyInvokeNode#doCachedMethod}
     *     Activation probability: 0.65000
     *     With/without class size: 40/33 bytes
     *   Specialization {@link ProxyInvokeNode#doCachedMethod}
     *     Activation probability: 0.35000
     *     With/without class size: 22/29 bytes
     * 
*/ @GeneratedBy(ProxyInvokeNode.class) @SuppressWarnings("javadoc") static final class ProxyInvokeNodeGen extends ProxyInvokeNode { private static final StateField CACHED_METHOD0_CACHED_METHOD0_STATE_0_UPDATER = StateField.create(CachedMethod0Data.lookup_(), "cachedMethod0_state_0_"); private static final StateField CACHED_METHOD1_CACHED_METHOD1_STATE_0_UPDATER = StateField.create(CachedMethod1Data.lookup_(), "cachedMethod1_state_0_"); static final ReferenceField CACHED_METHOD0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cachedMethod0_cache", CachedMethod0Data.class); static final ReferenceField CACHED_METHOD1_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cachedMethod1_cache", CachedMethod1Data.class); /** * Source Info:
         *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
         *   Parameter: {@link InlinedConditionProfile} branchProfile
         *   Inline method: {@link InlinedConditionProfile#inline}
*/ private static final InlinedConditionProfile INLINED_CACHED_METHOD0_BRANCH_PROFILE_ = InlinedConditionProfile.inline(InlineTarget.create(InlinedConditionProfile.class, CACHED_METHOD0_CACHED_METHOD0_STATE_0_UPDATER.subUpdater(0, 2))); /** * Source Info:
         *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
         *   Parameter: {@link PolyglotToHostNode} toHost
         *   Inline method: {@link PolyglotToHostNodeGen#inline}
*/ private static final PolyglotToHostNode INLINED_CACHED_METHOD0_TO_HOST_ = PolyglotToHostNodeGen.inline(InlineTarget.create(PolyglotToHostNode.class, CACHED_METHOD0_CACHED_METHOD0_STATE_0_UPDATER.subUpdater(2, 4), ReferenceField.create(CachedMethod0Data.lookup_(), "cachedMethod0_toHost__field1_", Object.class), ReferenceField.create(CachedMethod0Data.lookup_(), "cachedMethod0_toHost__field2_", Node.class))); /** * Source Info:
         *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
         *   Parameter: {@link InlinedBranchProfile} error
         *   Inline method: {@link InlinedBranchProfile#inline}
*/ private static final InlinedBranchProfile INLINED_CACHED_METHOD0_ERROR_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED_METHOD0_CACHED_METHOD0_STATE_0_UPDATER.subUpdater(6, 1))); /** * Source Info:
         *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
         *   Parameter: {@link InlinedConditionProfile} branchProfile
         *   Inline method: {@link InlinedConditionProfile#inline}
*/ private static final InlinedConditionProfile INLINED_CACHED_METHOD1_BRANCH_PROFILE_ = InlinedConditionProfile.inline(InlineTarget.create(InlinedConditionProfile.class, CACHED_METHOD1_CACHED_METHOD1_STATE_0_UPDATER.subUpdater(0, 2))); /** * Source Info:
         *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
         *   Parameter: {@link PolyglotToHostNode} toHost
         *   Inline method: {@link PolyglotToHostNodeGen#inline}
*/ private static final PolyglotToHostNode INLINED_CACHED_METHOD1_TO_HOST_ = PolyglotToHostNodeGen.inline(InlineTarget.create(PolyglotToHostNode.class, CACHED_METHOD1_CACHED_METHOD1_STATE_0_UPDATER.subUpdater(2, 4), ReferenceField.create(CachedMethod1Data.lookup_(), "cachedMethod1_toHost__field1_", Object.class), ReferenceField.create(CachedMethod1Data.lookup_(), "cachedMethod1_toHost__field2_", Node.class))); /** * Source Info:
         *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
         *   Parameter: {@link InlinedBranchProfile} error
         *   Inline method: {@link InlinedBranchProfile#inline}
*/ private static final InlinedBranchProfile INLINED_CACHED_METHOD1_ERROR_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, CACHED_METHOD1_CACHED_METHOD1_STATE_0_UPDATER.subUpdater(6, 1))); /** * State Info:
         *   0: SpecializationActive {@link ProxyInvokeNode#doCachedMethod}
         *   1: SpecializationActive {@link ProxyInvokeNode#doCachedMethod}
         * 
*/ @CompilationFinal private int state_0_; @UnsafeAccessedField @Child private CachedMethod0Data cachedMethod0_cache; @UnsafeAccessedField @Child private CachedMethod1Data cachedMethod1_cache; private ProxyInvokeNodeGen() { } @ExplodeLoop @Override public Object execute(PolyglotLanguageContext arg0Value, Object arg1Value, Method arg2Value, Object[] arg3Value) { int state_0 = this.state_0_; if (state_0 != 0 /* is SpecializationActive[PolyglotObjectProxyHandler.ProxyInvokeNode.doCachedMethod(PolyglotLanguageContext, Object, Method, Object[], Node, Method, String, Class<>, Type, InteropLibrary, InteropLibrary, InlinedConditionProfile, PolyglotToHostNode, InlinedBranchProfile)] || SpecializationActive[PolyglotObjectProxyHandler.ProxyInvokeNode.doCachedMethod(PolyglotLanguageContext, Object, Method, Object[], Node, Method, String, Class<>, Type, InteropLibrary, InteropLibrary, InlinedConditionProfile, PolyglotToHostNode, InlinedBranchProfile)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[PolyglotObjectProxyHandler.ProxyInvokeNode.doCachedMethod(PolyglotLanguageContext, Object, Method, Object[], Node, Method, String, Class<>, Type, InteropLibrary, InteropLibrary, InlinedConditionProfile, PolyglotToHostNode, InlinedBranchProfile)] */) { CachedMethod0Data s0_ = this.cachedMethod0_cache; while (s0_ != null) { if ((s0_.receivers_.accepts(arg1Value)) && (s0_.cachedMethod_ == arg2Value)) { Node node__ = (s0_); return doCachedMethod(arg0Value, arg1Value, arg2Value, arg3Value, node__, s0_.cachedMethod_, s0_.name_, s0_.returnClass_, s0_.returnType_, s0_.receivers_, s0_.members_, INLINED_CACHED_METHOD0_BRANCH_PROFILE_, INLINED_CACHED_METHOD0_TO_HOST_, INLINED_CACHED_METHOD0_ERROR_); } s0_ = s0_.next_; } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[PolyglotObjectProxyHandler.ProxyInvokeNode.doCachedMethod(PolyglotLanguageContext, Object, Method, Object[], Node, Method, String, Class<>, Type, InteropLibrary, InteropLibrary, InlinedConditionProfile, PolyglotToHostNode, InlinedBranchProfile)] */) { CachedMethod1Data s1_ = this.cachedMethod1_cache; while (s1_ != null) { if ((s1_.cachedMethod_ == arg2Value)) { return this.cachedMethod1Boundary(state_0, s1_, arg0Value, arg1Value, arg2Value, arg3Value); } s1_ = s1_.next_; } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arg0Value, arg1Value, arg2Value, arg3Value); } @SuppressWarnings("static-method") @TruffleBoundary private Object cachedMethod1Boundary(int state_0, CachedMethod1Data s1_, PolyglotLanguageContext arg0Value, Object arg1Value, Method arg2Value, Object[] arg3Value) { EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent(); Node prev_ = encapsulating_.set(this); try { { Node node__ = (s1_); InteropLibrary receivers__ = (INTEROP_LIBRARY_.getUncached(arg1Value)); return doCachedMethod(arg0Value, arg1Value, arg2Value, arg3Value, node__, s1_.cachedMethod_, s1_.name_, s1_.returnClass_, s1_.returnType_, receivers__, s1_.members_, INLINED_CACHED_METHOD1_BRANCH_PROFILE_, INLINED_CACHED_METHOD1_TO_HOST_, INLINED_CACHED_METHOD1_ERROR_); } } finally { encapsulating_.set(prev_); } } private Object executeAndSpecialize(PolyglotLanguageContext arg0Value, Object arg1Value, Method arg2Value, Object[] arg3Value) { int state_0 = this.state_0_; { Node node__ = null; if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[PolyglotObjectProxyHandler.ProxyInvokeNode.doCachedMethod(PolyglotLanguageContext, Object, Method, Object[], Node, Method, String, Class<>, Type, InteropLibrary, InteropLibrary, InlinedConditionProfile, PolyglotToHostNode, InlinedBranchProfile)] */) { while (true) { int count0_ = 0; CachedMethod0Data s0_ = CACHED_METHOD0_CACHE_UPDATER.getVolatile(this); CachedMethod0Data s0_original = s0_; while (s0_ != null) { if ((s0_.receivers_.accepts(arg1Value)) && (s0_.cachedMethod_ == arg2Value)) { node__ = (s0_); break; } count0_++; s0_ = s0_.next_; } if (s0_ == null) { // assert (s0_.receivers_.accepts(arg1Value)); // assert (s0_.cachedMethod_ == arg2Value); if (count0_ < (ProxyInvokeNode.LIMIT)) { s0_ = this.insert(new CachedMethod0Data(s0_original)); node__ = (s0_); s0_.cachedMethod_ = (arg2Value); s0_.name_ = (arg2Value.getName()); Class returnClass__ = (ProxyInvokeNode.getMethodReturnType(arg2Value)); Objects.requireNonNull(returnClass__, "Specialization 'doCachedMethod(PolyglotLanguageContext, Object, Method, Object[], Node, Method, String, Class<>, Type, InteropLibrary, InteropLibrary, InlinedConditionProfile, PolyglotToHostNode, InlinedBranchProfile)' cache 'returnClass' 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_.returnClass_ = returnClass__; Type returnType__ = (ProxyInvokeNode.getMethodGenericReturnType(arg2Value)); Objects.requireNonNull(returnType__, "Specialization 'doCachedMethod(PolyglotLanguageContext, Object, Method, Object[], Node, Method, String, Class<>, Type, InteropLibrary, InteropLibrary, InlinedConditionProfile, PolyglotToHostNode, InlinedBranchProfile)' cache 'returnType' 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_.returnType_ = returnType__; InteropLibrary receivers__ = s0_.insert((INTEROP_LIBRARY_.create(arg1Value))); Objects.requireNonNull(receivers__, "Specialization 'doCachedMethod(PolyglotLanguageContext, Object, Method, Object[], Node, Method, String, Class<>, Type, InteropLibrary, InteropLibrary, InlinedConditionProfile, PolyglotToHostNode, InlinedBranchProfile)' cache 'receivers' 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_.receivers_ = receivers__; InteropLibrary members__ = s0_.insert((INTEROP_LIBRARY_.createDispatched(ProxyInvokeNode.LIMIT))); Objects.requireNonNull(members__, "Specialization 'doCachedMethod(PolyglotLanguageContext, Object, Method, Object[], Node, Method, String, Class<>, Type, InteropLibrary, InteropLibrary, InlinedConditionProfile, PolyglotToHostNode, InlinedBranchProfile)' cache 'members' 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_.members_ = members__; if (!CACHED_METHOD0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) { continue; } state_0 = state_0 | 0b1 /* add SpecializationActive[PolyglotObjectProxyHandler.ProxyInvokeNode.doCachedMethod(PolyglotLanguageContext, Object, Method, Object[], Node, Method, String, Class<>, Type, InteropLibrary, InteropLibrary, InlinedConditionProfile, PolyglotToHostNode, InlinedBranchProfile)] */; this.state_0_ = state_0; } } if (s0_ != null) { return doCachedMethod(arg0Value, arg1Value, arg2Value, arg3Value, node__, s0_.cachedMethod_, s0_.name_, s0_.returnClass_, s0_.returnType_, s0_.receivers_, s0_.members_, INLINED_CACHED_METHOD0_BRANCH_PROFILE_, INLINED_CACHED_METHOD0_TO_HOST_, INLINED_CACHED_METHOD0_ERROR_); } break; } } } { InteropLibrary receivers__ = null; Node node__ = null; { EncapsulatingNodeReference encapsulating_ = EncapsulatingNodeReference.getCurrent(); Node prev_ = encapsulating_.set(this); try { while (true) { int count1_ = 0; CachedMethod1Data s1_ = CACHED_METHOD1_CACHE_UPDATER.getVolatile(this); CachedMethod1Data s1_original = s1_; while (s1_ != null) { if ((s1_.cachedMethod_ == arg2Value)) { node__ = (s1_); receivers__ = (INTEROP_LIBRARY_.getUncached(arg1Value)); break; } count1_++; s1_ = s1_.next_; } if (s1_ == null) { // assert (s1_.cachedMethod_ == arg2Value); if (count1_ < (ProxyInvokeNode.LIMIT)) { s1_ = this.insert(new CachedMethod1Data(s1_original)); node__ = (s1_); s1_.cachedMethod_ = (arg2Value); s1_.name_ = (arg2Value.getName()); Class returnClass__ = (ProxyInvokeNode.getMethodReturnType(arg2Value)); Objects.requireNonNull(returnClass__, "Specialization 'doCachedMethod(PolyglotLanguageContext, Object, Method, Object[], Node, Method, String, Class<>, Type, InteropLibrary, InteropLibrary, InlinedConditionProfile, PolyglotToHostNode, InlinedBranchProfile)' cache 'returnClass' 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_.returnClass_ = returnClass__; Type returnType__ = (ProxyInvokeNode.getMethodGenericReturnType(arg2Value)); Objects.requireNonNull(returnType__, "Specialization 'doCachedMethod(PolyglotLanguageContext, Object, Method, Object[], Node, Method, String, Class<>, Type, InteropLibrary, InteropLibrary, InlinedConditionProfile, PolyglotToHostNode, InlinedBranchProfile)' cache 'returnType' 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_.returnType_ = returnType__; receivers__ = (INTEROP_LIBRARY_.getUncached(arg1Value)); InteropLibrary members__ = s1_.insert((INTEROP_LIBRARY_.createDispatched(ProxyInvokeNode.LIMIT))); Objects.requireNonNull(members__, "Specialization 'doCachedMethod(PolyglotLanguageContext, Object, Method, Object[], Node, Method, String, Class<>, Type, InteropLibrary, InteropLibrary, InlinedConditionProfile, PolyglotToHostNode, InlinedBranchProfile)' cache 'members' 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_.members_ = members__; if (!CACHED_METHOD1_CACHE_UPDATER.compareAndSet(this, s1_original, s1_)) { continue; } this.cachedMethod0_cache = null; state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[PolyglotObjectProxyHandler.ProxyInvokeNode.doCachedMethod(PolyglotLanguageContext, Object, Method, Object[], Node, Method, String, Class<>, Type, InteropLibrary, InteropLibrary, InlinedConditionProfile, PolyglotToHostNode, InlinedBranchProfile)] */; state_0 = state_0 | 0b10 /* add SpecializationActive[PolyglotObjectProxyHandler.ProxyInvokeNode.doCachedMethod(PolyglotLanguageContext, Object, Method, Object[], Node, Method, String, Class<>, Type, InteropLibrary, InteropLibrary, InlinedConditionProfile, PolyglotToHostNode, InlinedBranchProfile)] */; this.state_0_ = state_0; } } if (s1_ != null) { return doCachedMethod(arg0Value, arg1Value, arg2Value, arg3Value, node__, s1_.cachedMethod_, s1_.name_, s1_.returnClass_, s1_.returnType_, receivers__, s1_.members_, INLINED_CACHED_METHOD1_BRANCH_PROFILE_, INLINED_CACHED_METHOD1_TO_HOST_, INLINED_CACHED_METHOD1_ERROR_); } break; } } finally { encapsulating_.set(prev_); } } } throw new UnsupportedSpecializationException(this, new Node[] {null, null, null, null}, arg0Value, arg1Value, arg2Value, arg3Value); } @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 */) { CachedMethod0Data s0_ = this.cachedMethod0_cache; CachedMethod1Data s1_ = this.cachedMethod1_cache; if ((s0_ == null || s0_.next_ == null) && (s1_ == null || s1_.next_ == null)) { return NodeCost.MONOMORPHIC; } } } return NodeCost.POLYMORPHIC; } @NeverDefault public static ProxyInvokeNode create() { return new ProxyInvokeNodeGen(); } @GeneratedBy(ProxyInvokeNode.class) @DenyReplace private static final class CachedMethod0Data extends Node { @Child CachedMethod0Data next_; /** * State Info:
             *   0-1: InlinedCache
             *        Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *        Parameter: {@link InlinedConditionProfile} branchProfile
             *        Inline method: {@link InlinedConditionProfile#inline}
             *   2-5: InlinedCache
             *        Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *        Parameter: {@link PolyglotToHostNode} toHost
             *        Inline method: {@link PolyglotToHostNodeGen#inline}
             *   6: InlinedCache
             *        Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *        Parameter: {@link InlinedBranchProfile} error
             *        Inline method: {@link InlinedBranchProfile#inline}
             * 
*/ @CompilationFinal @UnsafeAccessedField private int cachedMethod0_state_0_; /** * Source Info:
             *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *   Parameter: {@link Method} cachedMethod
*/ @CompilationFinal Method cachedMethod_; /** * Source Info:
             *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *   Parameter: {@link String} name
*/ @CompilationFinal String name_; /** * Source Info:
             *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *   Parameter: {@link Class} returnClass
*/ @CompilationFinal Class returnClass_; /** * Source Info:
             *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *   Parameter: {@link Type} returnType
*/ @CompilationFinal Type returnType_; /** * Source Info:
             *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *   Parameter: {@link InteropLibrary} receivers
*/ @Child InteropLibrary receivers_; /** * Source Info:
             *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *   Parameter: {@link InteropLibrary} members
*/ @Child InteropLibrary members_; /** * Source Info:
             *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *   Parameter: {@link PolyglotToHostNode} toHost
             *   Inline method: {@link PolyglotToHostNodeGen#inline}
             *   Inline field: {@link Object} field1
*/ @CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cachedMethod0_toHost__field1_; /** * Source Info:
             *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *   Parameter: {@link PolyglotToHostNode} toHost
             *   Inline method: {@link PolyglotToHostNodeGen#inline}
             *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node cachedMethod0_toHost__field2_; CachedMethod0Data(CachedMethod0Data next_) { this.next_ = next_; } @Override public NodeCost getCost() { return NodeCost.NONE; } private static Lookup lookup_() { return MethodHandles.lookup(); } } @GeneratedBy(ProxyInvokeNode.class) @DenyReplace private static final class CachedMethod1Data extends Node { @Child CachedMethod1Data next_; /** * State Info:
             *   0-1: InlinedCache
             *        Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *        Parameter: {@link InlinedConditionProfile} branchProfile
             *        Inline method: {@link InlinedConditionProfile#inline}
             *   2-5: InlinedCache
             *        Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *        Parameter: {@link PolyglotToHostNode} toHost
             *        Inline method: {@link PolyglotToHostNodeGen#inline}
             *   6: InlinedCache
             *        Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *        Parameter: {@link InlinedBranchProfile} error
             *        Inline method: {@link InlinedBranchProfile#inline}
             * 
*/ @CompilationFinal @UnsafeAccessedField private int cachedMethod1_state_0_; /** * Source Info:
             *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *   Parameter: {@link Method} cachedMethod
*/ @CompilationFinal Method cachedMethod_; /** * Source Info:
             *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *   Parameter: {@link String} name
*/ @CompilationFinal String name_; /** * Source Info:
             *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *   Parameter: {@link Class} returnClass
*/ @CompilationFinal Class returnClass_; /** * Source Info:
             *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *   Parameter: {@link Type} returnType
*/ @CompilationFinal Type returnType_; /** * Source Info:
             *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *   Parameter: {@link InteropLibrary} members
*/ @Child InteropLibrary members_; /** * Source Info:
             *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *   Parameter: {@link PolyglotToHostNode} toHost
             *   Inline method: {@link PolyglotToHostNodeGen#inline}
             *   Inline field: {@link Object} field1
*/ @CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private Object cachedMethod1_toHost__field1_; /** * Source Info:
             *   Specialization: {@link ProxyInvokeNode#doCachedMethod}
             *   Parameter: {@link PolyglotToHostNode} toHost
             *   Inline method: {@link PolyglotToHostNodeGen#inline}
             *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node cachedMethod1_toHost__field2_; CachedMethod1Data(CachedMethod1Data next_) { this.next_ = next_; } @Override public NodeCost getCost() { return NodeCost.NONE; } private static Lookup lookup_() { return MethodHandles.lookup(); } } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy