Ignore:
Timestamp:
Nov 18, 2010, 6:35:25 PM (15 years ago)
Author:
[email protected]
Message:

Bug 49708 - Stop recompiling functions to regenerate exception info.

Reviewed by Oliver Hunt.

Instead only hold info as necessary – keep divot info is the inspector
is enabled, line number info is debugging or profiling, and handler
info for functions with try/catch.

JavaScriptCore:

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpStatistics):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::lineNumberForBytecodeOffset):
(JSC::CodeBlock::expressionRangeForBytecodeOffset):
(JSC::CodeBlock::shrinkToFit):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::bytecodeOffset):
(JSC::CodeBlock::addExpressionInfo):
(JSC::CodeBlock::addLineInfo):
(JSC::CodeBlock::hasExpressionInfo):
(JSC::CodeBlock::hasLineInfo):
(JSC::CodeBlock::needsCallReturnIndices):
(JSC::CodeBlock::callReturnIndexVector):

  • bytecode/SamplingTool.cpp:

(JSC::SamplingTool::dump):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::emitNode):
(JSC::BytecodeGenerator::emitNodeInConditionContext):
(JSC::BytecodeGenerator::emitExpressionInfo):
(JSC::BytecodeGenerator::addLineInfo):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::unwindCallFrame):
(JSC::appendSourceToError):
(JSC::Interpreter::throwException):
(JSC::Interpreter::privateExecute):
(JSC::Interpreter::retrieveLastCaller):

  • interpreter/Interpreter.h:
  • jit/JIT.cpp:

(JSC::JIT::privateCompile):

  • jit/JITStubs.cpp:

(JSC::jitThrow):
(JSC::DEFINE_STUB_FUNCTION):

  • runtime/Collector.cpp:

(JSC::Heap::markRoots):

  • runtime/Executable.cpp:

(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):

  • runtime/Executable.h:
  • runtime/JSGlobalData.cpp:

(JSC::JSGlobalData::JSGlobalData):

  • runtime/JSGlobalData.h:

(JSC::JSGlobalData::usingAPI):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::supportsRichSourceInfo):
(JSC::JSGlobalObject::globalData):

WebCore:

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::supportsRichSourceInfo):

  • report to JSC whether the inspector is enabled - in which case we will generate better error messages on exceptions.
  • bindings/js/JSDOMWindowBase.h:

WebKitTools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(shouldEnableDeveloperExtras):

  • always enable the developer tools from DRT, to ensure we produce rich error messages on JavaScript exceptions.
File:
1 edited

Legend:

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

    r65344 r72360  
    338338        if (blockPercent >= 1) {
    339339            //Instruction* code = codeBlock->instructions().begin();
    340             printf("#%d: %s:%d: %d / %lld (%.3f%%)\n", i + 1, record->m_executable->sourceURL().utf8().data(), codeBlock->lineNumberForBytecodeOffset(exec, 0), record->m_sampleCount, m_sampleCount, blockPercent);
     340            printf("#%d: %s:%d: %d / %lld (%.3f%%)\n", i + 1, record->m_executable->sourceURL().utf8().data(), codeBlock->lineNumberForBytecodeOffset(0), record->m_sampleCount, m_sampleCount, blockPercent);
    341341            if (i < 10) {
    342342                HashMap<unsigned,unsigned> lineCounts;
     
    348348                    if (count) {
    349349                        printf("    [% 4d] has sample count: % 4d\n", op, count);
    350                         unsigned line = codeBlock->lineNumberForBytecodeOffset(exec, op);
     350                        unsigned line = codeBlock->lineNumberForBytecodeOffset(op);
    351351                        lineCounts.set(line, (lineCounts.contains(line) ? lineCounts.get(line) : 0) + count);
    352352                    }
Note: See TracChangeset for help on using the changeset viewer.