Changeset 43661 in webkit for trunk/JavaScriptCore/parser/NodeConstructors.h
- Timestamp:
- May 13, 2009, 2:53:59 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/parser/NodeConstructors.h
r43642 r43661 28 28 namespace JSC { 29 29 30 inline void* ParserArenaFreeable::operator new(size_t size, JSGlobalData* globalData)31 {32 return globalData->parser->arena().allocateFreeable(size);33 }34 35 30 inline void* ParserArenaDeletable::operator new(size_t size, JSGlobalData* globalData) 36 31 { 37 return globalData->parser->arena().allocateDeletable(size); 32 ParserArenaDeletable* deletable = static_cast<ParserArenaDeletable*>(fastMalloc(size)); 33 globalData->parser->arena().deleteWithArena(deletable); 34 return deletable; 35 } 36 37 inline void* ParserArenaDeletable::operator new(size_t size) 38 { 39 return fastMalloc(size); 38 40 } 39 41 … … 77 79 } 78 80 79 inline StringNode::StringNode(JSGlobalData* globalData, const Identifier& v alue)81 inline StringNode::StringNode(JSGlobalData* globalData, const Identifier& v) 80 82 : ExpressionNode(globalData, ResultType::stringType()) 81 , m_value(v alue)82 { 83 } 84 85 inline RegExpNode::RegExpNode(JSGlobalData* globalData, const Identifier& pattern, const Identifier& flags)83 , m_value(v) 84 { 85 } 86 87 inline RegExpNode::RegExpNode(JSGlobalData* globalData, const UString& pattern, const UString& flags) 86 88 : ExpressionNode(globalData) 87 89 , m_pattern(pattern) … … 143 145 inline PropertyNode::PropertyNode(JSGlobalData*, const Identifier& name, ExpressionNode* assign, Type type) 144 146 : m_name(name) 145 , m_assign(assign)146 , m_type(type)147 {148 }149 150 inline PropertyNode::PropertyNode(JSGlobalData* globalData, double name, ExpressionNode* assign, Type type)151 : m_name(globalData->parser->arena().makeNumericIdentifier(globalData, name))152 147 , m_assign(assign) 153 148 , m_type(type) … … 742 737 inline ContinueNode::ContinueNode(JSGlobalData* globalData) 743 738 : StatementNode(globalData) 744 , m_ident(globalData->propertyNames->nullIdentifier)745 739 { 746 740 } … … 754 748 inline BreakNode::BreakNode(JSGlobalData* globalData) 755 749 : StatementNode(globalData) 756 , m_ident(globalData->propertyNames->nullIdentifier)757 750 { 758 751 } … … 833 826 } 834 827 835 inline CaseClauseNode::CaseClauseNode(JSGlobalData*, ExpressionNode* expr , SourceElements* statements)828 inline CaseClauseNode::CaseClauseNode(JSGlobalData*, ExpressionNode* expr) 836 829 : m_expr(expr) 837 , m_statements(statements) 838 { 830 { 831 } 832 833 inline CaseClauseNode::CaseClauseNode(JSGlobalData*, ExpressionNode* expr, SourceElements* children) 834 : m_expr(expr) 835 { 836 if (children) 837 children->releaseContentsIntoVector(m_children); 839 838 } 840 839 … … 874 873 } 875 874 876 inline BlockNode::BlockNode(JSGlobalData* globalData, SourceElements* statements) 877 : StatementNode(globalData) 878 , m_statements(statements) 879 { 875 inline BlockNode::BlockNode(JSGlobalData* globalData, SourceElements* children) 876 : StatementNode(globalData) 877 { 878 if (children) 879 children->releaseContentsIntoVector(m_children); 880 880 } 881 881 882 882 inline ForInNode::ForInNode(JSGlobalData* globalData, ExpressionNode* l, ExpressionNode* expr, StatementNode* statement) 883 883 : StatementNode(globalData) 884 , m_ident(globalData->propertyNames->nullIdentifier)885 884 , m_init(0) 886 885 , m_lexpr(l)
Note:
See TracChangeset
for help on using the changeset viewer.