Ignore:
Timestamp:
Jun 16, 2008, 4:28:38 PM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Geoff Garen.

Make Identifier construction use an explicitly passed IdentifierTable.

No change on SunSpider total.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/CodeGenerator.cpp

    r34581 r34607  
    180180    , m_continueDepth(0)
    181181    , m_nextVar(-1)
    182     , m_propertyNames(&scopeChain.globalObject()->globalExec()->propertyNames())
     182    , m_globalData(&scopeChain.globalObject()->globalExec()->globalData())
    183183    , m_lastOpcodeID(op_end)
    184184{
     
    239239    , m_continueDepth(0)
    240240    , m_nextVar(-1)
    241     , m_propertyNames(&scopeChain.globalObject()->globalExec()->propertyNames())
     241    , m_globalData(&scopeChain.globalObject()->globalExec()->globalData())
    242242    , m_lastOpcodeID(op_end)
    243243{
     
    254254    for (size_t i = 0; i < varStack.size(); ++i) {
    255255        const Identifier& ident = varStack[i].first;
    256         if (ident == m_propertyNames->arguments)
     256        if (ident == propertyNames().arguments)
    257257            continue;
    258258
     
    286286    , m_continueDepth(0)
    287287    , m_nextVar(-1)
    288     , m_propertyNames(&scopeChain.globalObject()->globalExec()->propertyNames())
     288    , m_globalData(&scopeChain.globalObject()->globalExec()->globalData())
    289289    , m_lastOpcodeID(op_end)
    290290{
     
    317317RegisterID* CodeGenerator::registerForLocal(const Identifier& ident)
    318318{
    319     if (m_codeType == FunctionCode && ident == m_propertyNames->arguments)
     319    if (m_codeType == FunctionCode && ident == propertyNames().arguments)
    320320        m_codeBlock->needsFullScopeChain = true;
    321321
    322     if (ident == m_propertyNames->thisIdentifier)
     322    if (ident == propertyNames().thisIdentifier)
    323323        return &m_thisRegister;
    324324
     
    346346bool CodeGenerator::isLocal(const Identifier& ident)
    347347{
    348     if (ident == m_propertyNames->thisIdentifier)
     348    if (ident == propertyNames().thisIdentifier)
    349349        return true;
    350350   
     
    481481    pair<IdentifierMap::iterator, bool> result = m_identifierMap.add(rep, m_codeBlock->identifiers.size());
    482482    if (result.second) // new entry
    483         m_codeBlock->identifiers.append(rep);
     483        m_codeBlock->identifiers.append(Identifier(m_globalData, rep));
    484484
    485485    return result.first->second;
     
    591591{
    592592    // Cases where we cannot optimise the lookup
    593     if (property == m_propertyNames->arguments || !canOptimizeNonLocals()) {
     593    if (property == propertyNames().arguments || !canOptimizeNonLocals()) {
    594594        stackDepth = 0;
    595595        index = missingSymbolMarker();
Note: See TracChangeset for help on using the changeset viewer.