public abstract class JSOverloadedBinaryNode extends JavaScriptBaseNode
JSOverloadedBinaryNode.DispatchBinaryOperatorNode.
Check JSAddNode for an example of using this node.
| Modifier and Type | Class and Description |
|---|---|
static class |
JSOverloadedBinaryNode.DispatchBinaryOperatorNode
This class implements the
DispatchBinaryOperator spec function. |
| Modifier | Constructor and Description |
|---|---|
protected |
JSOverloadedBinaryNode(com.oracle.truffle.api.strings.TruffleString overloadedOperatorName,
boolean numeric,
JSToPrimitiveNode.Hint hint,
boolean leftToRight) |
| Modifier and Type | Method and Description |
|---|---|
static JSOverloadedBinaryNode |
create(com.oracle.truffle.api.strings.TruffleString overloadedOperatorName,
JSToPrimitiveNode.Hint hint) |
static JSOverloadedBinaryNode |
createHintDefault(com.oracle.truffle.api.strings.TruffleString overloadedOperatorName) |
static JSOverloadedBinaryNode |
createHintNumber(com.oracle.truffle.api.strings.TruffleString overloadedOperatorName) |
static JSOverloadedBinaryNode |
createHintNumberLeftToRight(com.oracle.truffle.api.strings.TruffleString overloadedOperatorName) |
static JSOverloadedBinaryNode |
createHintNumberRightToLeft(com.oracle.truffle.api.strings.TruffleString overloadedOperatorName) |
static JSOverloadedBinaryNode |
createHintString(com.oracle.truffle.api.strings.TruffleString overloadedOperatorName) |
static JSOverloadedBinaryNode |
createNumeric(com.oracle.truffle.api.strings.TruffleString overloadedOperatorName) |
protected Object |
doToNumericOperand(Object left,
Object right,
JSToNumericNode toNumericOperandLeftNode,
JSToNumericNode toNumericOperandRightNode,
JSOverloadedBinaryNode.DispatchBinaryOperatorNode dispatchBinaryOperatorNode) |
protected Object |
doToOperandAddition(Object left,
Object right,
com.oracle.truffle.api.nodes.Node node,
JSToOperandNode toOperandLeftNode,
JSToOperandNode toOperandRightNode,
JSOverloadedBinaryNode.DispatchBinaryOperatorNode dispatchBinaryOperatorNode,
JSToStringNode toStringLeftNode,
JSToStringNode toStringRightNode,
com.oracle.truffle.api.profiles.InlinedConditionProfile leftStringProfile,
com.oracle.truffle.api.profiles.InlinedConditionProfile rightStringProfile,
JSAddNode addNode) |
protected Object |
doToOperandGeneric(Object left,
Object right,
JSToOperandNode toOperandLeftNode,
JSToOperandNode toOperandRightNode,
JSOverloadedBinaryNode.DispatchBinaryOperatorNode dispatchBinaryOperatorNode) |
abstract Object |
execute(Object left,
Object right) |
protected JSToPrimitiveNode.Hint |
getHint() |
protected com.oracle.truffle.api.strings.TruffleString |
getOverloadedOperatorName() |
protected boolean |
isAddition() |
protected boolean |
isEquality() |
protected boolean |
isNumeric() |
copy, getLanguage, getRealm, hasOverloadedOperators, onReplaceaccept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, replace, replace, reportPolymorphicSpecialize, toStringprotected JSOverloadedBinaryNode(com.oracle.truffle.api.strings.TruffleString overloadedOperatorName,
boolean numeric,
JSToPrimitiveNode.Hint hint,
boolean leftToRight)
public static JSOverloadedBinaryNode create(com.oracle.truffle.api.strings.TruffleString overloadedOperatorName, JSToPrimitiveNode.Hint hint)
public static JSOverloadedBinaryNode createHintDefault(com.oracle.truffle.api.strings.TruffleString overloadedOperatorName)
public static JSOverloadedBinaryNode createHintNumber(com.oracle.truffle.api.strings.TruffleString overloadedOperatorName)
public static JSOverloadedBinaryNode createHintNumberLeftToRight(com.oracle.truffle.api.strings.TruffleString overloadedOperatorName)
public static JSOverloadedBinaryNode createHintNumberRightToLeft(com.oracle.truffle.api.strings.TruffleString overloadedOperatorName)
public static JSOverloadedBinaryNode createHintString(com.oracle.truffle.api.strings.TruffleString overloadedOperatorName)
public static JSOverloadedBinaryNode createNumeric(com.oracle.truffle.api.strings.TruffleString overloadedOperatorName)
protected Object doToOperandGeneric(Object left, Object right, JSToOperandNode toOperandLeftNode, JSToOperandNode toOperandRightNode, JSOverloadedBinaryNode.DispatchBinaryOperatorNode dispatchBinaryOperatorNode)
protected Object doToOperandAddition(Object left, Object right, com.oracle.truffle.api.nodes.Node node, JSToOperandNode toOperandLeftNode, JSToOperandNode toOperandRightNode, JSOverloadedBinaryNode.DispatchBinaryOperatorNode dispatchBinaryOperatorNode, JSToStringNode toStringLeftNode, JSToStringNode toStringRightNode, com.oracle.truffle.api.profiles.InlinedConditionProfile leftStringProfile, com.oracle.truffle.api.profiles.InlinedConditionProfile rightStringProfile, JSAddNode addNode)
protected Object doToNumericOperand(Object left, Object right, JSToNumericNode toNumericOperandLeftNode, JSToNumericNode toNumericOperandRightNode, JSOverloadedBinaryNode.DispatchBinaryOperatorNode dispatchBinaryOperatorNode)
protected com.oracle.truffle.api.strings.TruffleString getOverloadedOperatorName()
protected final boolean isNumeric()
protected JSToPrimitiveNode.Hint getHint()
protected boolean isAddition()
protected boolean isEquality()