Ignore:
Timestamp:
Jan 8, 2009, 9:41:01 PM (16 years ago)
Author:
[email protected]
Message:

2009-01-08 Sam Weinig <[email protected]>

Revert r39720. It broke Interpreted mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/bytecode/CodeBlock.cpp

    r39720 r39737  
    725725        }
    726726        case op_get_global_var: {
    727             int r0 = (++it)->u.operand;
    728             JSValuePtr scope = JSValuePtr((++it)->u.jsCell);
    729             int index = (++it)->u.operand;
     727            int r0 = it[1].u.operand;
     728            JSValuePtr scope = JSValuePtr(it[2].u.jsCell);
     729            int index = it[3].u.operand;
    730730            printf("[%4d] get_global_var\t %s, %s, %d\n", location, registerName(r0).c_str(), valueToSourceString(exec, scope).ascii(), index);
     731            it += OPCODE_LENGTH(op_get_global_var);
    731732            break;
    732733        }
     
    10911092    macro(identifiers) \
    10921093    macro(functionExpressions) \
    1093     macro(constantRegisters)
     1094    macro(constantRegisters) \
     1095    macro(pcVector)
    10941096
    10951097#define FOR_EACH_MEMBER_VECTOR_RARE_DATA(macro) \
     
    11061108    macro(expressionInfo) \
    11071109    macro(lineInfo) \
    1108     macro(getByIdExceptionInfo) \
    1109     macro(pcVector)
     1110    macro(getByIdExceptionInfo)
    11101111
    11111112template<typename T>
     
    13921393
    13931394    ScopeChainNode* scopeChain = callFrame->scopeChain();
    1394     if (m_needsFullScopeChain) {
    1395         ScopeChain sc(scopeChain);
    1396         int scopeDelta = sc.localDepth();
    1397         if (m_codeType == EvalCode)
    1398             scopeDelta -= static_cast<EvalCodeBlock*>(this)->baseScopeDepth();
    1399         else if (m_codeType == FunctionCode)
    1400             scopeDelta++; // Compilation of function code assumes activation is not on the scope chain yet.
    1401         ASSERT(scopeDelta >= 0);
    1402         while (scopeDelta--)
    1403             scopeChain = scopeChain->next;
    1404     }
    14051395
    14061396    switch (m_codeType) {
     
    14091399            RefPtr<FunctionBodyNode> newFunctionBody = m_globalData->parser->reparse<FunctionBodyNode>(m_globalData, ownerFunctionBodyNode);
    14101400            newFunctionBody->finishParsing(ownerFunctionBodyNode->copyParameters(), ownerFunctionBodyNode->parameterCount());
    1411             CodeBlock& newCodeBlock = newFunctionBody->bytecodeForExceptionInfoReparse(scopeChain, this);
     1401            CodeBlock& newCodeBlock = newFunctionBody->bytecodeForExceptionInfoReparse(scopeChain);
    14121402            ASSERT(newCodeBlock.m_exceptionInfo);
    14131403            ASSERT(newCodeBlock.m_instructionCount == m_instructionCount);
    1414 
    1415 #if ENABLE(JIT)
    1416             JIT::compile(m_globalData, &newCodeBlock);
    1417             ASSERT(newCodeBlock.m_jitCode.codeSize == m_jitCode.codeSize);
    1418 #endif
    1419 
    14201404            m_exceptionInfo.set(newCodeBlock.m_exceptionInfo.release());
    14211405            break;
     
    14241408            EvalNode* ownerEvalNode = static_cast<EvalNode*>(m_ownerNode);
    14251409            RefPtr<EvalNode> newEvalBody = m_globalData->parser->reparse<EvalNode>(m_globalData, ownerEvalNode);
    1426             EvalCodeBlock& newCodeBlock = newEvalBody->bytecodeForExceptionInfoReparse(scopeChain, this);
     1410            EvalCodeBlock& newCodeBlock = newEvalBody->bytecodeForExceptionInfoReparse(scopeChain);
    14271411            ASSERT(newCodeBlock.m_exceptionInfo);
    14281412            ASSERT(newCodeBlock.m_instructionCount == m_instructionCount);
    1429 
    1430 #if ENABLE(JIT)
    1431             JIT::compile(m_globalData, &newCodeBlock);
    1432             ASSERT(newCodeBlock.m_jitCode.codeSize == m_jitCode.codeSize);
    1433 #endif
    1434 
    14351413            m_exceptionInfo.set(newCodeBlock.m_exceptionInfo.release());
    14361414            break;
     
    15761554    return true;
    15771555}
    1578 #endif
    1579 
    1580 #if !ENABLE(JIT)
    1581 bool CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset(unsigned bytecodeOffset)
    1582 {
    1583     if (m_globalResolveInstructions.isEmpty())
    1584         return false;
    1585 
    1586     int low = 0;
    1587     int high = m_globalResolveInstructions.size();
    1588     while (low < high) {
    1589         int mid = low + (high - low) / 2;
    1590         if (m_globalResolveInstructions[mid] <= bytecodeOffset)
    1591             low = mid + 1;
    1592         else
    1593             high = mid;
    1594     }
    1595 
    1596     if (!low || m_globalResolveInstructions[low - 1] != bytecodeOffset)
    1597         return false;
    1598     return true;
    1599 }
    1600 #else
    1601 bool CodeBlock::hasGlobalResolveInfoAtBytecodeOffset(unsigned bytecodeOffset)
    1602 {
    1603     if (m_globalResolveInfos.isEmpty())
    1604         return false;
    1605 
    1606     int low = 0;
    1607     int high = m_globalResolveInfos.size();
    1608     while (low < high) {
    1609         int mid = low + (high - low) / 2;
    1610         if (m_globalResolveInfos[mid].bytecodeOffset <= bytecodeOffset)
    1611             low = mid + 1;
    1612         else
    1613             high = mid;
    1614     }
    1615 
    1616     if (!low || m_globalResolveInfos[low - 1].bytecodeOffset != bytecodeOffset)
    1617         return false;
    1618     return true;
    1619 }
    1620 #endif
    1621 
    1622 #if ENABLE(JIT)
     1556
    16231557void CodeBlock::setJITCode(JITCodeRef& jitCode)
    16241558{
Note: See TracChangeset for help on using the changeset viewer.