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

com.oracle.graal.python.nodes.util.LazyInteropLibraryNodeGen Maven / Gradle / Ivy

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

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.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.interop.InteropLibrary;
import com.oracle.truffle.api.library.LibraryFactory;
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 LazyInteropLibrary#doIt}
 *     Activation probability: 1.00000
 *     With/without class size: 24/4 bytes
 * 
*/ @GeneratedBy(LazyInteropLibrary.class) @SuppressWarnings("javadoc") public final class LazyInteropLibraryNodeGen { private static final Uncached UNCACHED = new Uncached(); private static final LibraryFactory INTEROP_LIBRARY_ = LibraryFactory.resolve(InteropLibrary.class); @NeverDefault public static LazyInteropLibrary getUncached() { return LazyInteropLibraryNodeGen.UNCACHED; } /** * Required Fields:
    *
  • {@link Inlined#state_0_} *
  • {@link Inlined#lib_} *
*/ @NeverDefault public static LazyInteropLibrary inline(@RequiredField(bits = 1, value = StateField.class)@RequiredField(type = Node.class, value = ReferenceField.class) InlineTarget target) { return new LazyInteropLibraryNodeGen.Inlined(target); } @GeneratedBy(LazyInteropLibrary.class) @DenyReplace private static final class Inlined extends LazyInteropLibrary { /** * State Info:
         *   0: SpecializationActive {@link LazyInteropLibrary#doIt}
         * 
*/ private final StateField state_0_; private final ReferenceField lib_; @SuppressWarnings("unchecked") private Inlined(InlineTarget target) { assert target.getTargetClass().isAssignableFrom(LazyInteropLibrary.class); this.state_0_ = target.getState(0, 1); this.lib_ = target.getReference(1, InteropLibrary.class); } @Override InteropLibrary execute(Node arg0Value) { int state_0 = this.state_0_.get(arg0Value); if (state_0 != 0 /* is SpecializationActive[LazyInteropLibrary.doIt(InteropLibrary)] */) { { InteropLibrary lib__ = this.lib_.get(arg0Value); if (lib__ != null) { return LazyInteropLibrary.doIt(lib__); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arg0Value); } private InteropLibrary executeAndSpecialize(Node arg0Value) { int state_0 = this.state_0_.get(arg0Value); InteropLibrary lib__ = arg0Value.insert((INTEROP_LIBRARY_.createDispatched(3))); Objects.requireNonNull(lib__, "Specialization 'doIt(InteropLibrary)' cache 'lib' 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.lib_.set(arg0Value, lib__); state_0 = state_0 | 0b1 /* add SpecializationActive[LazyInteropLibrary.doIt(InteropLibrary)] */; this.state_0_.set(arg0Value, state_0); return LazyInteropLibrary.doIt(lib__); } @Override public boolean isAdoptable() { return false; } } @GeneratedBy(LazyInteropLibrary.class) @DenyReplace private static final class Uncached extends LazyInteropLibrary { @TruffleBoundary @Override InteropLibrary execute(Node arg0Value) { return LazyInteropLibrary.doIt((INTEROP_LIBRARY_.getUncached())); } @Override public NodeCost getCost() { return NodeCost.MEGAMORPHIC; } @Override public boolean isAdoptable() { return false; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy