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