Ignore:
Timestamp:
Aug 17, 2011, 1:54:32 PM (14 years ago)
Author:
[email protected]
Message:

JSC verbose debugging output sometimes doesn't work as expected.
https://bugs.webkit.org/show_bug.cgi?id=66107

Reviewed by Gavin Barraclough.

Hardened the CodeBlock::dump() code so that it no longer crashes. Improved
the DFG verbose code so that it prints slightly more useful information.

  • assembler/LinkBuffer.h:

(JSC::LinkBuffer::debugSize):

  • bytecode/CodeBlock.cpp:

(JSC::valueToSourceString):
(JSC::CodeBlock::dump):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::numberOfRegExps):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):

File:
1 edited

Legend:

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

    r91952 r93238  
    7777        return makeUString("\"", escapeQuotes(val.toString(exec)), "\"");
    7878
    79     return val.toString(exec);
     79    return val.description();
    8080}
    8181
     
    543543            int r0 = (++it)->u.operand;
    544544            int re0 = (++it)->u.operand;
    545             printf("[%4d] new_regexp\t %s, %s\n", location, registerName(exec, r0).data(), regexpName(re0, regexp(re0)).data());
     545            printf("[%4d] new_regexp\t %s, ", location, registerName(exec, r0).data());
     546            if (r0 >=0 && r0 < (int)numberOfRegExps())
     547                printf("%s\n", regexpName(re0, regexp(re0)).data());
     548            else
     549                printf("bad_regexp(%d)\n", re0);
    546550            break;
    547551        }
Note: See TracChangeset for help on using the changeset viewer.