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

com.oracle.truffle.js.nodes.access.RestObjectWithExcludedNodeGen 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.dsl.GeneratedBy;
import com.oracle.truffle.api.dsl.NeverDefault;
import com.oracle.truffle.api.dsl.UnsupportedSpecializationException;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.js.nodes.JSGuards;
import com.oracle.truffle.js.nodes.JavaScriptNode;
import com.oracle.truffle.js.nodes.cast.JSToObjectNode;
import com.oracle.truffle.js.runtime.JSContext;
import com.oracle.truffle.js.runtime.objects.JSDynamicObject;
import com.oracle.truffle.js.runtime.objects.JSObject;
import java.lang.invoke.VarHandle;
import java.util.Objects;

/**
 * Debug Info: 
 *   Specialization {@link RestObjectWithExcludedNode#doNullOrUndefined}
 *     Activation probability: 0.48333
 *     With/without class size: 9/0 bytes
 *   Specialization {@link RestObjectWithExcludedNode#copyDataProperties}
 *     Activation probability: 0.33333
 *     With/without class size: 8/0 bytes
 *   Specialization {@link RestObjectWithExcludedNode#doOther}
 *     Activation probability: 0.18333
 *     With/without class size: 7/4 bytes
 * 
*/ @GeneratedBy(RestObjectWithExcludedNode.class) @SuppressWarnings("javadoc") final class RestObjectWithExcludedNodeGen extends RestObjectWithExcludedNode { /** * State Info:
     *   0: SpecializationActive {@link RestObjectWithExcludedNode#doNullOrUndefined}
     *   1: SpecializationActive {@link RestObjectWithExcludedNode#copyDataProperties}
     *   2: SpecializationActive {@link RestObjectWithExcludedNode#doOther}
     * 
*/ @CompilationFinal private int state_0_; /** * Source Info:
     *   Specialization: {@link RestObjectWithExcludedNode#doOther}
     *   Parameter: {@link JSToObjectNode} toObjectNode
*/ @Child private JSToObjectNode other_toObjectNode_; private RestObjectWithExcludedNodeGen(JSContext context, JavaScriptNode targetNode, JavaScriptNode sourceNode, JavaScriptNode excludedNode) { super(context, targetNode, sourceNode, excludedNode); } @Override public Object execute(VirtualFrame frameValue) { int state_0 = this.state_0_; Object targetNodeValue_ = super.targetNode.execute(frameValue); Object sourceNodeValue_ = super.sourceNode.execute(frameValue); Object excludedNodeValue_ = super.excludedNode.execute(frameValue); if (state_0 != 0 /* is SpecializationActive[RestObjectWithExcludedNode.doNullOrUndefined(JSDynamicObject, Object, Object[])] || SpecializationActive[RestObjectWithExcludedNode.copyDataProperties(JSDynamicObject, JSObject, Object[])] || SpecializationActive[RestObjectWithExcludedNode.doOther(JSDynamicObject, Object, Object[], JSToObjectNode)] */ && targetNodeValue_ instanceof JSDynamicObject) { JSDynamicObject targetNodeValue__ = (JSDynamicObject) targetNodeValue_; if (excludedNodeValue_ instanceof Object[]) { Object[] excludedNodeValue__ = (Object[]) excludedNodeValue_; if ((state_0 & 0b1) != 0 /* is SpecializationActive[RestObjectWithExcludedNode.doNullOrUndefined(JSDynamicObject, Object, Object[])] */) { if ((JSGuards.isNullOrUndefined(sourceNodeValue_))) { return RestObjectWithExcludedNode.doNullOrUndefined(targetNodeValue__, sourceNodeValue_, excludedNodeValue__); } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[RestObjectWithExcludedNode.copyDataProperties(JSDynamicObject, JSObject, Object[])] */ && sourceNodeValue_ instanceof JSObject) { JSObject sourceNodeValue__ = (JSObject) sourceNodeValue_; return copyDataProperties(targetNodeValue__, sourceNodeValue__, excludedNodeValue__); } if ((state_0 & 0b100) != 0 /* is SpecializationActive[RestObjectWithExcludedNode.doOther(JSDynamicObject, Object, Object[], JSToObjectNode)] */) { { JSToObjectNode toObjectNode__ = this.other_toObjectNode_; if (toObjectNode__ != null) { if ((!(JSGuards.isJSDynamicObject(sourceNodeValue_)))) { return doOther(targetNodeValue__, sourceNodeValue_, excludedNodeValue__, toObjectNode__); } } } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(targetNodeValue_, sourceNodeValue_, excludedNodeValue_); } @Override public void executeVoid(VirtualFrame frameValue) { execute(frameValue); return; } private Object executeAndSpecialize(Object targetNodeValue, Object sourceNodeValue, Object excludedNodeValue) { int state_0 = this.state_0_; if (targetNodeValue instanceof JSDynamicObject) { JSDynamicObject targetNodeValue_ = (JSDynamicObject) targetNodeValue; if (excludedNodeValue instanceof Object[]) { Object[] excludedNodeValue_ = (Object[]) excludedNodeValue; if ((JSGuards.isNullOrUndefined(sourceNodeValue))) { state_0 = state_0 | 0b1 /* add SpecializationActive[RestObjectWithExcludedNode.doNullOrUndefined(JSDynamicObject, Object, Object[])] */; this.state_0_ = state_0; return RestObjectWithExcludedNode.doNullOrUndefined(targetNodeValue_, sourceNodeValue, excludedNodeValue_); } if (sourceNodeValue instanceof JSObject) { JSObject sourceNodeValue_ = (JSObject) sourceNodeValue; state_0 = state_0 | 0b10 /* add SpecializationActive[RestObjectWithExcludedNode.copyDataProperties(JSDynamicObject, JSObject, Object[])] */; this.state_0_ = state_0; return copyDataProperties(targetNodeValue_, sourceNodeValue_, excludedNodeValue_); } if ((!(JSGuards.isJSDynamicObject(sourceNodeValue)))) { JSToObjectNode toObjectNode__ = this.insert((JSToObjectNode.create())); Objects.requireNonNull(toObjectNode__, "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.other_toObjectNode_ = toObjectNode__; state_0 = state_0 | 0b100 /* add SpecializationActive[RestObjectWithExcludedNode.doOther(JSDynamicObject, Object, Object[], JSToObjectNode)] */; this.state_0_ = state_0; return doOther(targetNodeValue_, sourceNodeValue, excludedNodeValue_, toObjectNode__); } } } throw new UnsupportedSpecializationException(this, new Node[] {super.targetNode, super.sourceNode, super.excludedNode}, targetNodeValue, sourceNodeValue, excludedNodeValue); } @NeverDefault public static RestObjectWithExcludedNode create(JSContext context, JavaScriptNode targetNode, JavaScriptNode sourceNode, JavaScriptNode excludedNode) { return new RestObjectWithExcludedNodeGen(context, targetNode, sourceNode, excludedNode); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy