Ignore:
Timestamp:
Sep 4, 2008, 2:29:26 AM (17 years ago)
Author:
[email protected]
Message:

Fix the 64-bit build.

  • VM/CodeBlock.cpp:

(KJS::CodeBlock::printStructureID): Store the instruction offset into an unsigned local
to avoid a warning related to format specifiers.
(KJS::CodeBlock::printStructureIDs): Ditto.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/CodeBlock.cpp

    r36039 r36087  
    178178void CodeBlock::printStructureID(const char* name, const Instruction* vPC, int operand) const
    179179{
    180     printf("  [%4d] %s: %s\n", vPC - instructions.begin(), name, pointerToSourceString(vPC[operand].u.structureID).UTF8String().c_str());
     180    unsigned instructionOffset = vPC - instructions.begin();
     181    printf("  [%4d] %s: %s\n", instructionOffset, name, pointerToSourceString(vPC[operand].u.structureID).UTF8String().c_str());
    181182}
    182183
     
    184185{
    185186    Machine* machine = globalData->machine;
     187    unsigned instructionOffset = vPC - instructions.begin();
    186188
    187189    if (vPC[0].u.opcode == machine->getOpcode(op_get_by_id)) {
     
    194196    }
    195197    if (vPC[0].u.opcode == machine->getOpcode(op_get_by_id_proto)) {
    196         printf("  [%4d] %s: %s, %s\n", vPC - instructions.begin(), "get_by_id_proto", pointerToSourceString(vPC[4].u.structureID).UTF8String().c_str(), pointerToSourceString(vPC[5].u.structureID).UTF8String().c_str());
     198        printf("  [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_proto", pointerToSourceString(vPC[4].u.structureID).UTF8String().c_str(), pointerToSourceString(vPC[5].u.structureID).UTF8String().c_str());
    197199        return;
    198200    }
    199201    if (vPC[0].u.opcode == machine->getOpcode(op_get_by_id_chain)) {
    200         printf("  [%4d] %s: %s, %s\n", vPC - instructions.begin(), "get_by_id_chain", pointerToSourceString(vPC[4].u.structureID).UTF8String().c_str(), pointerToSourceString(vPC[5].u.structureIDChain).UTF8String().c_str());
     202        printf("  [%4d] %s: %s, %s\n", instructionOffset, "get_by_id_chain", pointerToSourceString(vPC[4].u.structureID).UTF8String().c_str(), pointerToSourceString(vPC[5].u.structureIDChain).UTF8String().c_str());
    201203        return;
    202204    }
Note: See TracChangeset for help on using the changeset viewer.