Ignore:
Timestamp:
Dec 16, 2008, 10:30:17 PM (16 years ago)
Author:
[email protected]
Message:

2008-12-16 Sam Weinig <[email protected]>

Reviewed by Geoffrey Garen.

Fix for https://bugs.webkit.org/show_bug.cgi?id=22838
Remove dependency on the bytecode Instruction buffer in Interpreter::throwException
Part of <rdar://problem/6428342>

  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::functionRegisterForBytecodeOffset): Added. Function to get a function Register index in a callFrame for a bytecode offset. (JSC::CodeBlock::shrinkToFit): Shrink m_getByIdExceptionInfo and m_functionRegisterInfos.
  • bytecode/CodeBlock.h: (JSC::FunctionRegisterInfo::FunctionRegisterInfo): Added. (JSC::CodeBlock::addFunctionRegisterInfo):
  • bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::emitCall):
  • interpreter/Interpreter.cpp: (JSC::Interpreter::throwException): Use functionRegisterForBytecodeOffset in JIT mode.
File:
1 edited

Legend:

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

    r39285 r39354  
    129129    };
    130130
     131    struct FunctionRegisterInfo {
     132        FunctionRegisterInfo(unsigned bytecodeOffset, int functionRegisterIndex)
     133            : bytecodeOffset(bytecodeOffset)
     134            , functionRegisterIndex(functionRegisterIndex)
     135        {
     136        }
     137
     138        unsigned bytecodeOffset;
     139        int functionRegisterIndex;
     140    };
     141
    131142    struct GlobalResolveInfo {
    132143        GlobalResolveInfo()
     
    291302            return binaryChop<PC, void*, getNativePC>(m_pcVector.begin(), m_pcVector.size(), nativePC)->bytecodeIndex;
    292303        }
     304
     305        bool functionRegisterForBytecodeOffset(unsigned bytecodeOffset, int& functionRegisterIndex);
    293306#endif
    294307
     
    350363        void addCallLinkInfo() { m_callLinkInfos.append(CallLinkInfo()); }
    351364        CallLinkInfo& callLinkInfo(int index) { return m_callLinkInfos[index]; }
     365
     366        void addFunctionRegisterInfo(unsigned bytecodeOffset, int functionIndex) { createRareDataIfNecessary(); m_rareData->m_functionRegisterInfos.append(FunctionRegisterInfo(bytecodeOffset, functionIndex)); }
    352367
    353368        Vector<PC>& pcVector() { return m_pcVector; }
     
    481496
    482497            EvalCodeCache m_evalCodeCache;
     498
     499#if ENABLE(JIT)
     500            Vector<FunctionRegisterInfo> m_functionRegisterInfos;
     501#endif
    483502        };
    484503
Note: See TracChangeset for help on using the changeset viewer.