com.oracle.truffle.js.nodes.binary.JSModuloNodeGen 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.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.InlinedBranchProfile;
import com.oracle.truffle.js.nodes.JSGuards;
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.JSToNumericNode;
import com.oracle.truffle.js.runtime.BigInt;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.lang.invoke.MethodHandles.Lookup;
import java.util.Objects;
/**
* Debug Info:
* Specialization {@link JSModuloNode#doIntPow2}
* Activation probability: 0.23929
* With/without class size: 8/1 bytes
* Specialization {@link JSModuloNode#doInt}
* Activation probability: 0.20714
* With/without class size: 8/1 bytes
* Specialization {@link JSModuloNode#doDouble}
* Activation probability: 0.17500
* With/without class size: 6/0 bytes
* Specialization {@link JSModuloNode#doBigIntegerZeroDivision}
* Activation probability: 0.14286
* With/without class size: 5/0 bytes
* Specialization {@link JSModuloNode#doBigInteger}
* Activation probability: 0.11071
* With/without class size: 5/0 bytes
* Specialization {@link JSModuloNode#doOverloaded}
* Activation probability: 0.07857
* With/without class size: 5/4 bytes
* Specialization {@link JSModuloNode#doGeneric}
* Activation probability: 0.04643
* With/without class size: 5/13 bytes
*
*/
@GeneratedBy(JSModuloNode.class)
@SuppressWarnings("javadoc")
public final class JSModuloNodeGen extends JSModuloNode {
private static final StateField STATE_0_JSModuloNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_");
private static final StateField GENERIC__J_S_MODULO_NODE_GENERIC_STATE_0_UPDATER = StateField.create(GenericData.lookup_(), "generic_state_0_");
/**
* Source Info:
* Specialization: {@link JSModuloNode#doIntPow2}
* Parameter: {@link InlinedBranchProfile} negativeBranch
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_INT_POW2_NEGATIVE_BRANCH_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_JSModuloNode_UPDATER.subUpdater(15, 1)));
/**
* Source Info:
* Specialization: {@link JSModuloNode#doIntPow2}
* Parameter: {@link InlinedBranchProfile} negativeZeroBranch
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_INT_POW2_NEGATIVE_ZERO_BRANCH_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_JSModuloNode_UPDATER.subUpdater(16, 1)));
/**
* Source Info:
* Specialization: {@link JSModuloNode#doInt}
* Parameter: {@link InlinedBranchProfile} specialBranch
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_INT_SPECIAL_BRANCH_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, STATE_0_JSModuloNode_UPDATER.subUpdater(17, 1)));
/**
* Source Info:
* Specialization: {@link JSModuloNode#doGeneric}
* Parameter: {@link InlinedBranchProfile} mixedNumericTypes
* Inline method: {@link InlinedBranchProfile#inline}
*/
private static final InlinedBranchProfile INLINED_GENERIC_MIXED_NUMERIC_TYPES_ = InlinedBranchProfile.inline(InlineTarget.create(InlinedBranchProfile.class, GENERIC__J_S_MODULO_NODE_GENERIC_STATE_0_UPDATER.subUpdater(0, 1)));
/**
* State Info:
* 0: SpecializationActive {@link JSModuloNode#doIntPow2}
* 1: SpecializationExcluded {@link JSModuloNode#doIntPow2}
* 2: SpecializationActive {@link JSModuloNode#doInt}
* 3: SpecializationExcluded {@link JSModuloNode#doInt}
* 4: SpecializationActive {@link JSModuloNode#doGeneric}
* 5: SpecializationActive {@link JSModuloNode#doDouble}
* 6: SpecializationActive {@link JSModuloNode#doBigIntegerZeroDivision}
* 7: SpecializationActive {@link JSModuloNode#doBigInteger}
* 8: SpecializationActive {@link JSModuloNode#doOverloaded}
* 9-11: ImplicitCast[type=double, index=0]
* 12-14: ImplicitCast[type=double, index=1]
* 15: InlinedCache
* Specialization: {@link JSModuloNode#doIntPow2}
* Parameter: {@link InlinedBranchProfile} negativeBranch
* Inline method: {@link InlinedBranchProfile#inline}
* 16: InlinedCache
* Specialization: {@link JSModuloNode#doIntPow2}
* Parameter: {@link InlinedBranchProfile} negativeZeroBranch
* Inline method: {@link InlinedBranchProfile#inline}
* 17: InlinedCache
* Specialization: {@link JSModuloNode#doInt}
* Parameter: {@link InlinedBranchProfile} specialBranch
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int state_0_;
/**
* Source Info:
* Specialization: {@link JSModuloNode#doOverloaded}
* Parameter: {@link JSOverloadedBinaryNode} overloadedOperatorNode
*/
@Child private JSOverloadedBinaryNode overloaded_overloadedOperatorNode_;
@Child private GenericData generic_cache;
private JSModuloNodeGen(JavaScriptNode left, JavaScriptNode right) {
super(left, right);
}
@Override
public Object execute(Object leftNodeValue, Object rightNodeValue) {
int state_0 = this.state_0_;
if ((state_0 & 0b110110101) != 0 /* is SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] || SpecializationActive[JSModuloNode.doDouble(double, double)] || SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] || SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] || SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */) {
if ((state_0 & 0b101) != 0 /* is SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] */ && leftNodeValue instanceof Integer) {
int leftNodeValue_ = (int) leftNodeValue;
if (rightNodeValue instanceof Integer) {
int rightNodeValue_ = (int) rightNodeValue;
if ((state_0 & 0b1) != 0 /* is SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((JSModuloNode.isPowOf2(rightNodeValue_))) {
try {
return doIntPow2(leftNodeValue_, rightNodeValue_, INLINED_INT_POW2_NEGATIVE_BRANCH_, INLINED_INT_POW2_NEGATIVE_ZERO_BRANCH_);
} catch (ArithmeticException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
state_0 = this.state_0_;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationExcluded */;
this.state_0_ = state_0;
return executeAndSpecialize(leftNodeValue_, rightNodeValue_);
}
}
}
if ((state_0 & 0b100) != 0 /* is SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] */) {
if ((!(JSModuloNode.isPowOf2(rightNodeValue_)))) {
try {
return doInt(leftNodeValue_, rightNodeValue_, INLINED_INT_SPECIAL_BRANCH_);
} catch (ArithmeticException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
state_0 = this.state_0_;
state_0 = state_0 & 0xfffffffb /* remove SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] */;
state_0 = state_0 | 0b1000 /* add SpecializationExcluded */;
this.state_0_ = state_0;
return executeAndSpecialize(leftNodeValue_, rightNodeValue_);
}
}
}
}
}
if ((state_0 & 0b100000) != 0 /* is SpecializationActive[JSModuloNode.doDouble(double, double)] */ && JSTypesGen.isImplicitDouble((state_0 & 0b111000000000) >>> 9 /* get-int ImplicitCast[type=double, index=0] */, leftNodeValue)) {
double leftNodeValue_ = JSTypesGen.asImplicitDouble((state_0 & 0b111000000000) >>> 9 /* get-int ImplicitCast[type=double, index=0] */, leftNodeValue);
if (JSTypesGen.isImplicitDouble((state_0 & 0b111000000000000) >>> 12 /* get-int ImplicitCast[type=double, index=1] */, rightNodeValue)) {
double rightNodeValue_ = JSTypesGen.asImplicitDouble((state_0 & 0b111000000000000) >>> 12 /* get-int ImplicitCast[type=double, index=1] */, rightNodeValue);
return doDouble(leftNodeValue_, rightNodeValue_);
}
}
if ((state_0 & 0b10000000) != 0 /* is SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] */ && leftNodeValue instanceof BigInt) {
BigInt leftNodeValue_ = (BigInt) leftNodeValue;
if (rightNodeValue instanceof BigInt) {
BigInt rightNodeValue_ = (BigInt) rightNodeValue;
if ((!(JSGuards.isBigIntZero(rightNodeValue_)))) {
return doBigInteger(leftNodeValue_, rightNodeValue_);
}
}
}
if ((state_0 & 0b100010000) != 0 /* is SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] || SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */) {
if ((state_0 & 0b100000000) != 0 /* is SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] */) {
{
JSOverloadedBinaryNode overloadedOperatorNode__ = this.overloaded_overloadedOperatorNode_;
if (overloadedOperatorNode__ != null) {
if ((hasOverloadedOperators(leftNodeValue) || hasOverloadedOperators(rightNodeValue))) {
return doOverloaded(leftNodeValue, rightNodeValue, overloadedOperatorNode__);
}
}
}
}
if ((state_0 & 0b10000) != 0 /* is SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */) {
GenericData s6_ = this.generic_cache;
if (s6_ != null) {
if ((!(hasOverloadedOperators(leftNodeValue))) && (!(hasOverloadedOperators(rightNodeValue)))) {
Node node__ = (s6_);
return JSModuloNode.doGeneric(leftNodeValue, rightNodeValue, node__, s6_.nestedModuloNode_, s6_.toNumeric1Node_, s6_.toNumeric2Node_, INLINED_GENERIC_MIXED_NUMERIC_TYPES_);
}
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(leftNodeValue, rightNodeValue);
}
@Override
public Object execute(VirtualFrame frameValue) {
int state_0 = this.state_0_;
if ((state_0 & 0b110110000) == 0 /* only-active SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] */ && ((state_0 & 0b110110101) != 0 /* is-not SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doDouble(double, double)] && SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] && SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */)) {
return execute_int_int0(state_0, frameValue);
} else if ((state_0 & 0b110010101) == 0 /* only-active SpecializationActive[JSModuloNode.doDouble(double, double)] */ && ((state_0 & 0b110110101) != 0 /* is-not SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doDouble(double, double)] && SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] && SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */)) {
return execute_double_double1(state_0, frameValue);
} else {
return execute_generic2(state_0, frameValue);
}
}
private Object execute_int_int0(int state_0__, VirtualFrame frameValue) {
int state_0 = state_0__;
int leftNodeValue_;
try {
leftNodeValue_ = super.leftNode.executeInt(frameValue);
} catch (UnexpectedResultException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
Object rightNodeValue = super.rightNode.execute(frameValue);
return executeAndSpecialize(ex.getResult(), rightNodeValue);
}
int rightNodeValue_;
try {
rightNodeValue_ = super.rightNode.executeInt(frameValue);
} catch (UnexpectedResultException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(leftNodeValue_, ex.getResult());
}
if ((state_0 & 0b101) != 0 /* is SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((JSModuloNode.isPowOf2(rightNodeValue_))) {
try {
return doIntPow2(leftNodeValue_, rightNodeValue_, INLINED_INT_POW2_NEGATIVE_BRANCH_, INLINED_INT_POW2_NEGATIVE_ZERO_BRANCH_);
} catch (ArithmeticException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
state_0 = this.state_0_;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationExcluded */;
this.state_0_ = state_0;
return executeAndSpecialize(leftNodeValue_, rightNodeValue_);
}
}
}
if ((state_0 & 0b100) != 0 /* is SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] */) {
if ((!(JSModuloNode.isPowOf2(rightNodeValue_)))) {
try {
return doInt(leftNodeValue_, rightNodeValue_, INLINED_INT_SPECIAL_BRANCH_);
} catch (ArithmeticException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
state_0 = this.state_0_;
state_0 = state_0 & 0xfffffffb /* remove SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] */;
state_0 = state_0 | 0b1000 /* add SpecializationExcluded */;
this.state_0_ = state_0;
return executeAndSpecialize(leftNodeValue_, rightNodeValue_);
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(leftNodeValue_, rightNodeValue_);
}
private Object execute_double_double1(int state_0__, VirtualFrame frameValue) {
int state_0 = state_0__;
int leftNodeValue_int = 0;
double leftNodeValue_;
try {
if ((state_0 & 0b110000000000) == 0 /* only-active ImplicitCast[type=double, index=0] */ && ((state_0 & 0b111110101) != 0 /* is-not SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doDouble(double, double)] && SpecializationActive[JSModuloNode.doBigIntegerZeroDivision(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] && SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */)) {
leftNodeValue_ = super.leftNode.executeDouble(frameValue);
} else if ((state_0 & 0b101000000000) == 0 /* only-active ImplicitCast[type=double, index=0] */ && ((state_0 & 0b111110101) != 0 /* is-not SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doDouble(double, double)] && SpecializationActive[JSModuloNode.doBigIntegerZeroDivision(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] && SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */)) {
leftNodeValue_int = super.leftNode.executeInt(frameValue);
leftNodeValue_ = JSTypes.intToDouble(leftNodeValue_int);
} else {
Object leftNodeValue__ = super.leftNode.execute(frameValue);
leftNodeValue_ = JSTypesGen.expectImplicitDouble((state_0 & 0b111000000000) >>> 9 /* get-int ImplicitCast[type=double, index=0] */, leftNodeValue__);
}
} catch (UnexpectedResultException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
Object rightNodeValue = super.rightNode.execute(frameValue);
return executeAndSpecialize(ex.getResult(), rightNodeValue);
}
int rightNodeValue_int = 0;
double rightNodeValue_;
try {
if ((state_0 & 0b110000000000000) == 0 /* only-active ImplicitCast[type=double, index=1] */ && ((state_0 & 0b111110101) != 0 /* is-not SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doDouble(double, double)] && SpecializationActive[JSModuloNode.doBigIntegerZeroDivision(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] && SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */)) {
rightNodeValue_ = super.rightNode.executeDouble(frameValue);
} else if ((state_0 & 0b101000000000000) == 0 /* only-active ImplicitCast[type=double, index=1] */ && ((state_0 & 0b111110101) != 0 /* is-not SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doDouble(double, double)] && SpecializationActive[JSModuloNode.doBigIntegerZeroDivision(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] && SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */)) {
rightNodeValue_int = super.rightNode.executeInt(frameValue);
rightNodeValue_ = JSTypes.intToDouble(rightNodeValue_int);
} else {
Object rightNodeValue__ = super.rightNode.execute(frameValue);
rightNodeValue_ = JSTypesGen.expectImplicitDouble((state_0 & 0b111000000000000) >>> 12 /* get-int ImplicitCast[type=double, index=1] */, rightNodeValue__);
}
} catch (UnexpectedResultException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(((state_0 & 0b101000000000) == 0 /* only-active ImplicitCast[type=double, index=0] */ && ((state_0 & 0b111110101) != 0 /* is-not SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doDouble(double, double)] && SpecializationActive[JSModuloNode.doBigIntegerZeroDivision(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] && SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */) ? (Object) leftNodeValue_int : (Object) leftNodeValue_), ex.getResult());
}
assert (state_0 & 0b100000) != 0 /* is SpecializationActive[JSModuloNode.doDouble(double, double)] */;
return doDouble(leftNodeValue_, rightNodeValue_);
}
private Object execute_generic2(int state_0__, VirtualFrame frameValue) {
int state_0 = state_0__;
Object leftNodeValue_ = super.leftNode.execute(frameValue);
Object rightNodeValue_ = super.rightNode.execute(frameValue);
if ((state_0 & 0b110110101) != 0 /* is SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] || SpecializationActive[JSModuloNode.doDouble(double, double)] || SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] || SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] || SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */) {
if ((state_0 & 0b101) != 0 /* is SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] */ && leftNodeValue_ instanceof Integer) {
int leftNodeValue__ = (int) leftNodeValue_;
if (rightNodeValue_ instanceof Integer) {
int rightNodeValue__ = (int) rightNodeValue_;
if ((state_0 & 0b1) != 0 /* is SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((JSModuloNode.isPowOf2(rightNodeValue__))) {
try {
return doIntPow2(leftNodeValue__, rightNodeValue__, INLINED_INT_POW2_NEGATIVE_BRANCH_, INLINED_INT_POW2_NEGATIVE_ZERO_BRANCH_);
} catch (ArithmeticException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
state_0 = this.state_0_;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationExcluded */;
this.state_0_ = state_0;
return executeAndSpecialize(leftNodeValue__, rightNodeValue__);
}
}
}
if ((state_0 & 0b100) != 0 /* is SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] */) {
if ((!(JSModuloNode.isPowOf2(rightNodeValue__)))) {
try {
return doInt(leftNodeValue__, rightNodeValue__, INLINED_INT_SPECIAL_BRANCH_);
} catch (ArithmeticException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
state_0 = this.state_0_;
state_0 = state_0 & 0xfffffffb /* remove SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] */;
state_0 = state_0 | 0b1000 /* add SpecializationExcluded */;
this.state_0_ = state_0;
return executeAndSpecialize(leftNodeValue__, rightNodeValue__);
}
}
}
}
}
if ((state_0 & 0b100000) != 0 /* is SpecializationActive[JSModuloNode.doDouble(double, double)] */ && JSTypesGen.isImplicitDouble((state_0 & 0b111000000000) >>> 9 /* get-int ImplicitCast[type=double, index=0] */, leftNodeValue_)) {
double leftNodeValue__ = JSTypesGen.asImplicitDouble((state_0 & 0b111000000000) >>> 9 /* get-int ImplicitCast[type=double, index=0] */, leftNodeValue_);
if (JSTypesGen.isImplicitDouble((state_0 & 0b111000000000000) >>> 12 /* get-int ImplicitCast[type=double, index=1] */, rightNodeValue_)) {
double rightNodeValue__ = JSTypesGen.asImplicitDouble((state_0 & 0b111000000000000) >>> 12 /* get-int ImplicitCast[type=double, index=1] */, rightNodeValue_);
return doDouble(leftNodeValue__, rightNodeValue__);
}
}
if ((state_0 & 0b10000000) != 0 /* is SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] */ && leftNodeValue_ instanceof BigInt) {
BigInt leftNodeValue__ = (BigInt) leftNodeValue_;
if (rightNodeValue_ instanceof BigInt) {
BigInt rightNodeValue__ = (BigInt) rightNodeValue_;
if ((!(JSGuards.isBigIntZero(rightNodeValue__)))) {
return doBigInteger(leftNodeValue__, rightNodeValue__);
}
}
}
if ((state_0 & 0b100010000) != 0 /* is SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] || SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */) {
if ((state_0 & 0b100000000) != 0 /* is SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] */) {
{
JSOverloadedBinaryNode overloadedOperatorNode__ = this.overloaded_overloadedOperatorNode_;
if (overloadedOperatorNode__ != null) {
if ((hasOverloadedOperators(leftNodeValue_) || hasOverloadedOperators(rightNodeValue_))) {
return doOverloaded(leftNodeValue_, rightNodeValue_, overloadedOperatorNode__);
}
}
}
}
if ((state_0 & 0b10000) != 0 /* is SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */) {
GenericData s6_ = this.generic_cache;
if (s6_ != null) {
if ((!(hasOverloadedOperators(leftNodeValue_))) && (!(hasOverloadedOperators(rightNodeValue_)))) {
Node node__ = (s6_);
return JSModuloNode.doGeneric(leftNodeValue_, rightNodeValue_, node__, s6_.nestedModuloNode_, s6_.toNumeric1Node_, s6_.toNumeric2Node_, INLINED_GENERIC_MIXED_NUMERIC_TYPES_);
}
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return executeAndSpecialize(leftNodeValue_, rightNodeValue_);
}
@Override
public double executeDouble(VirtualFrame frameValue) throws UnexpectedResultException {
int state_0 = this.state_0_;
if ((state_0 & 0b100010000) != 0 /* is SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] || SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */) {
return JSTypesGen.expectDouble(execute(frameValue));
}
int leftNodeValue_int = 0;
double leftNodeValue_;
try {
if ((state_0 & 0b110000000000) == 0 /* only-active ImplicitCast[type=double, index=0] */ && ((state_0 & 0b111110101) != 0 /* is-not SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doDouble(double, double)] && SpecializationActive[JSModuloNode.doBigIntegerZeroDivision(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] && SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */)) {
leftNodeValue_ = super.leftNode.executeDouble(frameValue);
} else if ((state_0 & 0b101000000000) == 0 /* only-active ImplicitCast[type=double, index=0] */ && ((state_0 & 0b111110101) != 0 /* is-not SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doDouble(double, double)] && SpecializationActive[JSModuloNode.doBigIntegerZeroDivision(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] && SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */)) {
leftNodeValue_int = super.leftNode.executeInt(frameValue);
leftNodeValue_ = JSTypes.intToDouble(leftNodeValue_int);
} else {
Object leftNodeValue__ = super.leftNode.execute(frameValue);
leftNodeValue_ = JSTypesGen.expectImplicitDouble((state_0 & 0b111000000000) >>> 9 /* get-int ImplicitCast[type=double, index=0] */, leftNodeValue__);
}
} catch (UnexpectedResultException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
Object rightNodeValue = super.rightNode.execute(frameValue);
return JSTypesGen.expectDouble(executeAndSpecialize(ex.getResult(), rightNodeValue));
}
int rightNodeValue_int = 0;
double rightNodeValue_;
try {
if ((state_0 & 0b110000000000000) == 0 /* only-active ImplicitCast[type=double, index=1] */ && ((state_0 & 0b111110101) != 0 /* is-not SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doDouble(double, double)] && SpecializationActive[JSModuloNode.doBigIntegerZeroDivision(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] && SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */)) {
rightNodeValue_ = super.rightNode.executeDouble(frameValue);
} else if ((state_0 & 0b101000000000000) == 0 /* only-active ImplicitCast[type=double, index=1] */ && ((state_0 & 0b111110101) != 0 /* is-not SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doDouble(double, double)] && SpecializationActive[JSModuloNode.doBigIntegerZeroDivision(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] && SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */)) {
rightNodeValue_int = super.rightNode.executeInt(frameValue);
rightNodeValue_ = JSTypes.intToDouble(rightNodeValue_int);
} else {
Object rightNodeValue__ = super.rightNode.execute(frameValue);
rightNodeValue_ = JSTypesGen.expectImplicitDouble((state_0 & 0b111000000000000) >>> 12 /* get-int ImplicitCast[type=double, index=1] */, rightNodeValue__);
}
} catch (UnexpectedResultException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
return JSTypesGen.expectDouble(executeAndSpecialize(((state_0 & 0b101000000000) == 0 /* only-active ImplicitCast[type=double, index=0] */ && ((state_0 & 0b111110101) != 0 /* is-not SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doDouble(double, double)] && SpecializationActive[JSModuloNode.doBigIntegerZeroDivision(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] && SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */) ? (Object) leftNodeValue_int : (Object) leftNodeValue_), ex.getResult()));
}
if ((state_0 & 0b100000) != 0 /* is SpecializationActive[JSModuloNode.doDouble(double, double)] */) {
return doDouble(leftNodeValue_, rightNodeValue_);
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return JSTypesGen.expectDouble(executeAndSpecialize(((state_0 & 0b101000000000) == 0 /* only-active ImplicitCast[type=double, index=0] */ && ((state_0 & 0b111110101) != 0 /* is-not SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doDouble(double, double)] && SpecializationActive[JSModuloNode.doBigIntegerZeroDivision(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] && SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */) ? (Object) leftNodeValue_int : (Object) leftNodeValue_), ((state_0 & 0b101000000000000) == 0 /* only-active ImplicitCast[type=double, index=1] */ && ((state_0 & 0b111110101) != 0 /* is-not SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doDouble(double, double)] && SpecializationActive[JSModuloNode.doBigIntegerZeroDivision(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] && SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */) ? (Object) rightNodeValue_int : (Object) rightNodeValue_)));
}
@Override
public int executeInt(VirtualFrame frameValue) throws UnexpectedResultException {
int state_0 = this.state_0_;
if ((state_0 & 0b100010000) != 0 /* is SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] || SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */) {
return JSTypesGen.expectInteger(execute(frameValue));
}
int leftNodeValue_;
try {
leftNodeValue_ = super.leftNode.executeInt(frameValue);
} catch (UnexpectedResultException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
Object rightNodeValue = super.rightNode.execute(frameValue);
return JSTypesGen.expectInteger(executeAndSpecialize(ex.getResult(), rightNodeValue));
}
int rightNodeValue_;
try {
rightNodeValue_ = super.rightNode.executeInt(frameValue);
} catch (UnexpectedResultException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
return JSTypesGen.expectInteger(executeAndSpecialize(leftNodeValue_, ex.getResult()));
}
if ((state_0 & 0b101) != 0 /* is SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] */) {
if ((state_0 & 0b1) != 0 /* is SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] */) {
if ((JSModuloNode.isPowOf2(rightNodeValue_))) {
try {
return doIntPow2(leftNodeValue_, rightNodeValue_, INLINED_INT_POW2_NEGATIVE_BRANCH_, INLINED_INT_POW2_NEGATIVE_ZERO_BRANCH_);
} catch (ArithmeticException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
state_0 = this.state_0_;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationExcluded */;
this.state_0_ = state_0;
return JSTypesGen.expectInteger(executeAndSpecialize(leftNodeValue_, rightNodeValue_));
}
}
}
if ((state_0 & 0b100) != 0 /* is SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] */) {
if ((!(JSModuloNode.isPowOf2(rightNodeValue_)))) {
try {
return doInt(leftNodeValue_, rightNodeValue_, INLINED_INT_SPECIAL_BRANCH_);
} catch (ArithmeticException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
state_0 = this.state_0_;
state_0 = state_0 & 0xfffffffb /* remove SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] */;
state_0 = state_0 | 0b1000 /* add SpecializationExcluded */;
this.state_0_ = state_0;
return JSTypesGen.expectInteger(executeAndSpecialize(leftNodeValue_, rightNodeValue_));
}
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
return JSTypesGen.expectInteger(executeAndSpecialize(leftNodeValue_, rightNodeValue_));
}
@Override
public void executeVoid(VirtualFrame frameValue) {
int state_0 = this.state_0_;
try {
if ((state_0 & 0b111110000) == 0 /* only-active SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] */ && ((state_0 & 0b111110101) != 0 /* is-not SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doDouble(double, double)] && SpecializationActive[JSModuloNode.doBigIntegerZeroDivision(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] && SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */)) {
executeInt(frameValue);
return;
} else if ((state_0 & 0b111010101) == 0 /* only-active SpecializationActive[JSModuloNode.doDouble(double, double)] */ && ((state_0 & 0b111110101) != 0 /* is-not SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] && SpecializationActive[JSModuloNode.doDouble(double, double)] && SpecializationActive[JSModuloNode.doBigIntegerZeroDivision(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] && SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] && SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */)) {
executeDouble(frameValue);
return;
} else if ((state_0 & 0b110110101) != 0 /* is SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] || SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] || SpecializationActive[JSModuloNode.doDouble(double, double)] || SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] || SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] || SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */) {
execute(frameValue);
return;
}
} catch (UnexpectedResultException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
return;
}
Object leftNodeValue_ = super.leftNode.execute(frameValue);
Object rightNodeValue_ = super.rightNode.execute(frameValue);
if ((state_0 & 0b1000000) != 0 /* is SpecializationActive[JSModuloNode.doBigIntegerZeroDivision(BigInt, BigInt)] */ && leftNodeValue_ instanceof BigInt) {
BigInt leftNodeValue__ = (BigInt) leftNodeValue_;
if (rightNodeValue_ instanceof BigInt) {
BigInt rightNodeValue__ = (BigInt) rightNodeValue_;
if ((JSGuards.isBigIntZero(rightNodeValue__))) {
doBigIntegerZeroDivision(leftNodeValue__, rightNodeValue__);
return;
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
executeAndSpecialize(leftNodeValue_, rightNodeValue_);
return;
}
private Object executeAndSpecialize(Object leftNodeValue, Object rightNodeValue) {
int state_0 = this.state_0_;
if (leftNodeValue instanceof Integer) {
int leftNodeValue_ = (int) leftNodeValue;
if (rightNodeValue instanceof Integer) {
int rightNodeValue_ = (int) rightNodeValue;
if (((state_0 & 0b10)) == 0 /* is-not SpecializationExcluded */) {
if ((JSModuloNode.isPowOf2(rightNodeValue_))) {
state_0 = state_0 | 0b1 /* add SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] */;
this.state_0_ = state_0;
try {
return doIntPow2(leftNodeValue_, rightNodeValue_, INLINED_INT_POW2_NEGATIVE_BRANCH_, INLINED_INT_POW2_NEGATIVE_ZERO_BRANCH_);
} catch (ArithmeticException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
state_0 = this.state_0_;
state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[JSModuloNode.doIntPow2(int, int, InlinedBranchProfile, InlinedBranchProfile)] */;
state_0 = state_0 | 0b10 /* add SpecializationExcluded */;
this.state_0_ = state_0;
return executeAndSpecialize(leftNodeValue_, rightNodeValue_);
}
}
}
if (((state_0 & 0b10000)) == 0 /* is-not SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */ && ((state_0 & 0b1000)) == 0 /* is-not SpecializationExcluded */) {
if ((!(JSModuloNode.isPowOf2(rightNodeValue_)))) {
state_0 = state_0 | 0b100 /* add SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] */;
this.state_0_ = state_0;
try {
return doInt(leftNodeValue_, rightNodeValue_, INLINED_INT_SPECIAL_BRANCH_);
} catch (ArithmeticException ex) {
CompilerDirectives.transferToInterpreterAndInvalidate();
state_0 = this.state_0_;
state_0 = state_0 & 0xfffffffb /* remove SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)] */;
state_0 = state_0 | 0b1000 /* add SpecializationExcluded */;
this.state_0_ = state_0;
return executeAndSpecialize(leftNodeValue_, rightNodeValue_);
}
}
}
}
}
if (((state_0 & 0b10000)) == 0 /* is-not SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */) {
int doubleCast0;
if ((doubleCast0 = JSTypesGen.specializeImplicitDouble(leftNodeValue)) != 0) {
double leftNodeValue_ = JSTypesGen.asImplicitDouble(doubleCast0, leftNodeValue);
int doubleCast1;
if ((doubleCast1 = JSTypesGen.specializeImplicitDouble(rightNodeValue)) != 0) {
double rightNodeValue_ = JSTypesGen.asImplicitDouble(doubleCast1, rightNodeValue);
state_0 = (state_0 | (doubleCast0 << 9) /* set-int ImplicitCast[type=double, index=0] */);
state_0 = (state_0 | (doubleCast1 << 12) /* set-int ImplicitCast[type=double, index=1] */);
state_0 = state_0 | 0b100000 /* add SpecializationActive[JSModuloNode.doDouble(double, double)] */;
this.state_0_ = state_0;
return doDouble(leftNodeValue_, rightNodeValue_);
}
}
}
if (leftNodeValue instanceof BigInt) {
BigInt leftNodeValue_ = (BigInt) leftNodeValue;
if (rightNodeValue instanceof BigInt) {
BigInt rightNodeValue_ = (BigInt) rightNodeValue;
if (((state_0 & 0b10000)) == 0 /* is-not SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */) {
if ((JSGuards.isBigIntZero(rightNodeValue_))) {
state_0 = state_0 | 0b1000000 /* add SpecializationActive[JSModuloNode.doBigIntegerZeroDivision(BigInt, BigInt)] */;
this.state_0_ = state_0;
doBigIntegerZeroDivision(leftNodeValue_, rightNodeValue_);
return null;
}
}
if (((state_0 & 0b10000)) == 0 /* is-not SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */) {
if ((!(JSGuards.isBigIntZero(rightNodeValue_)))) {
state_0 = state_0 | 0b10000000 /* add SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] */;
this.state_0_ = state_0;
return doBigInteger(leftNodeValue_, rightNodeValue_);
}
}
}
}
if ((hasOverloadedOperators(leftNodeValue) || hasOverloadedOperators(rightNodeValue))) {
JSOverloadedBinaryNode overloadedOperatorNode__ = this.insert((JSOverloadedBinaryNode.createNumeric(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 | 0b100000000 /* add SpecializationActive[JSModuloNode.doOverloaded(Object, Object, JSOverloadedBinaryNode)] */;
this.state_0_ = state_0;
return doOverloaded(leftNodeValue, rightNodeValue, overloadedOperatorNode__);
}
{
Node node__ = null;
if ((!(hasOverloadedOperators(leftNodeValue))) && (!(hasOverloadedOperators(rightNodeValue)))) {
GenericData s6_ = this.insert(new GenericData());
node__ = (s6_);
s6_.nestedModuloNode_ = s6_.insert((JSModuloNode.create()));
JSToNumericNode toNumeric1Node__ = s6_.insert((JSToNumericNode.create()));
Objects.requireNonNull(toNumeric1Node__, "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.");
s6_.toNumeric1Node_ = toNumeric1Node__;
JSToNumericNode toNumeric2Node__ = s6_.insert((JSToNumericNode.create()));
Objects.requireNonNull(toNumeric2Node__, "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.");
s6_.toNumeric2Node_ = toNumeric2Node__;
VarHandle.storeStoreFence();
this.generic_cache = s6_;
state_0 = state_0 & 0xffffff1b /* remove SpecializationActive[JSModuloNode.doInt(int, int, InlinedBranchProfile)], SpecializationActive[JSModuloNode.doDouble(double, double)], SpecializationActive[JSModuloNode.doBigIntegerZeroDivision(BigInt, BigInt)], SpecializationActive[JSModuloNode.doBigInteger(BigInt, BigInt)] */;
state_0 = state_0 | 0b10000 /* add SpecializationActive[JSModuloNode.doGeneric(Object, Object, Node, JSModuloNode, JSToNumericNode, JSToNumericNode, InlinedBranchProfile)] */;
this.state_0_ = state_0;
return JSModuloNode.doGeneric(leftNodeValue, rightNodeValue, node__, s6_.nestedModuloNode_, toNumeric1Node__, toNumeric2Node__, INLINED_GENERIC_MIXED_NUMERIC_TYPES_);
}
}
throw new UnsupportedSpecializationException(this, new Node[] {super.leftNode, super.rightNode}, leftNodeValue, rightNodeValue);
}
@NeverDefault
public static JSModuloNode create(JavaScriptNode left, JavaScriptNode right) {
return new JSModuloNodeGen(left, right);
}
@GeneratedBy(JSModuloNode.class)
@DenyReplace
private static final class GenericData extends Node implements SpecializationDataNode {
/**
* State Info:
* 0: InlinedCache
* Specialization: {@link JSModuloNode#doGeneric}
* Parameter: {@link InlinedBranchProfile} mixedNumericTypes
* Inline method: {@link InlinedBranchProfile#inline}
*
*/
@CompilationFinal @UnsafeAccessedField private int generic_state_0_;
/**
* Source Info:
* Specialization: {@link JSModuloNode#doGeneric}
* Parameter: {@link JSModuloNode} nestedModuloNode
*/
@Child JSModuloNode nestedModuloNode_;
/**
* Source Info:
* Specialization: {@link JSModuloNode#doGeneric}
* Parameter: {@link JSToNumericNode} toNumeric1Node
*/
@Child JSToNumericNode toNumeric1Node_;
/**
* Source Info:
* Specialization: {@link JSModuloNode#doGeneric}
* Parameter: {@link JSToNumericNode} toNumeric2Node
*/
@Child JSToNumericNode toNumeric2Node_;
GenericData() {
}
private static Lookup lookup_() {
return MethodHandles.lookup();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy