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

com.oracle.truffle.js.nodes.access.PrivateFieldSetNodeGen Maven / Gradle / Ivy

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

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.InlineTarget;
import com.oracle.truffle.api.dsl.InlineSupport.ReferenceField;
import com.oracle.truffle.api.dsl.InlineSupport.StateField;
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.api.profiles.InlinedBranchProfile;
import com.oracle.truffle.js.nodes.JavaScriptNode;
import com.oracle.truffle.js.nodes.function.JSFunctionCallNode;
import com.oracle.truffle.js.runtime.JSContext;
import com.oracle.truffle.js.runtime.objects.Accessor;
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 PrivateFieldSetNode#doField}
 *     Activation probability: 0.38500
 *     With/without class size: 13/4 bytes
 *   Specialization {@link PrivateFieldSetNode#doField}
 *     Activation probability: 0.29500
 *     With/without class size: 8/0 bytes
 *   Specialization {@link PrivateFieldSetNode#doAccessor}
 *     Activation probability: 0.20500
 *     With/without class size: 8/4 bytes
 *   Specialization {@link PrivateFieldSetNode#missing}
 *     Activation probability: 0.11500
 *     With/without class size: 5/0 bytes
 * 
*/ @GeneratedBy(PrivateFieldSetNode.class) @SuppressWarnings({"javadoc", "unused"}) public final class PrivateFieldSetNodeGen extends PrivateFieldSetNode { private static final StateField STATE_0_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_"); static final ReferenceField FIELD0_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "field0_cache", Field0Data.class); /** * Source Info:
     *   Specialization: {@link PrivateFieldSetNode#doField}
     *   Parameter: {@link InlinedBranchProfile} errorBranch
     *   Inline method: {@link InlinedBranchProfile#inline}
*/ private static final InlinedBranchProfile INLINED_ERROR_BRANCH = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_UPDATER.subUpdater(4, 1))); private static final LibraryFactory DYNAMIC_OBJECT_LIBRARY_ = LibraryFactory.resolve(DynamicObjectLibrary.class); /** * State Info:
     *   0: SpecializationActive {@link PrivateFieldSetNode#doField}
     *   1: SpecializationActive {@link PrivateFieldSetNode#doField}
     *   2: SpecializationActive {@link PrivateFieldSetNode#doAccessor}
     *   3: SpecializationActive {@link PrivateFieldSetNode#missing}
     *   4: InlinedCache
     *        Specialization: {@link PrivateFieldSetNode#doField}
     *        Parameter: {@link InlinedBranchProfile} errorBranch
     *        Inline method: {@link InlinedBranchProfile#inline}
     * 
*/ @CompilationFinal @UnsafeAccessedField private int state_0_; @UnsafeAccessedField @Child private Field0Data field0_cache; /** * Source Info:
     *   Specialization: {@link PrivateFieldSetNode#doAccessor}
     *   Parameter: {@link JSFunctionCallNode} callNode
*/ @Child private JSFunctionCallNode accessor_callNode_; private PrivateFieldSetNodeGen(JavaScriptNode targetNode, JavaScriptNode keyNode, JavaScriptNode valueNode, JSContext context) { super(targetNode, keyNode, valueNode, context); } @SuppressWarnings("static-method") private boolean fallbackGuard_(int state_0, Object targetNodeValue, Object keyNodeValue, Object valueNodeValue) { if (targetNodeValue instanceof JSObject) { if (!((state_0 & 0b10) != 0 /* is SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] */) && keyNodeValue instanceof HiddenKey) { return false; } if (!((state_0 & 0b100) != 0 /* is SpecializationActive[PrivateFieldSetNode.doAccessor(JSObject, Accessor, Object, JSFunctionCallNode, InlinedBranchProfile)] */) && keyNodeValue instanceof Accessor) { return false; } } return true; } @ExplodeLoop @Override public Object executeWithTarget(VirtualFrame frameValue, Object targetNodeValue) { int state_0 = this.state_0_; Object keyNodeValue_ = super.keyNode.execute(frameValue); Object valueNodeValue_ = super.valueNode.execute(frameValue); if ((state_0 & 0b1111) != 0 /* is SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] || SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] || SpecializationActive[PrivateFieldSetNode.doAccessor(JSObject, Accessor, Object, JSFunctionCallNode, InlinedBranchProfile)] || SpecializationActive[PrivateFieldSetNode.missing(Object, Object, Object)] */) { if ((state_0 & 0b111) != 0 /* is SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] || SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] || SpecializationActive[PrivateFieldSetNode.doAccessor(JSObject, Accessor, Object, JSFunctionCallNode, InlinedBranchProfile)] */ && targetNodeValue instanceof JSObject) { JSObject targetNodeValue_ = (JSObject) targetNodeValue; if ((state_0 & 0b11) != 0 /* is SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] || SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] */ && keyNodeValue_ instanceof HiddenKey) { HiddenKey keyNodeValue__ = (HiddenKey) keyNodeValue_; if ((state_0 & 0b1) != 0 /* is SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] */) { Field0Data s0_ = this.field0_cache; while (s0_ != null) { if ((s0_.access_.accepts(targetNodeValue_))) { Node node__ = (this); return doField(targetNodeValue_, keyNodeValue__, valueNodeValue_, node__, s0_.access_, INLINED_ERROR_BRANCH); } s0_ = s0_.next_; } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] */) { return this.field1Boundary(state_0, targetNodeValue_, keyNodeValue__, valueNodeValue_); } } if ((state_0 & 0b100) != 0 /* is SpecializationActive[PrivateFieldSetNode.doAccessor(JSObject, Accessor, Object, JSFunctionCallNode, InlinedBranchProfile)] */ && keyNodeValue_ instanceof Accessor) { Accessor keyNodeValue__ = (Accessor) keyNodeValue_; { JSFunctionCallNode callNode__ = this.accessor_callNode_; if (callNode__ != null) { return doAccessor(targetNodeValue_, keyNodeValue__, valueNodeValue_, callNode__, INLINED_ERROR_BRANCH); } } } } if ((state_0 & 0b1000) != 0 /* is SpecializationActive[PrivateFieldSetNode.missing(Object, Object, Object)] */) { if (fallbackGuard_(state_0, targetNodeValue, keyNodeValue_, valueNodeValue_)) { return missing(targetNodeValue, keyNodeValue_, valueNodeValue_); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(targetNodeValue, keyNodeValue_, valueNodeValue_); } @SuppressWarnings("static-method") @TruffleBoundary private Object field1Boundary(int state_0, JSObject targetNodeValue_, HiddenKey keyNodeValue__, Object valueNodeValue_) { { Node node__ = (this); DynamicObjectLibrary access__ = (DYNAMIC_OBJECT_LIBRARY_.getUncached(targetNodeValue_)); return doField(targetNodeValue_, keyNodeValue__, valueNodeValue_, node__, access__, INLINED_ERROR_BRANCH); } } @ExplodeLoop @Override public Object execute(VirtualFrame frameValue) { int state_0 = this.state_0_; Object targetNodeValue_ = super.targetNode.execute(frameValue); Object keyNodeValue_ = super.keyNode.execute(frameValue); Object valueNodeValue_ = super.valueNode.execute(frameValue); if ((state_0 & 0b1111) != 0 /* is SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] || SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] || SpecializationActive[PrivateFieldSetNode.doAccessor(JSObject, Accessor, Object, JSFunctionCallNode, InlinedBranchProfile)] || SpecializationActive[PrivateFieldSetNode.missing(Object, Object, Object)] */) { if ((state_0 & 0b111) != 0 /* is SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] || SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] || SpecializationActive[PrivateFieldSetNode.doAccessor(JSObject, Accessor, Object, JSFunctionCallNode, InlinedBranchProfile)] */ && targetNodeValue_ instanceof JSObject) { JSObject targetNodeValue__ = (JSObject) targetNodeValue_; if ((state_0 & 0b11) != 0 /* is SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] || SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] */ && keyNodeValue_ instanceof HiddenKey) { HiddenKey keyNodeValue__ = (HiddenKey) keyNodeValue_; if ((state_0 & 0b1) != 0 /* is SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] */) { Field0Data s0_ = this.field0_cache; while (s0_ != null) { if ((s0_.access_.accepts(targetNodeValue__))) { Node node__ = (this); return doField(targetNodeValue__, keyNodeValue__, valueNodeValue_, node__, s0_.access_, INLINED_ERROR_BRANCH); } s0_ = s0_.next_; } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] */) { return this.field1Boundary0(state_0, targetNodeValue__, keyNodeValue__, valueNodeValue_); } } if ((state_0 & 0b100) != 0 /* is SpecializationActive[PrivateFieldSetNode.doAccessor(JSObject, Accessor, Object, JSFunctionCallNode, InlinedBranchProfile)] */ && keyNodeValue_ instanceof Accessor) { Accessor keyNodeValue__ = (Accessor) keyNodeValue_; { JSFunctionCallNode callNode__ = this.accessor_callNode_; if (callNode__ != null) { return doAccessor(targetNodeValue__, keyNodeValue__, valueNodeValue_, callNode__, INLINED_ERROR_BRANCH); } } } } if ((state_0 & 0b1000) != 0 /* is SpecializationActive[PrivateFieldSetNode.missing(Object, Object, Object)] */) { if (fallbackGuard_(state_0, targetNodeValue_, keyNodeValue_, valueNodeValue_)) { return missing(targetNodeValue_, keyNodeValue_, valueNodeValue_); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(targetNodeValue_, keyNodeValue_, valueNodeValue_); } @SuppressWarnings("static-method") @TruffleBoundary private Object field1Boundary0(int state_0, JSObject targetNodeValue__, HiddenKey keyNodeValue__, Object valueNodeValue_) { { Node node__ = (this); DynamicObjectLibrary access__ = (DYNAMIC_OBJECT_LIBRARY_.getUncached(targetNodeValue__)); return doField(targetNodeValue__, keyNodeValue__, valueNodeValue_, node__, access__, INLINED_ERROR_BRANCH); } } @Override public void executeVoid(VirtualFrame frameValue) { execute(frameValue); return; } private Object executeAndSpecialize(Object targetNodeValue, Object keyNodeValue, Object valueNodeValue) { int state_0 = this.state_0_; if (targetNodeValue instanceof JSObject) { JSObject targetNodeValue_ = (JSObject) targetNodeValue; if (keyNodeValue instanceof HiddenKey) { HiddenKey keyNodeValue_ = (HiddenKey) keyNodeValue; { Node node__ = null; if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] */) { while (true) { int count0_ = 0; Field0Data s0_ = FIELD0_CACHE_UPDATER.getVolatile(this); Field0Data s0_original = s0_; while (s0_ != null) { if ((s0_.access_.accepts(targetNodeValue_))) { node__ = (this); break; } count0_++; s0_ = s0_.next_; } if (s0_ == null) { // assert (s0_.access_.accepts(targetNodeValue_)); if (count0_ < (3)) { s0_ = this.insert(new Field0Data(s0_original)); node__ = (this); DynamicObjectLibrary access__ = s0_.insert((DYNAMIC_OBJECT_LIBRARY_.create(targetNodeValue_))); 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 (!FIELD0_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) { continue; } state_0 = state_0 | 0b1 /* add SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] */; this.state_0_ = state_0; } } if (s0_ != null) { return doField(targetNodeValue_, keyNodeValue_, valueNodeValue, node__, s0_.access_, INLINED_ERROR_BRANCH); } break; } } } { DynamicObjectLibrary access__ = null; Node node__ = null; node__ = (this); access__ = (DYNAMIC_OBJECT_LIBRARY_.getUncached(targetNodeValue_)); this.field0_cache = null; state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] */; state_0 = state_0 | 0b10 /* add SpecializationActive[PrivateFieldSetNode.doField(JSObject, HiddenKey, Object, Node, DynamicObjectLibrary, InlinedBranchProfile)] */; this.state_0_ = state_0; return doField(targetNodeValue_, keyNodeValue_, valueNodeValue, node__, access__, INLINED_ERROR_BRANCH); } } if (keyNodeValue instanceof Accessor) { Accessor keyNodeValue_ = (Accessor) keyNodeValue; JSFunctionCallNode callNode__ = this.insert((JSFunctionCallNode.createCall())); Objects.requireNonNull(callNode__, "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.accessor_callNode_ = callNode__; state_0 = state_0 | 0b100 /* add SpecializationActive[PrivateFieldSetNode.doAccessor(JSObject, Accessor, Object, JSFunctionCallNode, InlinedBranchProfile)] */; this.state_0_ = state_0; return doAccessor(targetNodeValue_, keyNodeValue_, valueNodeValue, callNode__, INLINED_ERROR_BRANCH); } } state_0 = state_0 | 0b1000 /* add SpecializationActive[PrivateFieldSetNode.missing(Object, Object, Object)] */; this.state_0_ = state_0; return missing(targetNodeValue, keyNodeValue, valueNodeValue); } @NeverDefault public static PrivateFieldSetNode create(JavaScriptNode targetNode, JavaScriptNode keyNode, JavaScriptNode valueNode, JSContext context) { return new PrivateFieldSetNodeGen(targetNode, keyNode, valueNode, context); } @GeneratedBy(PrivateFieldSetNode.class) @DenyReplace private static final class Field0Data extends Node implements SpecializationDataNode { @Child Field0Data next_; /** * Source Info:
         *   Specialization: {@link PrivateFieldSetNode#doField}
         *   Parameter: {@link DynamicObjectLibrary} access
*/ @Child DynamicObjectLibrary access_; Field0Data(Field0Data next_) { this.next_ = next_; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy