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

com.oracle.truffle.js.nodes.binary.InNodeGen 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.dsl.GeneratedBy;
import com.oracle.truffle.api.dsl.NeverDefault;
import com.oracle.truffle.api.dsl.UnsupportedSpecializationException;
import com.oracle.truffle.api.dsl.InlineSupport.InlineTarget;
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.nodes.Node;
import com.oracle.truffle.api.nodes.UnexpectedResultException;
import com.oracle.truffle.api.profiles.InlinedBranchProfile;
import com.oracle.truffle.api.strings.TruffleString;
import com.oracle.truffle.js.nodes.JSGuards;
import com.oracle.truffle.js.nodes.JSTypesGen;
import com.oracle.truffle.js.nodes.JavaScriptNode;
import com.oracle.truffle.js.nodes.access.IsObjectNode;
import com.oracle.truffle.js.nodes.access.JSProxyHasPropertyNode;
import com.oracle.truffle.js.runtime.BigInt;
import com.oracle.truffle.js.runtime.JSContext;
import com.oracle.truffle.js.runtime.SafeInteger;
import com.oracle.truffle.js.runtime.Symbol;
import com.oracle.truffle.js.runtime.builtins.JSProxyObject;
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 InNode#doObject}
 *     Activation probability: 0.19111
 *     With/without class size: 6/0 bytes
 *   Specialization {@link InNode#doProxy}
 *     Activation probability: 0.17111
 *     With/without class size: 7/4 bytes
 *   Specialization {@link InNode#doForeign}
 *     Activation probability: 0.15111
 *     With/without class size: 7/5 bytes
 *   Specialization {@link InNode#doNullOrUndefined}
 *     Activation probability: 0.13111
 *     With/without class size: 5/0 bytes
 *   Specialization {@link InNode#doSymbol}
 *     Activation probability: 0.11111
 *     With/without class size: 5/0 bytes
 *   Specialization {@link InNode#doTString}
 *     Activation probability: 0.09111
 *     With/without class size: 5/0 bytes
 *   Specialization {@link InNode#doSafeInteger}
 *     Activation probability: 0.07111
 *     With/without class size: 4/0 bytes
 *   Specialization {@link InNode#doBigInt}
 *     Activation probability: 0.05111
 *     With/without class size: 4/0 bytes
 *   Specialization {@link InNode#doNotTruffleObject}
 *     Activation probability: 0.03111
 *     With/without class size: 4/0 bytes
 * 
*/ @GeneratedBy(InNode.class) @SuppressWarnings("javadoc") public final class InNodeGen extends InNode { private static final StateField STATE_0_InNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_"); /** * Source Info:
     *   Specialization: {@link InNode#doForeign}
     *   Parameter: {@link InlinedBranchProfile} errorBranch
     *   Inline method: {@link InlinedBranchProfile#inline}
*/ private static final InlinedBranchProfile INLINED_FOREIGN_ERROR_BRANCH_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_InNode_UPDATER.subUpdater(9, 1))); /** * State Info:
     *   0: SpecializationActive {@link InNode#doObject}
     *   1: SpecializationActive {@link InNode#doProxy}
     *   2: SpecializationActive {@link InNode#doForeign}
     *   3: SpecializationActive {@link InNode#doNullOrUndefined}
     *   4: SpecializationActive {@link InNode#doSymbol}
     *   5: SpecializationActive {@link InNode#doTString}
     *   6: SpecializationActive {@link InNode#doSafeInteger}
     *   7: SpecializationActive {@link InNode#doBigInt}
     *   8: SpecializationActive {@link InNode#doNotTruffleObject}
     *   9: InlinedCache
     *        Specialization: {@link InNode#doForeign}
     *        Parameter: {@link InlinedBranchProfile} errorBranch
     *        Inline method: {@link InlinedBranchProfile#inline}
     * 
*/ @CompilationFinal @UnsafeAccessedField private int state_0_; /** * Source Info:
     *   Specialization: {@link InNode#doProxy}
     *   Parameter: {@link JSProxyHasPropertyNode} proxyHasPropertyNode
*/ @Child private JSProxyHasPropertyNode proxy_proxyHasPropertyNode_; /** * Source Info:
     *   Specialization: {@link InNode#doForeign}
     *   Parameter: {@link IsObjectNode} isObjectNode
*/ @Child private IsObjectNode foreign_isObjectNode_; private InNodeGen(JSContext context, JavaScriptNode left, JavaScriptNode right) { super(context, left, right); } @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 & 0b111111111) != 0 /* is SpecializationActive[InNode.doObject(Object, JSObject)] || SpecializationActive[InNode.doProxy(Object, JSProxyObject, JSProxyHasPropertyNode)] || SpecializationActive[InNode.doForeign(Object, Object, IsObjectNode, InlinedBranchProfile)] || SpecializationActive[InNode.doNullOrUndefined(Object, Object)] || SpecializationActive[InNode.doSymbol(Object, Symbol)] || SpecializationActive[InNode.doTString(Object, TruffleString)] || SpecializationActive[InNode.doSafeInteger(Object, SafeInteger)] || SpecializationActive[InNode.doBigInt(Object, BigInt)] || SpecializationActive[InNode.doNotTruffleObject(Object, Object)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[InNode.doObject(Object, JSObject)] */ && rightNodeValue_ instanceof JSObject) { JSObject rightNodeValue__ = (JSObject) rightNodeValue_; if ((!(JSGuards.isJSProxy(rightNodeValue__)))) { return doObject(leftNodeValue_, rightNodeValue__); } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[InNode.doProxy(Object, JSProxyObject, JSProxyHasPropertyNode)] */ && rightNodeValue_ instanceof JSProxyObject) { JSProxyObject rightNodeValue__ = (JSProxyObject) rightNodeValue_; { JSProxyHasPropertyNode proxyHasPropertyNode__ = this.proxy_proxyHasPropertyNode_; if (proxyHasPropertyNode__ != null) { return doProxy(leftNodeValue_, rightNodeValue__, proxyHasPropertyNode__); } } } if ((state_0 & 0b1100) != 0 /* is SpecializationActive[InNode.doForeign(Object, Object, IsObjectNode, InlinedBranchProfile)] || SpecializationActive[InNode.doNullOrUndefined(Object, Object)] */) { if ((state_0 & 0b100) != 0 /* is SpecializationActive[InNode.doForeign(Object, Object, IsObjectNode, InlinedBranchProfile)] */) { { IsObjectNode isObjectNode__ = this.foreign_isObjectNode_; if (isObjectNode__ != null) { if ((JSGuards.isForeignObject(rightNodeValue_))) { return doForeign(leftNodeValue_, rightNodeValue_, isObjectNode__, INLINED_FOREIGN_ERROR_BRANCH_); } } } } if ((state_0 & 0b1000) != 0 /* is SpecializationActive[InNode.doNullOrUndefined(Object, Object)] */) { if ((JSGuards.isNullOrUndefined(rightNodeValue_))) { return InNode.doNullOrUndefined(leftNodeValue_, rightNodeValue_); } } } if ((state_0 & 0b10000) != 0 /* is SpecializationActive[InNode.doSymbol(Object, Symbol)] */ && rightNodeValue_ instanceof Symbol) { Symbol rightNodeValue__ = (Symbol) rightNodeValue_; return InNode.doSymbol(leftNodeValue_, rightNodeValue__); } if ((state_0 & 0b100000) != 0 /* is SpecializationActive[InNode.doTString(Object, TruffleString)] */ && rightNodeValue_ instanceof TruffleString) { TruffleString rightNodeValue__ = (TruffleString) rightNodeValue_; return InNode.doTString(leftNodeValue_, rightNodeValue__); } if ((state_0 & 0b1000000) != 0 /* is SpecializationActive[InNode.doSafeInteger(Object, SafeInteger)] */ && rightNodeValue_ instanceof SafeInteger) { SafeInteger rightNodeValue__ = (SafeInteger) rightNodeValue_; return InNode.doSafeInteger(leftNodeValue_, rightNodeValue__); } if ((state_0 & 0b10000000) != 0 /* is SpecializationActive[InNode.doBigInt(Object, BigInt)] */ && rightNodeValue_ instanceof BigInt) { BigInt rightNodeValue__ = (BigInt) rightNodeValue_; return InNode.doBigInt(leftNodeValue_, rightNodeValue__); } if ((state_0 & 0b100000000) != 0 /* is SpecializationActive[InNode.doNotTruffleObject(Object, Object)] */) { if ((!(JSGuards.isTruffleObject(rightNodeValue_)))) { return InNode.doNotTruffleObject(leftNodeValue_, rightNodeValue_); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(leftNodeValue_, rightNodeValue_); } @Override public boolean executeBoolean(VirtualFrame frameValue) throws UnexpectedResultException { int state_0 = this.state_0_; if ((state_0 & 0b111111000) != 0 /* is SpecializationActive[InNode.doNullOrUndefined(Object, Object)] || SpecializationActive[InNode.doSymbol(Object, Symbol)] || SpecializationActive[InNode.doTString(Object, TruffleString)] || SpecializationActive[InNode.doSafeInteger(Object, SafeInteger)] || SpecializationActive[InNode.doBigInt(Object, BigInt)] || SpecializationActive[InNode.doNotTruffleObject(Object, Object)] */) { return JSTypesGen.expectBoolean(execute(frameValue)); } Object leftNodeValue_ = super.leftNode.execute(frameValue); Object rightNodeValue_ = super.rightNode.execute(frameValue); if ((state_0 & 0b111) != 0 /* is SpecializationActive[InNode.doObject(Object, JSObject)] || SpecializationActive[InNode.doProxy(Object, JSProxyObject, JSProxyHasPropertyNode)] || SpecializationActive[InNode.doForeign(Object, Object, IsObjectNode, InlinedBranchProfile)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[InNode.doObject(Object, JSObject)] */ && rightNodeValue_ instanceof JSObject) { JSObject rightNodeValue__ = (JSObject) rightNodeValue_; if ((!(JSGuards.isJSProxy(rightNodeValue__)))) { return doObject(leftNodeValue_, rightNodeValue__); } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[InNode.doProxy(Object, JSProxyObject, JSProxyHasPropertyNode)] */ && rightNodeValue_ instanceof JSProxyObject) { JSProxyObject rightNodeValue__ = (JSProxyObject) rightNodeValue_; { JSProxyHasPropertyNode proxyHasPropertyNode__ = this.proxy_proxyHasPropertyNode_; if (proxyHasPropertyNode__ != null) { return doProxy(leftNodeValue_, rightNodeValue__, proxyHasPropertyNode__); } } } if ((state_0 & 0b100) != 0 /* is SpecializationActive[InNode.doForeign(Object, Object, IsObjectNode, InlinedBranchProfile)] */) { { IsObjectNode isObjectNode__ = this.foreign_isObjectNode_; if (isObjectNode__ != null) { if ((JSGuards.isForeignObject(rightNodeValue_))) { return doForeign(leftNodeValue_, rightNodeValue_, isObjectNode__, INLINED_FOREIGN_ERROR_BRANCH_); } } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return JSTypesGen.expectBoolean(executeAndSpecialize(leftNodeValue_, rightNodeValue_)); } @Override public void executeVoid(VirtualFrame frameValue) { int state_0 = this.state_0_; try { if ((state_0 & 0b111111000) == 0 /* only-active SpecializationActive[InNode.doObject(Object, JSObject)] && SpecializationActive[InNode.doProxy(Object, JSProxyObject, JSProxyHasPropertyNode)] && SpecializationActive[InNode.doForeign(Object, Object, IsObjectNode, InlinedBranchProfile)] */ && ((state_0 & 0b111111111) != 0 /* is-not SpecializationActive[InNode.doObject(Object, JSObject)] && SpecializationActive[InNode.doProxy(Object, JSProxyObject, JSProxyHasPropertyNode)] && SpecializationActive[InNode.doForeign(Object, Object, IsObjectNode, InlinedBranchProfile)] && SpecializationActive[InNode.doNullOrUndefined(Object, Object)] && SpecializationActive[InNode.doSymbol(Object, Symbol)] && SpecializationActive[InNode.doTString(Object, TruffleString)] && SpecializationActive[InNode.doSafeInteger(Object, SafeInteger)] && SpecializationActive[InNode.doBigInt(Object, BigInt)] && SpecializationActive[InNode.doNotTruffleObject(Object, Object)] */)) { executeBoolean(frameValue); return; } execute(frameValue); return; } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); return; } } private Object executeAndSpecialize(Object leftNodeValue, Object rightNodeValue) { int state_0 = this.state_0_; if (rightNodeValue instanceof JSObject) { JSObject rightNodeValue_ = (JSObject) rightNodeValue; if ((!(JSGuards.isJSProxy(rightNodeValue_)))) { state_0 = state_0 | 0b1 /* add SpecializationActive[InNode.doObject(Object, JSObject)] */; this.state_0_ = state_0; return doObject(leftNodeValue, rightNodeValue_); } } if (rightNodeValue instanceof JSProxyObject) { JSProxyObject rightNodeValue_ = (JSProxyObject) rightNodeValue; JSProxyHasPropertyNode proxyHasPropertyNode__ = this.insert((JSProxyHasPropertyNode.create(context))); Objects.requireNonNull(proxyHasPropertyNode__, "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.proxy_proxyHasPropertyNode_ = proxyHasPropertyNode__; state_0 = state_0 | 0b10 /* add SpecializationActive[InNode.doProxy(Object, JSProxyObject, JSProxyHasPropertyNode)] */; this.state_0_ = state_0; return doProxy(leftNodeValue, rightNodeValue_, proxyHasPropertyNode__); } if ((JSGuards.isForeignObject(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.foreign_isObjectNode_ = isObjectNode__; state_0 = state_0 | 0b100 /* add SpecializationActive[InNode.doForeign(Object, Object, IsObjectNode, InlinedBranchProfile)] */; this.state_0_ = state_0; return doForeign(leftNodeValue, rightNodeValue, isObjectNode__, INLINED_FOREIGN_ERROR_BRANCH_); } if ((JSGuards.isNullOrUndefined(rightNodeValue))) { state_0 = state_0 | 0b1000 /* add SpecializationActive[InNode.doNullOrUndefined(Object, Object)] */; this.state_0_ = state_0; return InNode.doNullOrUndefined(leftNodeValue, rightNodeValue); } if (rightNodeValue instanceof Symbol) { Symbol rightNodeValue_ = (Symbol) rightNodeValue; state_0 = state_0 | 0b10000 /* add SpecializationActive[InNode.doSymbol(Object, Symbol)] */; this.state_0_ = state_0; return InNode.doSymbol(leftNodeValue, rightNodeValue_); } if (rightNodeValue instanceof TruffleString) { TruffleString rightNodeValue_ = (TruffleString) rightNodeValue; state_0 = state_0 | 0b100000 /* add SpecializationActive[InNode.doTString(Object, TruffleString)] */; this.state_0_ = state_0; return InNode.doTString(leftNodeValue, rightNodeValue_); } if (rightNodeValue instanceof SafeInteger) { SafeInteger rightNodeValue_ = (SafeInteger) rightNodeValue; state_0 = state_0 | 0b1000000 /* add SpecializationActive[InNode.doSafeInteger(Object, SafeInteger)] */; this.state_0_ = state_0; return InNode.doSafeInteger(leftNodeValue, rightNodeValue_); } if (rightNodeValue instanceof BigInt) { BigInt rightNodeValue_ = (BigInt) rightNodeValue; state_0 = state_0 | 0b10000000 /* add SpecializationActive[InNode.doBigInt(Object, BigInt)] */; this.state_0_ = state_0; return InNode.doBigInt(leftNodeValue, rightNodeValue_); } if ((!(JSGuards.isTruffleObject(rightNodeValue)))) { state_0 = state_0 | 0b100000000 /* add SpecializationActive[InNode.doNotTruffleObject(Object, Object)] */; this.state_0_ = state_0; return InNode.doNotTruffleObject(leftNodeValue, rightNodeValue); } throw new UnsupportedSpecializationException(this, new Node[] {super.leftNode, super.rightNode}, leftNodeValue, rightNodeValue); } @NeverDefault public static InNode create(JSContext context, JavaScriptNode left, JavaScriptNode right) { return new InNodeGen(context, left, right); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy