Ignore:
Timestamp:
Aug 20, 2009, 11:04:37 AM (16 years ago)
Author:
[email protected]
Message:

Roll out r47571 and related build fixes as it caused us to leak the world without warning.

File:
1 edited

Legend:

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

    r47571 r47582  
    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);
     40    }
     41
     42    inline void ParserArenaDeletable::operator delete(void* p)
     43    {
     44        fastFree(p);
    3845    }
    3946
     
    7178    }
    7279
    73     inline NumberNode::NumberNode(JSGlobalData* globalData, double value)
     80    inline NumberNode::NumberNode(JSGlobalData* globalData, double v)
    7481        : ExpressionNode(globalData, ResultType::numberType())
    75         , m_value(value)
    76     {
    77     }
    78 
    79     inline StringNode::StringNode(JSGlobalData* globalData, const Identifier& value)
     82        , m_double(v)
     83    {
     84    }
     85
     86    inline StringNode::StringNode(JSGlobalData* globalData, const Identifier& v)
    8087        : ExpressionNode(globalData, ResultType::stringType())
    81         , m_value(value)
     88        , m_value(v)
    8289    {
    8390    }
     
    149156
    150157    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)))
    152159        , m_assign(assign)
    153160        , m_type(type)
     
    742749    inline ContinueNode::ContinueNode(JSGlobalData* globalData)
    743750        : StatementNode(globalData)
    744         , m_ident(globalData->propertyNames->nullIdentifier)
    745751    {
    746752    }
     
    754760    inline BreakNode::BreakNode(JSGlobalData* globalData)
    755761        : StatementNode(globalData)
    756         , m_ident(globalData->propertyNames->nullIdentifier)
    757762    {
    758763    }
     
    829834    }
    830835
    831     inline CaseClauseNode::CaseClauseNode(JSGlobalData*, ExpressionNode* expr, SourceElements* statements)
     836    inline CaseClauseNode::CaseClauseNode(JSGlobalData*, ExpressionNode* expr)
    832837        : 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);
    835846    }
    836847
     
    870881    }
    871882
    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);
    876888    }
    877889
    878890    inline ForInNode::ForInNode(JSGlobalData* globalData, ExpressionNode* l, ExpressionNode* expr, StatementNode* statement)
    879891        : StatementNode(globalData)
    880         , m_ident(globalData->propertyNames->nullIdentifier)
    881892        , m_init(0)
    882893        , m_lexpr(l)
Note: See TracChangeset for help on using the changeset viewer.