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

com.oracle.truffle.js.nodes.binary.JSAddConstantLeftNumberNodeGen 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.DSLSupport;
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.DSLSupport.SpecializationDataNode;
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.DenyReplace;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.UnexpectedResultException;
import com.oracle.truffle.api.profiles.InlinedConditionProfile;
import com.oracle.truffle.api.strings.TruffleString;
import com.oracle.truffle.js.nodes.JSTypes;
import com.oracle.truffle.js.nodes.JSTypesGen;
import com.oracle.truffle.js.nodes.JavaScriptNode;
import com.oracle.truffle.js.nodes.cast.JSToNumberNode;
import com.oracle.truffle.js.nodes.cast.JSToPrimitiveNode;
import com.oracle.truffle.js.runtime.SafeInteger;
import com.oracle.truffle.js.runtime.builtins.JSOverloadedOperatorsObject;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.lang.invoke.MethodHandles.Lookup;
import java.util.Objects;

/**
 * Debug Info: 
 *   Specialization {@link JSAddConstantLeftNumberNode#doIntTruncate}
 *     Activation probability: 0.21250
 *     With/without class size: 6/0 bytes
 *   Specialization {@link JSAddConstantLeftNumberNode#doInt}
 *     Activation probability: 0.18750
 *     With/without class size: 6/0 bytes
 *   Specialization {@link JSAddConstantLeftNumberNode#doIntOverflow}
 *     Activation probability: 0.16250
 *     With/without class size: 5/0 bytes
 *   Specialization {@link JSAddConstantLeftNumberNode#doSafeInteger}
 *     Activation probability: 0.13750
 *     With/without class size: 5/0 bytes
 *   Specialization {@link JSAddConstantLeftNumberNode#doDouble}
 *     Activation probability: 0.11250
 *     With/without class size: 5/0 bytes
 *   Specialization {@link JSAddConstantLeftNumberNode#doNumberString}
 *     Activation probability: 0.08750
 *     With/without class size: 5/0 bytes
 *   Specialization {@link JSAddConstantLeftNumberNode#doOverloaded}
 *     Activation probability: 0.06250
 *     With/without class size: 5/4 bytes
 *   Specialization {@link JSAddConstantLeftNumberNode#doPrimitiveConversion}
 *     Activation probability: 0.03750
 *     With/without class size: 5/9 bytes
 * 
*/ @GeneratedBy(JSAddConstantLeftNumberNode.class) @SuppressWarnings("javadoc") public final class JSAddConstantLeftNumberNodeGen extends JSAddConstantLeftNumberNode { private static final StateField PRIMITIVE_CONVERSION__J_S_ADD_CONSTANT_LEFT_NUMBER_NODE_PRIMITIVE_CONVERSION_STATE_0_UPDATER = StateField.create(PrimitiveConversionData.lookup_(), "primitiveConversion_state_0_"); /** * Source Info:
     *   Specialization: {@link JSAddConstantLeftNumberNode#doPrimitiveConversion}
     *   Parameter: {@link InlinedConditionProfile} profileB
     *   Inline method: {@link InlinedConditionProfile#inline}
*/ private static final InlinedConditionProfile INLINED_PRIMITIVE_CONVERSION_PROFILE_B_ = InlinedConditionProfile.inline(InlineTarget.create(InlinedConditionProfile.class, PRIMITIVE_CONVERSION__J_S_ADD_CONSTANT_LEFT_NUMBER_NODE_PRIMITIVE_CONVERSION_STATE_0_UPDATER.subUpdater(0, 2))); /** * State Info:
     *   0: SpecializationActive {@link JSAddConstantLeftNumberNode#doIntTruncate}
     *   1: SpecializationActive {@link JSAddConstantLeftNumberNode#doInt}
     *   2: SpecializationExcluded {@link JSAddConstantLeftNumberNode#doInt}
     *   3: SpecializationActive {@link JSAddConstantLeftNumberNode#doPrimitiveConversion}
     *   4: SpecializationActive {@link JSAddConstantLeftNumberNode#doIntOverflow}
     *   5: SpecializationExcluded {@link JSAddConstantLeftNumberNode#doIntOverflow}
     *   6: SpecializationActive {@link JSAddConstantLeftNumberNode#doSafeInteger}
     *   7: SpecializationExcluded {@link JSAddConstantLeftNumberNode#doSafeInteger}
     *   8: SpecializationActive {@link JSAddConstantLeftNumberNode#doDouble}
     *   9: SpecializationActive {@link JSAddConstantLeftNumberNode#doNumberString}
     *   10: SpecializationActive {@link JSAddConstantLeftNumberNode#doOverloaded}
     *   11-13: ImplicitCast[type=double, index=0]
     * 
*/ @CompilationFinal private int state_0_; /** * Source Info:
     *   Specialization: {@link JSAddConstantLeftNumberNode#doNumberString}
     *   Parameter: {@link TruffleString} leftString
*/ @CompilationFinal private TruffleString leftString; /** * Source Info:
     *   Specialization: {@link JSAddConstantLeftNumberNode#doNumberString}
     *   Parameter: {@link JSConcatStringsNode} createLazyString
*/ @Child private JSConcatStringsNode createLazyString; /** * Source Info:
     *   Specialization: {@link JSAddConstantLeftNumberNode#doOverloaded}
     *   Parameter: {@link JSOverloadedBinaryNode} overloadedOperatorNode
*/ @Child private JSOverloadedBinaryNode overloaded_overloadedOperatorNode_; @Child private PrimitiveConversionData primitiveConversion_cache; private JSAddConstantLeftNumberNodeGen(Number leftValue, JavaScriptNode right, boolean truncate) { super(leftValue, right, truncate); } @Override public Object execute(VirtualFrame frameValue) { int state_0 = this.state_0_; if ((state_0 & 0b11101001000) == 0 /* only-active SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] */ && ((state_0 & 0b11101011011) != 0 /* is-not SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doSafeInteger(SafeInteger)] && SpecializationActive[JSAddConstantLeftNumberNode.doDouble(double)] && SpecializationActive[JSAddConstantLeftNumberNode.doNumberString(TruffleString, TruffleString, JSConcatStringsNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doOverloaded(JSOverloadedOperatorsObject, JSOverloadedBinaryNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doPrimitiveConversion(Object, Node, JSToPrimitiveNode, JSToNumberNode, TruffleString, JSConcatStringsNode, InlinedConditionProfile)] */)) { return execute_int0(state_0, frameValue); } else if ((state_0 & 0b11001011011) == 0 /* only-active SpecializationActive[JSAddConstantLeftNumberNode.doDouble(double)] */ && ((state_0 & 0b11101011011) != 0 /* is-not SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doSafeInteger(SafeInteger)] && SpecializationActive[JSAddConstantLeftNumberNode.doDouble(double)] && SpecializationActive[JSAddConstantLeftNumberNode.doNumberString(TruffleString, TruffleString, JSConcatStringsNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doOverloaded(JSOverloadedOperatorsObject, JSOverloadedBinaryNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doPrimitiveConversion(Object, Node, JSToPrimitiveNode, JSToNumberNode, TruffleString, JSConcatStringsNode, InlinedConditionProfile)] */)) { return execute_double1(state_0, frameValue); } else { return execute_generic2(state_0, frameValue); } } private Object execute_int0(int state_0__, VirtualFrame frameValue) { int state_0 = state_0__; int operandNodeValue_; try { operandNodeValue_ = super.operandNode.executeInt(frameValue); } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(ex.getResult()); } if ((state_0 & 0b10011) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] || SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] || SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] */) { assert DSLSupport.assertIdempotence((truncate)); assert DSLSupport.assertIdempotence((isInt)); return doIntTruncate(operandNodeValue_); } if ((state_0 & 0b10) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] */) { assert DSLSupport.assertIdempotence((!(truncate))); assert DSLSupport.assertIdempotence((isInt)); try { return doInt(operandNodeValue_); } catch (ArithmeticException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); state_0 = this.state_0_; state_0 = state_0 & 0xfffffffd /* remove SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] */; state_0 = state_0 | 0b100 /* add SpecializationExcluded */; this.state_0_ = state_0; return executeAndSpecialize(operandNodeValue_); } } if ((state_0 & 0b10000) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] */) { assert DSLSupport.assertIdempotence((!(truncate))); assert DSLSupport.assertIdempotence((isSafeLong)); try { return doIntOverflow(operandNodeValue_); } catch (ArithmeticException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); state_0 = this.state_0_; state_0 = state_0 & 0xffffffef /* remove SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] */; state_0 = state_0 | 0b100000 /* add SpecializationExcluded */; this.state_0_ = state_0; return executeAndSpecialize(operandNodeValue_); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(operandNodeValue_); } private Object execute_double1(int state_0__, VirtualFrame frameValue) { int state_0 = state_0__; int operandNodeValue_int = 0; double operandNodeValue_; try { if ((state_0 & 0b11000000000000) == 0 /* only-active ImplicitCast[type=double, index=0] */ && ((state_0 & 0b11101011011) != 0 /* is-not SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doSafeInteger(SafeInteger)] && SpecializationActive[JSAddConstantLeftNumberNode.doDouble(double)] && SpecializationActive[JSAddConstantLeftNumberNode.doNumberString(TruffleString, TruffleString, JSConcatStringsNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doOverloaded(JSOverloadedOperatorsObject, JSOverloadedBinaryNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doPrimitiveConversion(Object, Node, JSToPrimitiveNode, JSToNumberNode, TruffleString, JSConcatStringsNode, InlinedConditionProfile)] */)) { operandNodeValue_ = super.operandNode.executeDouble(frameValue); } else if ((state_0 & 0b10100000000000) == 0 /* only-active ImplicitCast[type=double, index=0] */ && ((state_0 & 0b11101011011) != 0 /* is-not SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doSafeInteger(SafeInteger)] && SpecializationActive[JSAddConstantLeftNumberNode.doDouble(double)] && SpecializationActive[JSAddConstantLeftNumberNode.doNumberString(TruffleString, TruffleString, JSConcatStringsNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doOverloaded(JSOverloadedOperatorsObject, JSOverloadedBinaryNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doPrimitiveConversion(Object, Node, JSToPrimitiveNode, JSToNumberNode, TruffleString, JSConcatStringsNode, InlinedConditionProfile)] */)) { operandNodeValue_int = super.operandNode.executeInt(frameValue); operandNodeValue_ = JSTypes.intToDouble(operandNodeValue_int); } else { Object operandNodeValue__ = super.operandNode.execute(frameValue); operandNodeValue_ = JSTypesGen.expectImplicitDouble((state_0 & 0b11100000000000) >>> 11 /* get-int ImplicitCast[type=double, index=0] */, operandNodeValue__); } } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(ex.getResult()); } assert (state_0 & 0b100000000) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doDouble(double)] */; return doDouble(operandNodeValue_); } private Object execute_generic2(int state_0__, VirtualFrame frameValue) { int state_0 = state_0__; Object operandNodeValue_ = super.operandNode.execute(frameValue); if ((state_0 & 0b11101011011) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] || SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] || SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] || SpecializationActive[JSAddConstantLeftNumberNode.doSafeInteger(SafeInteger)] || SpecializationActive[JSAddConstantLeftNumberNode.doDouble(double)] || SpecializationActive[JSAddConstantLeftNumberNode.doNumberString(TruffleString, TruffleString, JSConcatStringsNode)] || SpecializationActive[JSAddConstantLeftNumberNode.doOverloaded(JSOverloadedOperatorsObject, JSOverloadedBinaryNode)] || SpecializationActive[JSAddConstantLeftNumberNode.doPrimitiveConversion(Object, Node, JSToPrimitiveNode, JSToNumberNode, TruffleString, JSConcatStringsNode, InlinedConditionProfile)] */) { if ((state_0 & 0b10011) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] || SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] || SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] */ && operandNodeValue_ instanceof Integer) { int operandNodeValue__ = (int) operandNodeValue_; if ((state_0 & 0b1) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] */) { assert DSLSupport.assertIdempotence((truncate)); assert DSLSupport.assertIdempotence((isInt)); return doIntTruncate(operandNodeValue__); } if ((state_0 & 0b10) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] */) { assert DSLSupport.assertIdempotence((!(truncate))); assert DSLSupport.assertIdempotence((isInt)); try { return doInt(operandNodeValue__); } catch (ArithmeticException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); state_0 = this.state_0_; state_0 = state_0 & 0xfffffffd /* remove SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] */; state_0 = state_0 | 0b100 /* add SpecializationExcluded */; this.state_0_ = state_0; return executeAndSpecialize(operandNodeValue__); } } if ((state_0 & 0b10000) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] */) { assert DSLSupport.assertIdempotence((!(truncate))); assert DSLSupport.assertIdempotence((isSafeLong)); try { return doIntOverflow(operandNodeValue__); } catch (ArithmeticException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); state_0 = this.state_0_; state_0 = state_0 & 0xffffffef /* remove SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] */; state_0 = state_0 | 0b100000 /* add SpecializationExcluded */; this.state_0_ = state_0; return executeAndSpecialize(operandNodeValue__); } } } if ((state_0 & 0b1000000) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doSafeInteger(SafeInteger)] */ && operandNodeValue_ instanceof SafeInteger) { SafeInteger operandNodeValue__ = (SafeInteger) operandNodeValue_; assert DSLSupport.assertIdempotence((isInt)); try { return doSafeInteger(operandNodeValue__); } catch (ArithmeticException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); state_0 = this.state_0_; state_0 = state_0 & 0xffffffbf /* remove SpecializationActive[JSAddConstantLeftNumberNode.doSafeInteger(SafeInteger)] */; state_0 = state_0 | 0b10000000 /* add SpecializationExcluded */; this.state_0_ = state_0; return executeAndSpecialize(operandNodeValue__); } } if ((state_0 & 0b100000000) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doDouble(double)] */ && JSTypesGen.isImplicitDouble((state_0 & 0b11100000000000) >>> 11 /* get-int ImplicitCast[type=double, index=0] */, operandNodeValue_)) { double operandNodeValue__ = JSTypesGen.asImplicitDouble((state_0 & 0b11100000000000) >>> 11 /* get-int ImplicitCast[type=double, index=0] */, operandNodeValue_); return doDouble(operandNodeValue__); } if ((state_0 & 0b1000000000) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doNumberString(TruffleString, TruffleString, JSConcatStringsNode)] */ && operandNodeValue_ instanceof TruffleString) { TruffleString operandNodeValue__ = (TruffleString) operandNodeValue_; { TruffleString leftString_ = this.leftString; if (leftString_ != null) { JSConcatStringsNode createLazyString_ = this.createLazyString; if (createLazyString_ != null) { return doNumberString(operandNodeValue__, leftString_, createLazyString_); } } } } if ((state_0 & 0b10000000000) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doOverloaded(JSOverloadedOperatorsObject, JSOverloadedBinaryNode)] */ && operandNodeValue_ instanceof JSOverloadedOperatorsObject) { JSOverloadedOperatorsObject operandNodeValue__ = (JSOverloadedOperatorsObject) operandNodeValue_; { JSOverloadedBinaryNode overloadedOperatorNode__ = this.overloaded_overloadedOperatorNode_; if (overloadedOperatorNode__ != null) { return doOverloaded(operandNodeValue__, overloadedOperatorNode__); } } } if ((state_0 & 0b1000) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doPrimitiveConversion(Object, Node, JSToPrimitiveNode, JSToNumberNode, TruffleString, JSConcatStringsNode, InlinedConditionProfile)] */) { PrimitiveConversionData s7_ = this.primitiveConversion_cache; if (s7_ != null) { { TruffleString leftString_1 = this.leftString; if (leftString_1 != null) { JSConcatStringsNode createLazyString_1 = this.createLazyString; if (createLazyString_1 != null) { if ((!(hasOverloadedOperators(operandNodeValue_)))) { Node node__ = (s7_); return doPrimitiveConversion(operandNodeValue_, node__, s7_.toPrimitiveB_, s7_.toNumberB_, leftString_1, createLazyString_1, INLINED_PRIMITIVE_CONVERSION_PROFILE_B_); } } } } } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(operandNodeValue_); } @Override public double executeDouble(VirtualFrame frameValue) throws UnexpectedResultException { int state_0 = this.state_0_; if ((state_0 & 0b11000011000) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] || SpecializationActive[JSAddConstantLeftNumberNode.doNumberString(TruffleString, TruffleString, JSConcatStringsNode)] || SpecializationActive[JSAddConstantLeftNumberNode.doOverloaded(JSOverloadedOperatorsObject, JSOverloadedBinaryNode)] || SpecializationActive[JSAddConstantLeftNumberNode.doPrimitiveConversion(Object, Node, JSToPrimitiveNode, JSToNumberNode, TruffleString, JSConcatStringsNode, InlinedConditionProfile)] */) { return JSTypesGen.expectDouble(execute(frameValue)); } int operandNodeValue_int = 0; double operandNodeValue_; try { if ((state_0 & 0b11000000000000) == 0 /* only-active ImplicitCast[type=double, index=0] */ && ((state_0 & 0b11101011011) != 0 /* is-not SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doSafeInteger(SafeInteger)] && SpecializationActive[JSAddConstantLeftNumberNode.doDouble(double)] && SpecializationActive[JSAddConstantLeftNumberNode.doNumberString(TruffleString, TruffleString, JSConcatStringsNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doOverloaded(JSOverloadedOperatorsObject, JSOverloadedBinaryNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doPrimitiveConversion(Object, Node, JSToPrimitiveNode, JSToNumberNode, TruffleString, JSConcatStringsNode, InlinedConditionProfile)] */)) { operandNodeValue_ = super.operandNode.executeDouble(frameValue); } else if ((state_0 & 0b10100000000000) == 0 /* only-active ImplicitCast[type=double, index=0] */ && ((state_0 & 0b11101011011) != 0 /* is-not SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doSafeInteger(SafeInteger)] && SpecializationActive[JSAddConstantLeftNumberNode.doDouble(double)] && SpecializationActive[JSAddConstantLeftNumberNode.doNumberString(TruffleString, TruffleString, JSConcatStringsNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doOverloaded(JSOverloadedOperatorsObject, JSOverloadedBinaryNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doPrimitiveConversion(Object, Node, JSToPrimitiveNode, JSToNumberNode, TruffleString, JSConcatStringsNode, InlinedConditionProfile)] */)) { operandNodeValue_int = super.operandNode.executeInt(frameValue); operandNodeValue_ = JSTypes.intToDouble(operandNodeValue_int); } else { Object operandNodeValue__ = super.operandNode.execute(frameValue); operandNodeValue_ = JSTypesGen.expectImplicitDouble((state_0 & 0b11100000000000) >>> 11 /* get-int ImplicitCast[type=double, index=0] */, operandNodeValue__); } } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); return JSTypesGen.expectDouble(executeAndSpecialize(ex.getResult())); } if ((state_0 & 0b100000000) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doDouble(double)] */) { return doDouble(operandNodeValue_); } CompilerDirectives.transferToInterpreterAndInvalidate(); return JSTypesGen.expectDouble(executeAndSpecialize(((state_0 & 0b10100000000000) == 0 /* only-active ImplicitCast[type=double, index=0] */ && ((state_0 & 0b11101011011) != 0 /* is-not SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doSafeInteger(SafeInteger)] && SpecializationActive[JSAddConstantLeftNumberNode.doDouble(double)] && SpecializationActive[JSAddConstantLeftNumberNode.doNumberString(TruffleString, TruffleString, JSConcatStringsNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doOverloaded(JSOverloadedOperatorsObject, JSOverloadedBinaryNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doPrimitiveConversion(Object, Node, JSToPrimitiveNode, JSToNumberNode, TruffleString, JSConcatStringsNode, InlinedConditionProfile)] */) ? (Object) operandNodeValue_int : (Object) operandNodeValue_))); } @Override public int executeInt(VirtualFrame frameValue) throws UnexpectedResultException { int state_0 = this.state_0_; if ((state_0 & 0b11000011000) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] || SpecializationActive[JSAddConstantLeftNumberNode.doNumberString(TruffleString, TruffleString, JSConcatStringsNode)] || SpecializationActive[JSAddConstantLeftNumberNode.doOverloaded(JSOverloadedOperatorsObject, JSOverloadedBinaryNode)] || SpecializationActive[JSAddConstantLeftNumberNode.doPrimitiveConversion(Object, Node, JSToPrimitiveNode, JSToNumberNode, TruffleString, JSConcatStringsNode, InlinedConditionProfile)] */) { return JSTypesGen.expectInteger(execute(frameValue)); } int operandNodeValue_; try { operandNodeValue_ = super.operandNode.executeInt(frameValue); } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); return JSTypesGen.expectInteger(executeAndSpecialize(ex.getResult())); } if ((state_0 & 0b11) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] || SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] */) { assert DSLSupport.assertIdempotence((truncate)); assert DSLSupport.assertIdempotence((isInt)); return doIntTruncate(operandNodeValue_); } if ((state_0 & 0b10) != 0 /* is SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] */) { assert DSLSupport.assertIdempotence((!(truncate))); assert DSLSupport.assertIdempotence((isInt)); try { return doInt(operandNodeValue_); } catch (ArithmeticException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); state_0 = this.state_0_; state_0 = state_0 & 0xfffffffd /* remove SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] */; state_0 = state_0 | 0b100 /* add SpecializationExcluded */; this.state_0_ = state_0; return JSTypesGen.expectInteger(executeAndSpecialize(operandNodeValue_)); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return JSTypesGen.expectInteger(executeAndSpecialize(operandNodeValue_)); } @Override public void executeVoid(VirtualFrame frameValue) { int state_0 = this.state_0_; try { if ((state_0 & 0b11101011000) == 0 /* only-active SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] */ && ((state_0 & 0b11101011011) != 0 /* is-not SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doSafeInteger(SafeInteger)] && SpecializationActive[JSAddConstantLeftNumberNode.doDouble(double)] && SpecializationActive[JSAddConstantLeftNumberNode.doNumberString(TruffleString, TruffleString, JSConcatStringsNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doOverloaded(JSOverloadedOperatorsObject, JSOverloadedBinaryNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doPrimitiveConversion(Object, Node, JSToPrimitiveNode, JSToNumberNode, TruffleString, JSConcatStringsNode, InlinedConditionProfile)] */)) { executeInt(frameValue); return; } else if ((state_0 & 0b11001011011) == 0 /* only-active SpecializationActive[JSAddConstantLeftNumberNode.doDouble(double)] */ && ((state_0 & 0b11101011011) != 0 /* is-not SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] && SpecializationActive[JSAddConstantLeftNumberNode.doSafeInteger(SafeInteger)] && SpecializationActive[JSAddConstantLeftNumberNode.doDouble(double)] && SpecializationActive[JSAddConstantLeftNumberNode.doNumberString(TruffleString, TruffleString, JSConcatStringsNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doOverloaded(JSOverloadedOperatorsObject, JSOverloadedBinaryNode)] && SpecializationActive[JSAddConstantLeftNumberNode.doPrimitiveConversion(Object, Node, JSToPrimitiveNode, JSToNumberNode, TruffleString, JSConcatStringsNode, InlinedConditionProfile)] */)) { executeDouble(frameValue); return; } execute(frameValue); return; } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); return; } } private Object executeAndSpecialize(Object operandNodeValue) { int state_0 = this.state_0_; if (operandNodeValue instanceof Integer) { int operandNodeValue_ = (int) operandNodeValue; if ((truncate) && (isInt)) { state_0 = state_0 | 0b1 /* add SpecializationActive[JSAddConstantLeftNumberNode.doIntTruncate(int)] */; this.state_0_ = state_0; return doIntTruncate(operandNodeValue_); } if (((state_0 & 0b1000)) == 0 /* is-not SpecializationActive[JSAddConstantLeftNumberNode.doPrimitiveConversion(Object, Node, JSToPrimitiveNode, JSToNumberNode, TruffleString, JSConcatStringsNode, InlinedConditionProfile)] */ && ((state_0 & 0b100)) == 0 /* is-not SpecializationExcluded */) { if ((!(truncate)) && (isInt)) { state_0 = state_0 | 0b10 /* add SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] */; this.state_0_ = state_0; try { return doInt(operandNodeValue_); } catch (ArithmeticException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); state_0 = this.state_0_; state_0 = state_0 & 0xfffffffd /* remove SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)] */; state_0 = state_0 | 0b100 /* add SpecializationExcluded */; this.state_0_ = state_0; return executeAndSpecialize(operandNodeValue_); } } } if (((state_0 & 0b100000)) == 0 /* is-not SpecializationExcluded */) { if ((!(truncate)) && (isSafeLong)) { state_0 = state_0 | 0b10000 /* add SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] */; this.state_0_ = state_0; try { return doIntOverflow(operandNodeValue_); } catch (ArithmeticException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); state_0 = this.state_0_; state_0 = state_0 & 0xffffffef /* remove SpecializationActive[JSAddConstantLeftNumberNode.doIntOverflow(int)] */; state_0 = state_0 | 0b100000 /* add SpecializationExcluded */; this.state_0_ = state_0; return executeAndSpecialize(operandNodeValue_); } } } } if (((state_0 & 0b10000000)) == 0 /* is-not SpecializationExcluded */ && operandNodeValue instanceof SafeInteger) { SafeInteger operandNodeValue_ = (SafeInteger) operandNodeValue; if ((isInt)) { state_0 = state_0 | 0b1000000 /* add SpecializationActive[JSAddConstantLeftNumberNode.doSafeInteger(SafeInteger)] */; this.state_0_ = state_0; try { return doSafeInteger(operandNodeValue_); } catch (ArithmeticException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); state_0 = this.state_0_; state_0 = state_0 & 0xffffffbf /* remove SpecializationActive[JSAddConstantLeftNumberNode.doSafeInteger(SafeInteger)] */; state_0 = state_0 | 0b10000000 /* add SpecializationExcluded */; this.state_0_ = state_0; return executeAndSpecialize(operandNodeValue_); } } } if (((state_0 & 0b1000)) == 0 /* is-not SpecializationActive[JSAddConstantLeftNumberNode.doPrimitiveConversion(Object, Node, JSToPrimitiveNode, JSToNumberNode, TruffleString, JSConcatStringsNode, InlinedConditionProfile)] */) { int doubleCast0; if ((doubleCast0 = JSTypesGen.specializeImplicitDouble(operandNodeValue)) != 0) { double operandNodeValue_ = JSTypesGen.asImplicitDouble(doubleCast0, operandNodeValue); state_0 = (state_0 | (doubleCast0 << 11) /* set-int ImplicitCast[type=double, index=0] */); state_0 = state_0 | 0b100000000 /* add SpecializationActive[JSAddConstantLeftNumberNode.doDouble(double)] */; this.state_0_ = state_0; return doDouble(operandNodeValue_); } } if (((state_0 & 0b1000)) == 0 /* is-not SpecializationActive[JSAddConstantLeftNumberNode.doPrimitiveConversion(Object, Node, JSToPrimitiveNode, JSToNumberNode, TruffleString, JSConcatStringsNode, InlinedConditionProfile)] */ && operandNodeValue instanceof TruffleString) { TruffleString operandNodeValue_ = (TruffleString) operandNodeValue; TruffleString leftString_; TruffleString leftString__shared = this.leftString; if (leftString__shared != null) { leftString_ = leftString__shared; } else { leftString_ = (leftValueToString()); if (leftString_ == null) { throw new IllegalStateException("A specialization returned a default value for a cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.leftString == null) { VarHandle.storeStoreFence(); this.leftString = leftString_; } JSConcatStringsNode createLazyString_; JSConcatStringsNode createLazyString__shared = this.createLazyString; if (createLazyString__shared != null) { createLazyString_ = createLazyString__shared; } else { createLazyString_ = this.insert((JSConcatStringsNode.create())); if (createLazyString_ == null) { throw new IllegalStateException("A specialization returned a default value for a cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.createLazyString == null) { VarHandle.storeStoreFence(); this.createLazyString = createLazyString_; } state_0 = state_0 | 0b1000000000 /* add SpecializationActive[JSAddConstantLeftNumberNode.doNumberString(TruffleString, TruffleString, JSConcatStringsNode)] */; this.state_0_ = state_0; return doNumberString(operandNodeValue_, leftString_, createLazyString_); } if (operandNodeValue instanceof JSOverloadedOperatorsObject) { JSOverloadedOperatorsObject operandNodeValue_ = (JSOverloadedOperatorsObject) operandNodeValue; JSOverloadedBinaryNode overloadedOperatorNode__ = this.insert((JSOverloadedBinaryNode.createHintDefault(getOverloadedOperatorName()))); Objects.requireNonNull(overloadedOperatorNode__, "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.overloaded_overloadedOperatorNode_ = overloadedOperatorNode__; state_0 = state_0 | 0b10000000000 /* add SpecializationActive[JSAddConstantLeftNumberNode.doOverloaded(JSOverloadedOperatorsObject, JSOverloadedBinaryNode)] */; this.state_0_ = state_0; return doOverloaded(operandNodeValue_, overloadedOperatorNode__); } { Node node__ = null; if ((!(hasOverloadedOperators(operandNodeValue)))) { PrimitiveConversionData s7_ = this.insert(new PrimitiveConversionData()); node__ = (s7_); JSToPrimitiveNode toPrimitiveB__ = s7_.insert((JSToPrimitiveNode.createHintDefault())); Objects.requireNonNull(toPrimitiveB__, "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."); s7_.toPrimitiveB_ = toPrimitiveB__; JSToNumberNode toNumberB__ = s7_.insert((JSToNumberNode.create())); Objects.requireNonNull(toNumberB__, "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."); s7_.toNumberB_ = toNumberB__; TruffleString leftString_1; TruffleString leftString_1_shared = this.leftString; if (leftString_1_shared != null) { leftString_1 = leftString_1_shared; } else { leftString_1 = (leftValueToString()); if (leftString_1 == null) { throw new IllegalStateException("A specialization returned a default value for a cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.leftString == null) { this.leftString = leftString_1; } JSConcatStringsNode createLazyString_1; JSConcatStringsNode createLazyString_1_shared = this.createLazyString; if (createLazyString_1_shared != null) { createLazyString_1 = createLazyString_1_shared; } else { createLazyString_1 = s7_.insert((JSConcatStringsNode.create())); if (createLazyString_1 == null) { throw new IllegalStateException("A specialization returned a default value for a cached initializer. Default values are not supported for shared cached initializers because the default value is reserved for the uninitialized state."); } } if (this.createLazyString == null) { this.createLazyString = createLazyString_1; } VarHandle.storeStoreFence(); this.primitiveConversion_cache = s7_; state_0 = state_0 & 0xfffffcfd /* remove SpecializationActive[JSAddConstantLeftNumberNode.doInt(int)], SpecializationActive[JSAddConstantLeftNumberNode.doDouble(double)], SpecializationActive[JSAddConstantLeftNumberNode.doNumberString(TruffleString, TruffleString, JSConcatStringsNode)] */; state_0 = state_0 | 0b1000 /* add SpecializationActive[JSAddConstantLeftNumberNode.doPrimitiveConversion(Object, Node, JSToPrimitiveNode, JSToNumberNode, TruffleString, JSConcatStringsNode, InlinedConditionProfile)] */; this.state_0_ = state_0; return doPrimitiveConversion(operandNodeValue, node__, toPrimitiveB__, toNumberB__, leftString_1, createLazyString_1, INLINED_PRIMITIVE_CONVERSION_PROFILE_B_); } } throw new UnsupportedSpecializationException(this, new Node[] {super.operandNode}, operandNodeValue); } @NeverDefault public static JSAddConstantLeftNumberNode create(Number leftValue, JavaScriptNode right, boolean truncate) { return new JSAddConstantLeftNumberNodeGen(leftValue, right, truncate); } @GeneratedBy(JSAddConstantLeftNumberNode.class) @DenyReplace private static final class PrimitiveConversionData extends Node implements SpecializationDataNode { /** * State Info:
         *   0-1: InlinedCache
         *        Specialization: {@link JSAddConstantLeftNumberNode#doPrimitiveConversion}
         *        Parameter: {@link InlinedConditionProfile} profileB
         *        Inline method: {@link InlinedConditionProfile#inline}
         * 
*/ @CompilationFinal @UnsafeAccessedField private int primitiveConversion_state_0_; /** * Source Info:
         *   Specialization: {@link JSAddConstantLeftNumberNode#doPrimitiveConversion}
         *   Parameter: {@link JSToPrimitiveNode} toPrimitiveB
*/ @Child JSToPrimitiveNode toPrimitiveB_; /** * Source Info:
         *   Specialization: {@link JSAddConstantLeftNumberNode#doPrimitiveConversion}
         *   Parameter: {@link JSToNumberNode} toNumberB
*/ @Child JSToNumberNode toNumberB_; PrimitiveConversionData() { } private static Lookup lookup_() { return MethodHandles.lookup(); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy