Ignore:
Timestamp:
May 13, 2009, 2:53:59 PM (16 years ago)
Author:
Darin Adler
Message:

JavaScriptCore:

2009-05-13 Darin Adler <Darin Adler>

Revert the parser arena change. It was a slowdown, not a speedup.
Better luck next time (I'll break it up into pieces).

WebCore:

2009-05-13 Darin Adler <Darin Adler>

Revert the parser arena change. It was a slowdown, not a speedup.
Better luck next time (I'll break it up into pieces).

WebKit/mac:

2009-05-13 Darin Adler <Darin Adler>

Revert the parser arena change. It was a slowdown, not a speedup.
Better luck next time (I'll break it up into pieces).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/parser/NodeConstructors.h

    r43642 r43661  
    2828namespace JSC {
    2929
    30     inline void* ParserArenaFreeable::operator new(size_t size, JSGlobalData* globalData)
    31     {
    32         return globalData->parser->arena().allocateFreeable(size);
    33     }
    34 
    3530    inline void* ParserArenaDeletable::operator new(size_t size, JSGlobalData* globalData)
    3631    {
    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);
    3840    }
    3941
     
    7779    }
    7880
    79     inline StringNode::StringNode(JSGlobalData* globalData, const Identifier& value)
     81    inline StringNode::StringNode(JSGlobalData* globalData, const Identifier& v)
    8082        : ExpressionNode(globalData, ResultType::stringType())
    81         , m_value(value)
    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)
    8688        : ExpressionNode(globalData)
    8789        , m_pattern(pattern)
     
    143145    inline PropertyNode::PropertyNode(JSGlobalData*, const Identifier& name, ExpressionNode* assign, Type type)
    144146        : 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))
    152147        , m_assign(assign)
    153148        , m_type(type)
     
    742737    inline ContinueNode::ContinueNode(JSGlobalData* globalData)
    743738        : StatementNode(globalData)
    744         , m_ident(globalData->propertyNames->nullIdentifier)
    745739    {
    746740    }
     
    754748    inline BreakNode::BreakNode(JSGlobalData* globalData)
    755749        : StatementNode(globalData)
    756         , m_ident(globalData->propertyNames->nullIdentifier)
    757750    {
    758751    }
     
    833826    }
    834827
    835     inline CaseClauseNode::CaseClauseNode(JSGlobalData*, ExpressionNode* expr, SourceElements* statements)
     828    inline CaseClauseNode::CaseClauseNode(JSGlobalData*, ExpressionNode* expr)
    836829        : 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);
    839838    }
    840839
     
    874873    }
    875874
    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);
    880880    }
    881881
    882882    inline ForInNode::ForInNode(JSGlobalData* globalData, ExpressionNode* l, ExpressionNode* expr, StatementNode* statement)
    883883        : StatementNode(globalData)
    884         , m_ident(globalData->propertyNames->nullIdentifier)
    885884        , m_init(0)
    886885        , m_lexpr(l)
Note: See TracChangeset for help on using the changeset viewer.