Ignore:
Timestamp:
Sep 5, 2013, 4:27:41 PM (12 years ago)
Author:
[email protected]
Message:

Cleanup formatting of byte code debug output
Source/JavaScriptCore/ChangeLog

Rubber stamped by Filip Pizlo.

Put the formatting of the byte code offset and operation into one common function to
simplify and unify formatting. Changed CodeBlock::registerName() to return
"thist" for argument register 0, "argN" for other argument registers and "locN" for
local registers.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::registerName):
(JSC::CodeBlock::printUnaryOp):
(JSC::CodeBlock::printBinaryOp):
(JSC::CodeBlock::printConditionalJump):
(JSC::CodeBlock::printGetByIdOp):
(JSC::CodeBlock::printCallOp):
(JSC::CodeBlock::printPutByIdOp):
(JSC::CodeBlock::dumpBytecode):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::printLocationAndOp):
(JSC::CodeBlock::printLocationOpAndRegisterOperand):

File:
1 edited

Legend:

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

    r155023 r155159  
    10071007    void printCallOp(PrintStream&, ExecState*, int location, const Instruction*&, const char* op, CacheDumpMode, bool& hasPrintedProfiling);
    10081008    void printPutByIdOp(PrintStream&, ExecState*, int location, const Instruction*&, const char* op);
     1009    void printLocationAndOp(PrintStream& out, ExecState*, int location, const Instruction*&, const char* op)
     1010    {
     1011        out.printf("[%4d] %-17s ", location, op);
     1012    }
     1013
     1014    void printLocationOpAndRegisterOperand(PrintStream& out, ExecState* exec, int location, const Instruction*& it, const char* op, int operand)
     1015    {
     1016        printLocationAndOp(out, exec, location, it, op);
     1017        out.printf("%s", registerName(operand).data());
     1018    }
     1019
    10091020    void beginDumpProfiling(PrintStream&, bool& hasPrintedProfiling);
    10101021    void dumpValueProfiling(PrintStream&, const Instruction*&, bool& hasPrintedProfiling);
Note: See TracChangeset for help on using the changeset viewer.