Changeset 47571 in webkit for trunk/JavaScriptCore/parser/NodeConstructors.h
- Timestamp:
- Aug 20, 2009, 7:24:49 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/parser/NodeConstructors.h
r47259 r47571 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 30 35 inline void* ParserArenaDeletable::operator new(size_t size, JSGlobalData* globalData) 31 36 { 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); 40 } 41 42 inline void ParserArenaDeletable::operator delete(void* p) 43 { 44 fastFree(p); 37 return globalData->parser->arena().allocateDeletable(size); 45 38 } 46 39 … … 78 71 } 79 72 80 inline NumberNode::NumberNode(JSGlobalData* globalData, double v )73 inline NumberNode::NumberNode(JSGlobalData* globalData, double value) 81 74 : ExpressionNode(globalData, ResultType::numberType()) 82 , m_ double(v)83 { 84 } 85 86 inline StringNode::StringNode(JSGlobalData* globalData, const Identifier& v )75 , m_value(value) 76 { 77 } 78 79 inline StringNode::StringNode(JSGlobalData* globalData, const Identifier& value) 87 80 : ExpressionNode(globalData, ResultType::stringType()) 88 , m_value(v )81 , m_value(value) 89 82 { 90 83 } … … 156 149 157 150 inline PropertyNode::PropertyNode(JSGlobalData* globalData, double name, ExpressionNode* assign, Type type) 158 : m_name( Identifier(globalData, UString::from(name)))151 : m_name(globalData->parser->arena().identifierArena().makeNumericIdentifier(globalData, name)) 159 152 , m_assign(assign) 160 153 , m_type(type) … … 749 742 inline ContinueNode::ContinueNode(JSGlobalData* globalData) 750 743 : StatementNode(globalData) 744 , m_ident(globalData->propertyNames->nullIdentifier) 751 745 { 752 746 } … … 760 754 inline BreakNode::BreakNode(JSGlobalData* globalData) 761 755 : StatementNode(globalData) 756 , m_ident(globalData->propertyNames->nullIdentifier) 762 757 { 763 758 } … … 834 829 } 835 830 836 inline CaseClauseNode::CaseClauseNode(JSGlobalData*, ExpressionNode* expr )831 inline CaseClauseNode::CaseClauseNode(JSGlobalData*, ExpressionNode* expr, SourceElements* statements) 837 832 : m_expr(expr) 838 { 839 } 840 841 inline CaseClauseNode::CaseClauseNode(JSGlobalData*, ExpressionNode* expr, SourceElements* children) 842 : m_expr(expr) 843 { 844 if (children) 845 children->releaseContentsIntoVector(m_children); 833 , m_statements(statements) 834 { 846 835 } 847 836 … … 881 870 } 882 871 883 inline BlockNode::BlockNode(JSGlobalData* globalData, SourceElements* children) 884 : StatementNode(globalData) 885 { 886 if (children) 887 children->releaseContentsIntoVector(m_children); 872 inline BlockNode::BlockNode(JSGlobalData* globalData, SourceElements* statements) 873 : StatementNode(globalData) 874 , m_statements(statements) 875 { 888 876 } 889 877 890 878 inline ForInNode::ForInNode(JSGlobalData* globalData, ExpressionNode* l, ExpressionNode* expr, StatementNode* statement) 891 879 : StatementNode(globalData) 880 , m_ident(globalData->propertyNames->nullIdentifier) 892 881 , m_init(0) 893 882 , m_lexpr(l)
Note:
See TracChangeset
for help on using the changeset viewer.