Changeset 79247 in webkit for trunk/Source/JavaScriptCore/jit


Ignore:
Timestamp:
Feb 21, 2011, 1:14:57 PM (14 years ago)
Author:
[email protected]
Message:

2011-02-21 Xan Lopez <[email protected]>

Reviewed by Gavin Barraclough.

Use ASSERT_JIT_OFFSET in JITPropertyAccess32_64.cpp
https://bugs.webkit.org/show_bug.cgi?id=54901

  • jit/JIT.h: swap actual and expected values in message, they were reversed.
  • jit/JITCall32_64.cpp: (JSC::JIT::compileOpCall): use ASSERT_JIT_OFFSET instead of a simple ASSERT.
  • jit/JITPropertyAccess32_64.cpp: (JSC::JIT::emit_op_method_check): ditto. (JSC::JIT::compileGetByIdHotPath): ditto. (JSC::JIT::compileGetByIdSlowCase): ditto. (JSC::JIT::emit_op_put_by_id): ditto.
Location:
trunk/Source/JavaScriptCore/jit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JIT.h

    r78732 r79247  
    3737#endif
    3838
    39 #define ASSERT_JIT_OFFSET(actual, expected) ASSERT_WITH_MESSAGE(actual == expected, "JIT Offset \"%s\" should be %d, not %d.\n", #expected, static_cast<int>(actual), static_cast<int>(expected));
     39#define ASSERT_JIT_OFFSET(actual, expected) ASSERT_WITH_MESSAGE(actual == expected, "JIT Offset \"%s\" should be %d, not %d.\n", #expected, static_cast<int>(expected), static_cast<int>(actual));
    4040
    4141#include "CodeBlock.h"
  • trunk/Source/JavaScriptCore/jit/JITCall32_64.cpp

    r69045 r79247  
    283283
    284284    addSlowCase(jumpToSlow);
    285     ASSERT(differenceBetween(addressOfLinkedFunctionCheck, jumpToSlow) == patchOffsetOpCallCompareToJump);
     285    ASSERT_JIT_OFFSET(differenceBetween(addressOfLinkedFunctionCheck, jumpToSlow), patchOffsetOpCallCompareToJump);
    286286    m_callStructureStubCompilationInfo[callLinkInfoIndex].hotPathBegin = addressOfLinkedFunctionCheck;
    287287
  • trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp

    r78732 r79247  
    226226    Jump match = jump();
    227227   
    228     ASSERT(differenceBetween(info.structureToCompare, protoObj) == patchOffsetMethodCheckProtoObj);
    229     ASSERT(differenceBetween(info.structureToCompare, protoStructureToCompare) == patchOffsetMethodCheckProtoStruct);
    230     ASSERT(differenceBetween(info.structureToCompare, putFunction) == patchOffsetMethodCheckPutFunction);
     228    ASSERT_JIT_OFFSET(differenceBetween(info.structureToCompare, protoObj), patchOffsetMethodCheckProtoObj);
     229    ASSERT_JIT_OFFSET(differenceBetween(info.structureToCompare, protoStructureToCompare), patchOffsetMethodCheckProtoStruct);
     230    ASSERT_JIT_OFFSET(differenceBetween(info.structureToCompare, putFunction), patchOffsetMethodCheckPutFunction);
    231231   
    232232    // Link the failure cases here.
     
    432432    Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)));
    433433    addSlowCase(structureCheck);
    434     ASSERT(differenceBetween(hotPathBegin, structureToCompare) == patchOffsetGetByIdStructure);
    435     ASSERT(differenceBetween(hotPathBegin, structureCheck) == patchOffsetGetByIdBranchToSlowCase);
     434    ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureToCompare), patchOffsetGetByIdStructure);
     435    ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureCheck), patchOffsetGetByIdBranchToSlowCase);
    436436   
    437437    loadPtr(Address(regT0, OBJECT_OFFSETOF(JSObject, m_propertyStorage)), regT2);
    438438    DataLabel32 displacementLabel1 = loadPtrWithAddressOffsetPatch(Address(regT2, patchGetByIdDefaultOffset), regT0); // payload
    439     ASSERT(differenceBetween(hotPathBegin, displacementLabel1) == patchOffsetGetByIdPropertyMapOffset1);
     439    ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, displacementLabel1), patchOffsetGetByIdPropertyMapOffset1);
    440440    DataLabel32 displacementLabel2 = loadPtrWithAddressOffsetPatch(Address(regT2, patchGetByIdDefaultOffset), regT1); // tag
    441     ASSERT(differenceBetween(hotPathBegin, displacementLabel2) == patchOffsetGetByIdPropertyMapOffset2);
     441    ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, displacementLabel2), patchOffsetGetByIdPropertyMapOffset2);
    442442   
    443443    Label putResult(this);
    444     ASSERT(differenceBetween(hotPathBegin, putResult) == patchOffsetGetByIdPutResult);
     444    ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, putResult), patchOffsetGetByIdPutResult);
    445445   
    446446    END_UNINTERRUPTED_SEQUENCE(sequenceGetByIdHotPath);
     
    478478    END_UNINTERRUPTED_SEQUENCE(sequenceGetByIdSlowCase);
    479479   
    480     ASSERT(differenceBetween(coldPathBegin, call) == patchOffsetGetByIdSlowCaseCall);
     480    ASSERT_JIT_OFFSET(differenceBetween(coldPathBegin, call), patchOffsetGetByIdSlowCaseCall);
    481481   
    482482    // Track the location of the call; this will be used to recover patch information.
     
    507507    DataLabelPtr structureToCompare;
    508508    addSlowCase(branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))));
    509     ASSERT(differenceBetween(hotPathBegin, structureToCompare) == patchOffsetPutByIdStructure);
     509    ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureToCompare), patchOffsetPutByIdStructure);
    510510   
    511511    loadPtr(Address(regT0, OBJECT_OFFSETOF(JSObject, m_propertyStorage)), regT0);
     
    515515    END_UNINTERRUPTED_SEQUENCE(sequencePutById);
    516516   
    517     ASSERT(differenceBetween(hotPathBegin, displacementLabel1) == patchOffsetPutByIdPropertyMapOffset1);
    518     ASSERT(differenceBetween(hotPathBegin, displacementLabel2) == patchOffsetPutByIdPropertyMapOffset2);
     517    ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, displacementLabel1), patchOffsetPutByIdPropertyMapOffset1);
     518    ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, displacementLabel2), patchOffsetPutByIdPropertyMapOffset2);
    519519}
    520520
Note: See TracChangeset for help on using the changeset viewer.