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

com.oracle.truffle.js.nodes.binary.PrivateFieldInNodeGen Maven / Gradle / Ivy

// CheckStyle: start generated
package com.oracle.truffle.js.nodes.binary;

import com.oracle.truffle.api.CompilerDirectives;
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.NeverDefault;
import com.oracle.truffle.api.dsl.DSLSupport.SpecializationDataNode;
import com.oracle.truffle.api.dsl.InlineSupport.ReferenceField;
import com.oracle.truffle.api.dsl.InlineSupport.UnsafeAccessedField;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.library.LibraryFactory;
import com.oracle.truffle.api.nodes.DenyReplace;
import com.oracle.truffle.api.nodes.ExplodeLoop;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.object.DynamicObjectLibrary;
import com.oracle.truffle.api.object.HiddenKey;
import com.oracle.truffle.js.nodes.JavaScriptNode;
import com.oracle.truffle.js.nodes.access.IsObjectNode;
import com.oracle.truffle.js.runtime.objects.JSDynamicObject;
import com.oracle.truffle.js.runtime.objects.JSObject;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.util.Objects;

/**
 * Debug Info: 
 *   Specialization {@link PrivateFieldInNode#doInstance}
 *     Activation probability: 0.38500
 *     With/without class size: 13/4 bytes
 *   Specialization {@link PrivateFieldInNode#doInstance}
 *     Activation probability: 0.29500
 *     With/without class size: 7/0 bytes
 *   Specialization {@link PrivateFieldInNode#doStatic}
 *     Activation probability: 0.20500
 *     With/without class size: 6/0 bytes
 *   Specialization {@link PrivateFieldInNode#doFallback}
 *     Activation probability: 0.11500
 *     With/without class size: 6/4 bytes
 * 
*/ @GeneratedBy(PrivateFieldInNode.class) @SuppressWarnings({"javadoc", "unused"}) public final class PrivateFieldInNodeGen extends PrivateFieldInNode { static final ReferenceField INSTANCE0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "instance0_cache", Instance0Data.class); private static final LibraryFactory DYNAMIC_OBJECT_LIBRARY_ = LibraryFactory.resolve(DynamicObjectLibrary.class); /** * State Info:
     *   0: SpecializationActive {@link PrivateFieldInNode#doInstance}
     *   1: SpecializationActive {@link PrivateFieldInNode#doInstance}
     *   2: SpecializationActive {@link PrivateFieldInNode#doStatic}
     *   3: SpecializationActive {@link PrivateFieldInNode#doFallback}
     * 
*/ @CompilationFinal private int state_0_; @UnsafeAccessedField @Child private Instance0Data instance0_cache; /** * Source Info:
     *   Specialization: {@link PrivateFieldInNode#doFallback}
     *   Parameter: {@link IsObjectNode} isObjectNode
*/ @Child private IsObjectNode fallback_isObjectNode_; private PrivateFieldInNodeGen(JavaScriptNode left, JavaScriptNode right) { super(left, right); } @SuppressWarnings("static-method") private boolean fallbackGuard_(int state_0, Object leftNodeValue, Object rightNodeValue) { if (rightNodeValue instanceof JSObject) { if (!((state_0 & 0b10) != 0 /* is SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] */) && leftNodeValue instanceof HiddenKey) { return false; } if (!((state_0 & 0b100) != 0 /* is SpecializationActive[PrivateFieldInNode.doStatic(JSDynamicObject, JSObject)] */) && leftNodeValue instanceof JSDynamicObject) { return false; } } return true; } @ExplodeLoop @Override public Object execute(VirtualFrame frameValue) { int state_0 = this.state_0_; Object leftNodeValue_ = super.leftNode.execute(frameValue); Object rightNodeValue_ = super.rightNode.execute(frameValue); if (state_0 != 0 /* is SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] || SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] || SpecializationActive[PrivateFieldInNode.doStatic(JSDynamicObject, JSObject)] || SpecializationActive[PrivateFieldInNode.doFallback(Object, Object, IsObjectNode)] */) { if ((state_0 & 0b111) != 0 /* is SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] || SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] || SpecializationActive[PrivateFieldInNode.doStatic(JSDynamicObject, JSObject)] */ && rightNodeValue_ instanceof JSObject) { JSObject rightNodeValue__ = (JSObject) rightNodeValue_; if ((state_0 & 0b11) != 0 /* is SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] || SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] */ && leftNodeValue_ instanceof HiddenKey) { HiddenKey leftNodeValue__ = (HiddenKey) leftNodeValue_; if ((state_0 & 0b1) != 0 /* is SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] */) { Instance0Data s0_ = this.instance0_cache; while (s0_ != null) { if ((s0_.access_.accepts(rightNodeValue__))) { return doInstance(leftNodeValue__, rightNodeValue__, s0_.access_); } s0_ = s0_.next_; } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] */) { return this.instance1Boundary(state_0, leftNodeValue__, rightNodeValue__); } } if ((state_0 & 0b100) != 0 /* is SpecializationActive[PrivateFieldInNode.doStatic(JSDynamicObject, JSObject)] */ && leftNodeValue_ instanceof JSDynamicObject) { JSDynamicObject leftNodeValue__ = (JSDynamicObject) leftNodeValue_; return doStatic(leftNodeValue__, rightNodeValue__); } } if ((state_0 & 0b1000) != 0 /* is SpecializationActive[PrivateFieldInNode.doFallback(Object, Object, IsObjectNode)] */) { { IsObjectNode isObjectNode__ = this.fallback_isObjectNode_; if (isObjectNode__ != null) { if (fallbackGuard_(state_0, leftNodeValue_, rightNodeValue_)) { return doFallback(leftNodeValue_, rightNodeValue_, isObjectNode__); } } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(leftNodeValue_, rightNodeValue_); } @SuppressWarnings("static-method") @TruffleBoundary private Object instance1Boundary(int state_0, HiddenKey leftNodeValue__, JSObject rightNodeValue__) { { DynamicObjectLibrary access__ = (DYNAMIC_OBJECT_LIBRARY_.getUncached(rightNodeValue__)); return doInstance(leftNodeValue__, rightNodeValue__, access__); } } @ExplodeLoop @Override public boolean executeBoolean(VirtualFrame frameValue) { int state_0 = this.state_0_; Object leftNodeValue_ = super.leftNode.execute(frameValue); Object rightNodeValue_ = super.rightNode.execute(frameValue); if (state_0 != 0 /* is SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] || SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] || SpecializationActive[PrivateFieldInNode.doStatic(JSDynamicObject, JSObject)] || SpecializationActive[PrivateFieldInNode.doFallback(Object, Object, IsObjectNode)] */) { if ((state_0 & 0b111) != 0 /* is SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] || SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] || SpecializationActive[PrivateFieldInNode.doStatic(JSDynamicObject, JSObject)] */ && rightNodeValue_ instanceof JSObject) { JSObject rightNodeValue__ = (JSObject) rightNodeValue_; if ((state_0 & 0b11) != 0 /* is SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] || SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] */ && leftNodeValue_ instanceof HiddenKey) { HiddenKey leftNodeValue__ = (HiddenKey) leftNodeValue_; if ((state_0 & 0b1) != 0 /* is SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] */) { Instance0Data s0_ = this.instance0_cache; while (s0_ != null) { if ((s0_.access_.accepts(rightNodeValue__))) { return doInstance(leftNodeValue__, rightNodeValue__, s0_.access_); } s0_ = s0_.next_; } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] */) { return this.instance1Boundary0(state_0, leftNodeValue__, rightNodeValue__); } } if ((state_0 & 0b100) != 0 /* is SpecializationActive[PrivateFieldInNode.doStatic(JSDynamicObject, JSObject)] */ && leftNodeValue_ instanceof JSDynamicObject) { JSDynamicObject leftNodeValue__ = (JSDynamicObject) leftNodeValue_; return doStatic(leftNodeValue__, rightNodeValue__); } } if ((state_0 & 0b1000) != 0 /* is SpecializationActive[PrivateFieldInNode.doFallback(Object, Object, IsObjectNode)] */) { { IsObjectNode isObjectNode__ = this.fallback_isObjectNode_; if (isObjectNode__ != null) { if (fallbackGuard_(state_0, leftNodeValue_, rightNodeValue_)) { return doFallback(leftNodeValue_, rightNodeValue_, isObjectNode__); } } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(leftNodeValue_, rightNodeValue_); } @SuppressWarnings("static-method") @TruffleBoundary private boolean instance1Boundary0(int state_0, HiddenKey leftNodeValue__, JSObject rightNodeValue__) { { DynamicObjectLibrary access__ = (DYNAMIC_OBJECT_LIBRARY_.getUncached(rightNodeValue__)); return doInstance(leftNodeValue__, rightNodeValue__, access__); } } @Override public void executeVoid(VirtualFrame frameValue) { executeBoolean(frameValue); return; } private boolean executeAndSpecialize(Object leftNodeValue, Object rightNodeValue) { int state_0 = this.state_0_; if (rightNodeValue instanceof JSObject) { JSObject rightNodeValue_ = (JSObject) rightNodeValue; if (leftNodeValue instanceof HiddenKey) { HiddenKey leftNodeValue_ = (HiddenKey) leftNodeValue; if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] */) { while (true) { int count0_ = 0; Instance0Data s0_ = INSTANCE0_CACHE_UPDATER.getVolatile(this); Instance0Data s0_original = s0_; while (s0_ != null) { if ((s0_.access_.accepts(rightNodeValue_))) { break; } count0_++; s0_ = s0_.next_; } if (s0_ == null) { // assert (s0_.access_.accepts(rightNodeValue_)); if (count0_ < (3)) { s0_ = this.insert(new Instance0Data(s0_original)); DynamicObjectLibrary access__ = s0_.insert((DYNAMIC_OBJECT_LIBRARY_.create(rightNodeValue_))); Objects.requireNonNull(access__, "A specialization cache returned a 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 the default value."); s0_.access_ = access__; if (!INSTANCE0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) { continue; } state_0 = state_0 | 0b1 /* add SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] */; this.state_0_ = state_0; } } if (s0_ != null) { return doInstance(leftNodeValue_, rightNodeValue_, s0_.access_); } break; } } { DynamicObjectLibrary access__ = null; access__ = (DYNAMIC_OBJECT_LIBRARY_.getUncached(rightNodeValue_)); this.instance0_cache = null; state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] */; state_0 = state_0 | 0b10 /* add SpecializationActive[PrivateFieldInNode.doInstance(HiddenKey, JSObject, DynamicObjectLibrary)] */; this.state_0_ = state_0; return doInstance(leftNodeValue_, rightNodeValue_, access__); } } if (leftNodeValue instanceof JSDynamicObject) { JSDynamicObject leftNodeValue_ = (JSDynamicObject) leftNodeValue; state_0 = state_0 | 0b100 /* add SpecializationActive[PrivateFieldInNode.doStatic(JSDynamicObject, JSObject)] */; this.state_0_ = state_0; return doStatic(leftNodeValue_, rightNodeValue_); } } IsObjectNode isObjectNode__ = this.insert((IsObjectNode.create())); Objects.requireNonNull(isObjectNode__, "A specialization cache returned a 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 the default value."); VarHandle.storeStoreFence(); this.fallback_isObjectNode_ = isObjectNode__; state_0 = state_0 | 0b1000 /* add SpecializationActive[PrivateFieldInNode.doFallback(Object, Object, IsObjectNode)] */; this.state_0_ = state_0; return doFallback(leftNodeValue, rightNodeValue, isObjectNode__); } @NeverDefault public static PrivateFieldInNode create(JavaScriptNode left, JavaScriptNode right) { return new PrivateFieldInNodeGen(left, right); } @GeneratedBy(PrivateFieldInNode.class) @DenyReplace private static final class Instance0Data extends Node implements SpecializationDataNode { @Child Instance0Data next_; /** * Source Info:
         *   Specialization: {@link PrivateFieldInNode#doInstance}
         *   Parameter: {@link DynamicObjectLibrary} access
*/ @Child DynamicObjectLibrary access_; Instance0Data(Instance0Data next_) { this.next_ = next_; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy