- public:
- ExpressionNode(JSGlobalData* globalData, ResultType resultDesc = ResultType::unknownType()) JSC_FAST_CALL
- : Node(globalData)
- , m_resultDesc(resultDesc)
- {
- }
-
- virtual bool isNumber() const JSC_FAST_CALL { return false; }
- virtual bool isString() const JSC_FAST_CALL { return false; }
- virtual bool isNull() const JSC_FAST_CALL { return false; }
- virtual bool isPure(BytecodeGenerator&) const JSC_FAST_CALL { return false; }
- virtual bool isLocation() const JSC_FAST_CALL { return false; }
- virtual bool isResolveNode() const JSC_FAST_CALL { return false; }
- virtual bool isBracketAccessorNode() const JSC_FAST_CALL { return false; }
- virtual bool isDotAccessorNode() const JSC_FAST_CALL { return false; }
- virtual bool isFuncExprNode() const JSC_FAST_CALL { return false; }
+ protected:
+ ExpressionNode(const JSTokenLocation&, ResultType = ResultType::unknownType());
+
+ public:
+ virtual RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* destination = 0) = 0;
+
+ virtual bool isNumber() const { return false; }
+ virtual bool isString() const { return false; }
+ virtual bool isNull() const { return false; }
+ virtual bool isPure(BytecodeGenerator&) const { return false; }
+ virtual bool isConstant() const { return false; }
+ virtual bool isLocation() const { return false; }
+ virtual bool isAssignmentLocation() const { return isLocation(); }
+ virtual bool isResolveNode() const { return false; }
+ virtual bool isBracketAccessorNode() const { return false; }
+ virtual bool isDotAccessorNode() const { return false; }
+ virtual bool isDestructuringNode() const { return false; }
+ virtual bool isFuncExprNode() const { return false; }
+ virtual bool isCommaNode() const { return false; }
+ virtual bool isSimpleArray() const { return false; }
+ virtual bool isAdd() const { return false; }
+ virtual bool isSubtract() const { return false; }
+ virtual bool isBoolean() const { return false; }
+ virtual bool isSpreadExpression() const { return false; }
+ virtual bool isSuperNode() const { return false; }
+
+ virtual void emitBytecodeInConditionContext(BytecodeGenerator&, Label*, Label*, FallThroughMode);