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/interpreter/Interpreter.cpp

    r39351 r39354  
    833833    // we'll never reach the relevant op_profile_did_call.
    834834    if (Profiler* profiler = *Profiler::enabledProfilerReference()) {
     835#if !ENABLE(JIT)
    835836        if (isCallBytecode(codeBlock->instructions()[bytecodeOffset].u.opcode))
    836837            profiler->didExecute(callFrame, callFrame[codeBlock->instructions()[bytecodeOffset + 2].u.operand].jsValue(callFrame));
    837838        else if (codeBlock->instructions()[bytecodeOffset + 8].u.opcode == getOpcode(op_construct))
    838839            profiler->didExecute(callFrame, callFrame[codeBlock->instructions()[bytecodeOffset + 10].u.operand].jsValue(callFrame));
     840#else
     841        int functionRegisterIndex;
     842        if (codeBlock->functionRegisterForBytecodeOffset(bytecodeOffset, functionRegisterIndex))
     843            profiler->didExecute(callFrame, callFrame[functionRegisterIndex].jsValue(callFrame));
     844#endif
    839845    }
    840846
Note: See TracChangeset for help on using the changeset viewer.