Ignore:
Timestamp:
Nov 21, 2012, 7:47:23 PM (12 years ago)
Author:
[email protected]
Message:

It should be possible to say disassemble(stuff) instead of having to say if (!tryToDisassemble(stuff)) dataLog("I failed")
https://bugs.webkit.org/show_bug.cgi?id=103010

Reviewed by Anders Carlsson.

You can still say tryToDisassemble(), which will tell you if it failed; you can then
decide what to do instead. But it's better to say disassemble(), which will just print
the instruction ranges if tryToDisassemble() failed. This is particularly appropriate
since that's what all previous users of tryToDisassemble() would have done in some
form or another.

  • CMakeLists.txt:
  • GNUmakefile.list.am:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Target.pri:
  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::finalizeCodeWithDisassembly):

  • dfg/DFGDisassembler.cpp:

(JSC::DFG::Disassembler::dumpDisassembly):

  • disassembler/Disassembler.cpp: Added.

(JSC):
(JSC::disassemble):

  • disassembler/Disassembler.h:

(JSC):

  • jit/JITDisassembler.cpp:

(JSC::JITDisassembler::dumpDisassembly):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JITDisassembler.cpp

    r135457 r135466  
    9393    CodeLocationLabel fromLocation = linkBuffer.locationOf(from);
    9494    CodeLocationLabel toLocation = linkBuffer.locationOf(to);
    95     if (tryToDisassemble(fromLocation, bitwise_cast<uintptr_t>(toLocation.executableAddress()) - bitwise_cast<uintptr_t>(fromLocation.executableAddress()), "        ", WTF::dataFile()))
    96         return;
    97    
    98     dataLog("        disassembly not available for range %p...%p\n", fromLocation.executableAddress(), toLocation.executableAddress());
     95    disassemble(fromLocation, bitwise_cast<uintptr_t>(toLocation.executableAddress()) - bitwise_cast<uintptr_t>(fromLocation.executableAddress()), "        ", WTF::dataFile());
    9996}
    10097
Note: See TracChangeset for help on using the changeset viewer.