diff options
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h index be84c4a1b1..78521657fc 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h +++ b/src/3rdparty/webkit/JavaScriptCore/parser/Nodes.h @@ -40,6 +40,7 @@ namespace JSC { class ArgumentListNode; class BytecodeGenerator; class FunctionBodyNode; + class Label; class PropertyListNode; class ReadModifyResolveNode; class RegisterID; @@ -151,6 +152,9 @@ namespace JSC { virtual bool isCommaNode() const { return false; } virtual bool isSimpleArray() const { return false; } virtual bool isAdd() const { return false; } + virtual bool hasConditionContextCodegen() const { return false; } + + virtual void emitBytecodeInConditionContext(BytecodeGenerator&, Label*, Label*, bool) { ASSERT_NOT_REACHED(); } virtual ExpressionNode* stripUnaryPlus() { return this; } @@ -757,6 +761,7 @@ namespace JSC { protected: ExpressionNode* expr() { return m_expr; } + const ExpressionNode* expr() const { return m_expr; } private: virtual RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0); @@ -788,6 +793,9 @@ namespace JSC { class LogicalNotNode : public UnaryOpNode { public: LogicalNotNode(JSGlobalData*, ExpressionNode*); + private: + void emitBytecodeInConditionContext(BytecodeGenerator&, Label* trueTarget, Label* falseTarget, bool fallThroughMeansTrue); + virtual bool hasConditionContextCodegen() const { return expr()->hasConditionContextCodegen(); } }; class BinaryOpNode : public ExpressionNode { @@ -952,6 +960,8 @@ namespace JSC { private: virtual RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0); + void emitBytecodeInConditionContext(BytecodeGenerator&, Label* trueTarget, Label* falseTarget, bool fallThroughMeansTrue); + virtual bool hasConditionContextCodegen() const { return true; } ExpressionNode* m_expr1; ExpressionNode* m_expr2; @@ -1375,12 +1385,6 @@ namespace JSC { using ParserArenaRefCounted::operator new; - void adoptData(std::auto_ptr<ScopeNodeData> data) - { - ASSERT(!data->m_arena.contains(this)); - ASSERT(!m_data); - m_data.adopt(data); - } ScopeNodeData* data() const { return m_data.get(); } void destroyData() { m_data.clear(); } |