com.oracle.graal.python.runtime.interop.PythonScopesGen Maven / Gradle / Ivy
// CheckStyle: start generated
package com.oracle.graal.python.runtime.interop;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.TruffleLanguage;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.dsl.InlineSupport.InlineTarget;
import com.oracle.truffle.api.dsl.InlineSupport.IntField;
import com.oracle.truffle.api.dsl.InlineSupport.StateField;
import com.oracle.truffle.api.dsl.InlineSupport.UnsafeAccessedField;
import com.oracle.truffle.api.interop.InteropLibrary;
import com.oracle.truffle.api.interop.UnknownIdentifierException;
import com.oracle.truffle.api.interop.UnsupportedMessageException;
import com.oracle.truffle.api.interop.UnsupportedTypeException;
import com.oracle.truffle.api.library.DynamicDispatchLibrary;
import com.oracle.truffle.api.library.LibraryExport;
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 com.oracle.truffle.api.profiles.InlinedIntValueProfile;
import com.oracle.truffle.api.source.SourceSection;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.util.Objects;
@GeneratedBy(PythonScopes.class)
@SuppressWarnings("javadoc")
final class PythonScopesGen {
private static final LibraryFactory DYNAMIC_DISPATCH_LIBRARY_ = LibraryFactory.resolve(DynamicDispatchLibrary.class);
private static final LibraryFactory INTEROP_LIBRARY_ = LibraryFactory.resolve(InteropLibrary.class);
static {
LibraryExport.register(PythonScopes.class, new InteropLibraryExports());
}
private PythonScopesGen() {
}
@GeneratedBy(PythonScopes.class)
private static final class InteropLibraryExports extends LibraryExport {
private InteropLibraryExports() {
super(InteropLibrary.class, PythonScopes.class, false, false, 0);
}
@Override
protected InteropLibrary createUncached(Object receiver) {
assert receiver instanceof PythonScopes;
InteropLibrary uncached = new Uncached();
return uncached;
}
@Override
protected InteropLibrary createCached(Object receiver) {
assert receiver instanceof PythonScopes;
return new Cached();
}
@GeneratedBy(PythonScopes.class)
private static final class Cached extends InteropLibrary {
private static final StateField STATE_0_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
/**
* Source Info:
* Specialization: {@link PythonScopes#hasMembers}
* Parameter: {@link InlinedIntValueProfile} lengthProfile
* Inline method: {@link InlinedIntValueProfile#inline}
*/
private static final InlinedIntValueProfile INLINED_LENGHT_PROFILE = InlinedIntValueProfile.inline(InlineTarget.create(InlinedIntValueProfile.class, STATE_0_UPDATER.subUpdater(10, 2), IntField.create(MethodHandles.lookup(), "lenghtProfile_field1_")));
/**
* State Info:
* 0: SpecializationActive {@link PythonScopes#hasSourceLocation(PythonScopes, InteropLibrary)}
* 1: SpecializationActive {@link PythonScopes#getSourceLocation(PythonScopes, InteropLibrary)}
* 2: SpecializationActive {@link PythonScopes#hasMembers(PythonScopes, Node, InteropLibrary, InlinedIntValueProfile)}
* 3: SpecializationActive {@link PythonScopes#getMembers(PythonScopes, boolean, Node, InteropLibrary, InlinedIntValueProfile)}
* 4: SpecializationActive {@link PythonScopes#isMemberReadable(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)}
* 5: SpecializationActive {@link PythonScopes#readMember(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)}
* 6: SpecializationActive {@link PythonScopes#writeMember(PythonScopes, String, Object, Node, InteropLibrary, InlinedIntValueProfile)}
* 7: SpecializationActive {@link PythonScopes#isMemberModifiable(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)}
* 8: SpecializationActive {@link PythonScopes#isMemberInsertable(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)}
* 9: SpecializationActive {@link PythonScopes#toDisplayString(PythonScopes, boolean, InteropLibrary)}
* 10-11: InlinedCache
* Specialization: {@link PythonScopes#hasMembers}
* Parameter: {@link InlinedIntValueProfile} lengthProfile
* Inline method: {@link InlinedIntValueProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
/**
* Source Info:
* Specialization: {@link PythonScopes#hasSourceLocation}
* Parameter: {@link InteropLibrary} lib
*/
@Child private InteropLibrary sourceInterop;
/**
* Source Info:
* Specialization: {@link PythonScopes#hasMembers}
* Parameter: {@link InteropLibrary} interop
*/
@Child private InteropLibrary interop;
/**
* Source Info:
* Specialization: {@link PythonScopes#hasMembers}
* Parameter: {@link InlinedIntValueProfile} lengthProfile
* Inline method: {@link InlinedIntValueProfile#inline}
* Inline field: int field1
*/
@CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private int lenghtProfile_field1_;
/**
* Source Info:
* Specialization: {@link PythonScopes#toDisplayString(PythonScopes, boolean, InteropLibrary)}
* Parameter: {@link InteropLibrary} lib
*/
@Child private InteropLibrary toDisplayStringNode__toDisplayString_lib_;
protected Cached() {
}
@Override
public boolean accepts(Object receiver) {
assert !(receiver instanceof PythonScopes) || DYNAMIC_DISPATCH_LIBRARY_.getUncached().dispatch(receiver) == null : "Invalid library export. Exported receiver with dynamic dispatch found but not expected.";
return receiver instanceof PythonScopes;
}
@Override
public boolean isScope(Object receiver) {
assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver.";
assert assertAdopted();
return (((PythonScopes) receiver)).isScope();
}
@Override
public boolean hasScopeParent(Object receiver) {
assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver.";
assert assertAdopted();
return (((PythonScopes) receiver)).hasScopeParent();
}
@Override
public Object getScopeParent(Object receiver) throws UnsupportedMessageException {
assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver.";
assert assertAdopted();
return (((PythonScopes) receiver)).getScopeParent();
}
/**
* Debug Info:
* Specialization {@link PythonScopes#hasSourceLocation(PythonScopes, InteropLibrary)}
* Activation probability: 0.10000
* With/without class size: 5/0 bytes
*
*/
@Override
public boolean hasSourceLocation(Object arg0Value_) {
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
assert assertAdopted();
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
int state_0 = this.state_0_;
if ((state_0 & 0b1) != 0 /* is SpecializationActive[PythonScopes.hasSourceLocation(PythonScopes, InteropLibrary)] */) {
{
InteropLibrary sourceInterop_ = this.sourceInterop;
if (sourceInterop_ != null) {
return arg0Value.hasSourceLocation(sourceInterop_);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return hasSourceLocationNode_AndSpecialize(arg0Value);
}
private boolean hasSourceLocationNode_AndSpecialize(PythonScopes arg0Value) {
int state_0 = this.state_0_;
InteropLibrary sourceInterop_;
InteropLibrary sourceInterop__shared = this.sourceInterop;
if (sourceInterop__shared != null) {
sourceInterop_ = sourceInterop__shared;
} else {
sourceInterop_ = this.insert((INTEROP_LIBRARY_.createDispatched(1)));
if (sourceInterop_ == null) {
throw new IllegalStateException("Specialization 'hasSourceLocation(PythonScopes, InteropLibrary)' contains a shared cache with name 'lib' 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.sourceInterop == null) {
VarHandle.storeStoreFence();
this.sourceInterop = sourceInterop_;
}
state_0 = state_0 | 0b1 /* add SpecializationActive[PythonScopes.hasSourceLocation(PythonScopes, InteropLibrary)] */;
this.state_0_ = state_0;
return arg0Value.hasSourceLocation(sourceInterop_);
}
@Override
public NodeCost getCost() {
int state_0 = this.state_0_;
if ((state_0 & 0b1) == 0) {
return NodeCost.UNINITIALIZED;
} else {
return NodeCost.MONOMORPHIC;
}
}
/**
* Debug Info:
* Specialization {@link PythonScopes#getSourceLocation(PythonScopes, InteropLibrary)}
* Activation probability: 0.10000
* With/without class size: 5/0 bytes
*
*/
@Override
public SourceSection getSourceLocation(Object arg0Value_) throws UnsupportedMessageException {
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
assert assertAdopted();
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
int state_0 = this.state_0_;
if ((state_0 & 0b10) != 0 /* is SpecializationActive[PythonScopes.getSourceLocation(PythonScopes, InteropLibrary)] */) {
{
InteropLibrary sourceInterop_ = this.sourceInterop;
if (sourceInterop_ != null) {
return arg0Value.getSourceLocation(sourceInterop_);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return getSourceLocationNode_AndSpecialize(arg0Value);
}
private SourceSection getSourceLocationNode_AndSpecialize(PythonScopes arg0Value) throws UnsupportedMessageException {
int state_0 = this.state_0_;
InteropLibrary sourceInterop_;
InteropLibrary sourceInterop__shared = this.sourceInterop;
if (sourceInterop__shared != null) {
sourceInterop_ = sourceInterop__shared;
} else {
sourceInterop_ = this.insert((INTEROP_LIBRARY_.createDispatched(1)));
if (sourceInterop_ == null) {
throw new IllegalStateException("Specialization 'getSourceLocation(PythonScopes, InteropLibrary)' contains a shared cache with name 'lib' 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.sourceInterop == null) {
VarHandle.storeStoreFence();
this.sourceInterop = sourceInterop_;
}
state_0 = state_0 | 0b10 /* add SpecializationActive[PythonScopes.getSourceLocation(PythonScopes, InteropLibrary)] */;
this.state_0_ = state_0;
return arg0Value.getSourceLocation(sourceInterop_);
}
@Override
public boolean hasLanguage(Object receiver) {
assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver.";
assert assertAdopted();
return (((PythonScopes) receiver)).hasLanguage();
}
@Override
public Class extends TruffleLanguage>> getLanguage(Object receiver) throws UnsupportedMessageException {
assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver.";
assert assertAdopted();
return (((PythonScopes) receiver)).getLanguage();
}
/**
* Debug Info:
* Specialization {@link PythonScopes#hasMembers(PythonScopes, Node, InteropLibrary, InlinedIntValueProfile)}
* Activation probability: 0.10000
* With/without class size: 5/0 bytes
*
*/
@Override
public boolean hasMembers(Object arg0Value_) {
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
assert assertAdopted();
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
int state_0 = this.state_0_;
if ((state_0 & 0b100) != 0 /* is SpecializationActive[PythonScopes.hasMembers(PythonScopes, Node, InteropLibrary, InlinedIntValueProfile)] */) {
{
InteropLibrary interop_ = this.interop;
if (interop_ != null) {
Node inliningTarget__ = (this);
return arg0Value.hasMembers(inliningTarget__, interop_, INLINED_LENGHT_PROFILE);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return hasMembersNode_AndSpecialize(arg0Value);
}
private boolean hasMembersNode_AndSpecialize(PythonScopes arg0Value) {
int state_0 = this.state_0_;
{
Node inliningTarget__ = null;
inliningTarget__ = (this);
InteropLibrary interop_;
InteropLibrary interop__shared = this.interop;
if (interop__shared != null) {
interop_ = interop__shared;
} else {
interop_ = this.insert((INTEROP_LIBRARY_.createDispatched(PythonScopes.LIMIT)));
if (interop_ == null) {
throw new IllegalStateException("Specialization 'hasMembers(PythonScopes, Node, InteropLibrary, InlinedIntValueProfile)' contains a shared cache with name 'interop' 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.interop == null) {
VarHandle.storeStoreFence();
this.interop = interop_;
}
state_0 = state_0 | 0b100 /* add SpecializationActive[PythonScopes.hasMembers(PythonScopes, Node, InteropLibrary, InlinedIntValueProfile)] */;
this.state_0_ = state_0;
return arg0Value.hasMembers(inliningTarget__, interop_, INLINED_LENGHT_PROFILE);
}
}
/**
* Debug Info:
* Specialization {@link PythonScopes#getMembers(PythonScopes, boolean, Node, InteropLibrary, InlinedIntValueProfile)}
* Activation probability: 0.10000
* With/without class size: 5/0 bytes
*
*/
@Override
public Object getMembers(Object arg0Value_, boolean arg1Value) throws UnsupportedMessageException {
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
assert assertAdopted();
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
int state_0 = this.state_0_;
if ((state_0 & 0b1000) != 0 /* is SpecializationActive[PythonScopes.getMembers(PythonScopes, boolean, Node, InteropLibrary, InlinedIntValueProfile)] */) {
{
InteropLibrary interop_ = this.interop;
if (interop_ != null) {
Node inliningTarget__ = (this);
return arg0Value.getMembers(arg1Value, inliningTarget__, interop_, INLINED_LENGHT_PROFILE);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return getMembersNode_AndSpecialize(arg0Value, arg1Value);
}
private Object getMembersNode_AndSpecialize(PythonScopes arg0Value, boolean arg1Value) throws UnsupportedMessageException {
int state_0 = this.state_0_;
{
Node inliningTarget__ = null;
inliningTarget__ = (this);
InteropLibrary interop_;
InteropLibrary interop__shared = this.interop;
if (interop__shared != null) {
interop_ = interop__shared;
} else {
interop_ = this.insert((INTEROP_LIBRARY_.createDispatched(PythonScopes.LIMIT)));
if (interop_ == null) {
throw new IllegalStateException("Specialization 'getMembers(PythonScopes, boolean, Node, InteropLibrary, InlinedIntValueProfile)' contains a shared cache with name 'interop' 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.interop == null) {
VarHandle.storeStoreFence();
this.interop = interop_;
}
state_0 = state_0 | 0b1000 /* add SpecializationActive[PythonScopes.getMembers(PythonScopes, boolean, Node, InteropLibrary, InlinedIntValueProfile)] */;
this.state_0_ = state_0;
return arg0Value.getMembers(arg1Value, inliningTarget__, interop_, INLINED_LENGHT_PROFILE);
}
}
/**
* Debug Info:
* Specialization {@link PythonScopes#isMemberReadable(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)}
* Activation probability: 0.10000
* With/without class size: 5/0 bytes
*
*/
@Override
public boolean isMemberReadable(Object arg0Value_, String arg1Value) {
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
assert assertAdopted();
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
int state_0 = this.state_0_;
if ((state_0 & 0b10000) != 0 /* is SpecializationActive[PythonScopes.isMemberReadable(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)] */) {
{
InteropLibrary interop_ = this.interop;
if (interop_ != null) {
Node inliningTarget__ = (this);
return arg0Value.isMemberReadable(arg1Value, inliningTarget__, interop_, INLINED_LENGHT_PROFILE);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return isMemberReadableNode_AndSpecialize(arg0Value, arg1Value);
}
private boolean isMemberReadableNode_AndSpecialize(PythonScopes arg0Value, String arg1Value) {
int state_0 = this.state_0_;
{
Node inliningTarget__ = null;
inliningTarget__ = (this);
InteropLibrary interop_;
InteropLibrary interop__shared = this.interop;
if (interop__shared != null) {
interop_ = interop__shared;
} else {
interop_ = this.insert((INTEROP_LIBRARY_.createDispatched(PythonScopes.LIMIT)));
if (interop_ == null) {
throw new IllegalStateException("Specialization 'isMemberReadable(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)' contains a shared cache with name 'interop' 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.interop == null) {
VarHandle.storeStoreFence();
this.interop = interop_;
}
state_0 = state_0 | 0b10000 /* add SpecializationActive[PythonScopes.isMemberReadable(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)] */;
this.state_0_ = state_0;
return arg0Value.isMemberReadable(arg1Value, inliningTarget__, interop_, INLINED_LENGHT_PROFILE);
}
}
/**
* Debug Info:
* Specialization {@link PythonScopes#readMember(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)}
* Activation probability: 0.10000
* With/without class size: 5/0 bytes
*
*/
@Override
public Object readMember(Object arg0Value_, String arg1Value) throws UnsupportedMessageException, UnknownIdentifierException {
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
assert assertAdopted();
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
int state_0 = this.state_0_;
if ((state_0 & 0b100000) != 0 /* is SpecializationActive[PythonScopes.readMember(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)] */) {
{
InteropLibrary interop_ = this.interop;
if (interop_ != null) {
Node inliningTarget__ = (this);
return arg0Value.readMember(arg1Value, inliningTarget__, interop_, INLINED_LENGHT_PROFILE);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return readMemberNode_AndSpecialize(arg0Value, arg1Value);
}
private Object readMemberNode_AndSpecialize(PythonScopes arg0Value, String arg1Value) throws UnknownIdentifierException, UnsupportedMessageException {
int state_0 = this.state_0_;
{
Node inliningTarget__ = null;
inliningTarget__ = (this);
InteropLibrary interop_;
InteropLibrary interop__shared = this.interop;
if (interop__shared != null) {
interop_ = interop__shared;
} else {
interop_ = this.insert((INTEROP_LIBRARY_.createDispatched(PythonScopes.LIMIT)));
if (interop_ == null) {
throw new IllegalStateException("Specialization 'readMember(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)' contains a shared cache with name 'interop' 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.interop == null) {
VarHandle.storeStoreFence();
this.interop = interop_;
}
state_0 = state_0 | 0b100000 /* add SpecializationActive[PythonScopes.readMember(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)] */;
this.state_0_ = state_0;
return arg0Value.readMember(arg1Value, inliningTarget__, interop_, INLINED_LENGHT_PROFILE);
}
}
/**
* Debug Info:
* Specialization {@link PythonScopes#writeMember(PythonScopes, String, Object, Node, InteropLibrary, InlinedIntValueProfile)}
* Activation probability: 0.10000
* With/without class size: 5/0 bytes
*
*/
@Override
public void writeMember(Object arg0Value_, String arg1Value, Object arg2Value) throws UnsupportedMessageException, UnknownIdentifierException, UnsupportedTypeException {
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
assert assertAdopted();
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
int state_0 = this.state_0_;
if ((state_0 & 0b1000000) != 0 /* is SpecializationActive[PythonScopes.writeMember(PythonScopes, String, Object, Node, InteropLibrary, InlinedIntValueProfile)] */) {
{
InteropLibrary interop_ = this.interop;
if (interop_ != null) {
Node inliningTarget__ = (this);
arg0Value.writeMember(arg1Value, arg2Value, inliningTarget__, interop_, INLINED_LENGHT_PROFILE);
return;
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
writeMemberNode_AndSpecialize(arg0Value, arg1Value, arg2Value);
return;
}
private void writeMemberNode_AndSpecialize(PythonScopes arg0Value, String arg1Value, Object arg2Value) throws UnknownIdentifierException, UnsupportedMessageException, UnsupportedTypeException {
int state_0 = this.state_0_;
{
Node inliningTarget__ = null;
inliningTarget__ = (this);
InteropLibrary interop_;
InteropLibrary interop__shared = this.interop;
if (interop__shared != null) {
interop_ = interop__shared;
} else {
interop_ = this.insert((INTEROP_LIBRARY_.createDispatched(PythonScopes.LIMIT)));
if (interop_ == null) {
throw new IllegalStateException("Specialization 'writeMember(PythonScopes, String, Object, Node, InteropLibrary, InlinedIntValueProfile)' contains a shared cache with name 'interop' 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.interop == null) {
VarHandle.storeStoreFence();
this.interop = interop_;
}
state_0 = state_0 | 0b1000000 /* add SpecializationActive[PythonScopes.writeMember(PythonScopes, String, Object, Node, InteropLibrary, InlinedIntValueProfile)] */;
this.state_0_ = state_0;
arg0Value.writeMember(arg1Value, arg2Value, inliningTarget__, interop_, INLINED_LENGHT_PROFILE);
return;
}
}
/**
* Debug Info:
* Specialization {@link PythonScopes#isMemberModifiable(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)}
* Activation probability: 0.10000
* With/without class size: 5/0 bytes
*
*/
@Override
public boolean isMemberModifiable(Object arg0Value_, String arg1Value) {
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
assert assertAdopted();
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
int state_0 = this.state_0_;
if ((state_0 & 0b10000000) != 0 /* is SpecializationActive[PythonScopes.isMemberModifiable(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)] */) {
{
InteropLibrary interop_ = this.interop;
if (interop_ != null) {
Node inliningTarget__ = (this);
return arg0Value.isMemberModifiable(arg1Value, inliningTarget__, interop_, INLINED_LENGHT_PROFILE);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return isMemberModifiableNode_AndSpecialize(arg0Value, arg1Value);
}
private boolean isMemberModifiableNode_AndSpecialize(PythonScopes arg0Value, String arg1Value) {
int state_0 = this.state_0_;
{
Node inliningTarget__ = null;
inliningTarget__ = (this);
InteropLibrary interop_;
InteropLibrary interop__shared = this.interop;
if (interop__shared != null) {
interop_ = interop__shared;
} else {
interop_ = this.insert((INTEROP_LIBRARY_.createDispatched(PythonScopes.LIMIT)));
if (interop_ == null) {
throw new IllegalStateException("Specialization 'isMemberModifiable(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)' contains a shared cache with name 'interop' 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.interop == null) {
VarHandle.storeStoreFence();
this.interop = interop_;
}
state_0 = state_0 | 0b10000000 /* add SpecializationActive[PythonScopes.isMemberModifiable(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)] */;
this.state_0_ = state_0;
return arg0Value.isMemberModifiable(arg1Value, inliningTarget__, interop_, INLINED_LENGHT_PROFILE);
}
}
/**
* Debug Info:
* Specialization {@link PythonScopes#isMemberInsertable(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)}
* Activation probability: 0.10000
* With/without class size: 5/0 bytes
*
*/
@Override
public boolean isMemberInsertable(Object arg0Value_, String arg1Value) {
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
assert assertAdopted();
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
int state_0 = this.state_0_;
if ((state_0 & 0b100000000) != 0 /* is SpecializationActive[PythonScopes.isMemberInsertable(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)] */) {
{
InteropLibrary interop_ = this.interop;
if (interop_ != null) {
Node inliningTarget__ = (this);
return arg0Value.isMemberInsertable(arg1Value, inliningTarget__, interop_, INLINED_LENGHT_PROFILE);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return isMemberInsertableNode_AndSpecialize(arg0Value, arg1Value);
}
private boolean isMemberInsertableNode_AndSpecialize(PythonScopes arg0Value, String arg1Value) {
int state_0 = this.state_0_;
{
Node inliningTarget__ = null;
inliningTarget__ = (this);
InteropLibrary interop_;
InteropLibrary interop__shared = this.interop;
if (interop__shared != null) {
interop_ = interop__shared;
} else {
interop_ = this.insert((INTEROP_LIBRARY_.createDispatched(PythonScopes.LIMIT)));
if (interop_ == null) {
throw new IllegalStateException("Specialization 'isMemberInsertable(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)' contains a shared cache with name 'interop' 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.interop == null) {
VarHandle.storeStoreFence();
this.interop = interop_;
}
state_0 = state_0 | 0b100000000 /* add SpecializationActive[PythonScopes.isMemberInsertable(PythonScopes, String, Node, InteropLibrary, InlinedIntValueProfile)] */;
this.state_0_ = state_0;
return arg0Value.isMemberInsertable(arg1Value, inliningTarget__, interop_, INLINED_LENGHT_PROFILE);
}
}
/**
* Debug Info:
* Specialization {@link PythonScopes#toDisplayString(PythonScopes, boolean, InteropLibrary)}
* Activation probability: 0.10000
* With/without class size: 6/4 bytes
*
*/
@Override
public Object toDisplayString(Object arg0Value_, boolean arg1Value) {
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
assert assertAdopted();
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
int state_0 = this.state_0_;
if ((state_0 & 0b1000000000) != 0 /* is SpecializationActive[PythonScopes.toDisplayString(PythonScopes, boolean, InteropLibrary)] */) {
{
InteropLibrary lib__ = this.toDisplayStringNode__toDisplayString_lib_;
if (lib__ != null) {
return arg0Value.toDisplayString(arg1Value, lib__);
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return toDisplayStringNode_AndSpecialize(arg0Value, arg1Value);
}
private Object toDisplayStringNode_AndSpecialize(PythonScopes arg0Value, boolean arg1Value) {
int state_0 = this.state_0_;
InteropLibrary lib__ = this.insert((INTEROP_LIBRARY_.createDispatched(1)));
Objects.requireNonNull(lib__, "Specialization 'toDisplayString(PythonScopes, boolean, 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.toDisplayStringNode__toDisplayString_lib_ = lib__;
state_0 = state_0 | 0b1000000000 /* add SpecializationActive[PythonScopes.toDisplayString(PythonScopes, boolean, InteropLibrary)] */;
this.state_0_ = state_0;
return arg0Value.toDisplayString(arg1Value, lib__);
}
}
@GeneratedBy(PythonScopes.class)
@DenyReplace
private static final class Uncached extends InteropLibrary {
protected Uncached() {
}
@Override
@TruffleBoundary
public boolean accepts(Object receiver) {
assert !(receiver instanceof PythonScopes) || DYNAMIC_DISPATCH_LIBRARY_.getUncached().dispatch(receiver) == null : "Invalid library export. Exported receiver with dynamic dispatch found but not expected.";
return receiver instanceof PythonScopes;
}
@Override
public boolean isAdoptable() {
return false;
}
@Override
public NodeCost getCost() {
return NodeCost.MEGAMORPHIC;
}
@TruffleBoundary
@Override
public boolean isScope(Object receiver) {
// declared: true
assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver.";
return ((PythonScopes) receiver) .isScope();
}
@TruffleBoundary
@Override
public boolean hasScopeParent(Object receiver) {
// declared: true
assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver.";
return ((PythonScopes) receiver) .hasScopeParent();
}
@TruffleBoundary
@Override
public Object getScopeParent(Object receiver) throws UnsupportedMessageException {
// declared: true
assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver.";
return ((PythonScopes) receiver) .getScopeParent();
}
@TruffleBoundary
@Override
public boolean hasSourceLocation(Object arg0Value_) {
// declared: true
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
return arg0Value.hasSourceLocation((INTEROP_LIBRARY_.getUncached()));
}
@TruffleBoundary
@Override
public SourceSection getSourceLocation(Object arg0Value_) throws UnsupportedMessageException {
// declared: true
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
return arg0Value.getSourceLocation((INTEROP_LIBRARY_.getUncached()));
}
@TruffleBoundary
@Override
public boolean hasLanguage(Object receiver) {
// declared: true
assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver.";
return ((PythonScopes) receiver) .hasLanguage();
}
@TruffleBoundary
@Override
public Class extends TruffleLanguage>> getLanguage(Object receiver) throws UnsupportedMessageException {
// declared: true
assert this.accepts(receiver) : "Invalid library usage. Library does not accept given receiver.";
return ((PythonScopes) receiver) .getLanguage();
}
@TruffleBoundary
@Override
public boolean hasMembers(Object arg0Value_) {
// declared: true
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
return arg0Value.hasMembers((this), (INTEROP_LIBRARY_.getUncached()), (InlinedIntValueProfile.getUncached()));
}
@TruffleBoundary
@Override
public Object getMembers(Object arg0Value_, boolean arg1Value) throws UnsupportedMessageException {
// declared: true
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
return arg0Value.getMembers(arg1Value, (this), (INTEROP_LIBRARY_.getUncached()), (InlinedIntValueProfile.getUncached()));
}
@TruffleBoundary
@Override
public boolean isMemberReadable(Object arg0Value_, String arg1Value) {
// declared: true
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
return arg0Value.isMemberReadable(arg1Value, (this), (INTEROP_LIBRARY_.getUncached()), (InlinedIntValueProfile.getUncached()));
}
@TruffleBoundary
@Override
public Object readMember(Object arg0Value_, String arg1Value) throws UnknownIdentifierException, UnsupportedMessageException {
// declared: true
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
return arg0Value.readMember(arg1Value, (this), (INTEROP_LIBRARY_.getUncached()), (InlinedIntValueProfile.getUncached()));
}
@TruffleBoundary
@Override
public void writeMember(Object arg0Value_, String arg1Value, Object arg2Value) throws UnknownIdentifierException, UnsupportedMessageException, UnsupportedTypeException {
// declared: true
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
arg0Value.writeMember(arg1Value, arg2Value, (this), (INTEROP_LIBRARY_.getUncached()), (InlinedIntValueProfile.getUncached()));
return;
}
@TruffleBoundary
@Override
public boolean isMemberModifiable(Object arg0Value_, String arg1Value) {
// declared: true
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
return arg0Value.isMemberModifiable(arg1Value, (this), (INTEROP_LIBRARY_.getUncached()), (InlinedIntValueProfile.getUncached()));
}
@TruffleBoundary
@Override
public boolean isMemberInsertable(Object arg0Value_, String arg1Value) {
// declared: true
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
return arg0Value.isMemberInsertable(arg1Value, (this), (INTEROP_LIBRARY_.getUncached()), (InlinedIntValueProfile.getUncached()));
}
@TruffleBoundary
@Override
public Object toDisplayString(Object arg0Value_, boolean arg1Value) {
// declared: true
assert this.accepts(arg0Value_) : "Invalid library usage. Library does not accept given receiver.";
PythonScopes arg0Value = ((PythonScopes) arg0Value_);
return arg0Value.toDisplayString(arg1Value, (INTEROP_LIBRARY_.getUncached()));
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy