Ignore:
Timestamp:
Aug 8, 2017, 8:48:44 PM (8 years ago)
Author:
[email protected]
Message:

ICs should do caging
https://bugs.webkit.org/show_bug.cgi?id=175295

Reviewed by Saam Barati.

Adds the appropriate cage() calls in our inline caches.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

  • bytecode/InlineAccess.cpp:

(JSC::InlineAccess::dumpCacheSizesAndCrash):
(JSC::InlineAccess::generateSelfPropertyAccess):
(JSC::InlineAccess::generateSelfPropertyReplace):
(JSC::InlineAccess::generateArrayLength):

File:
1 edited

Legend:

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

    r220416 r220441  
    528528                    CCallHelpers::Address(baseForAccessGPR, JSObject::butterflyOffset()),
    529529                    loadedValueGPR);
    530                 // FIXME: Do caging!
    531                 // https://bugs.webkit.org/show_bug.cgi?id=175295
     530                jit.cage(Gigacage::JSValue, loadedValueGPR);
    532531                storageGPR = loadedValueGPR;
    533532            }
     
    880879
    881880                    jit.loadPtr(CCallHelpers::Address(baseGPR, JSObject::butterflyOffset()), scratchGPR3);
    882                     // FIXME: Do caging!
    883                     // https://bugs.webkit.org/show_bug.cgi?id=175295
     881                    jit.cage(Gigacage::JSValue, scratchGPR3);
    884882
    885883                    // We have scratchGPR = new storage, scratchGPR3 = old storage,
     
    962960            if (!allocating) {
    963961                jit.loadPtr(CCallHelpers::Address(baseGPR, JSObject::butterflyOffset()), scratchGPR);
    964                 // FIXME: Do caging!
    965                 // https://bugs.webkit.org/show_bug.cgi?id=175295
     962                jit.cage(Gigacage::JSValue, scratchGPR);
    966963            }
    967964            jit.storeValue(
     
    1000997    case ArrayLength: {
    1001998        jit.loadPtr(CCallHelpers::Address(baseGPR, JSObject::butterflyOffset()), scratchGPR);
    1002         // FIXME: Do caging!
    1003         // https://bugs.webkit.org/show_bug.cgi?id=175295
     999        jit.cage(Gigacage::JSValue, scratchGPR);
    10041000        jit.load32(CCallHelpers::Address(scratchGPR, ArrayStorage::lengthOffset()), scratchGPR);
    10051001        state.failAndIgnore.append(
Note: See TracChangeset for help on using the changeset viewer.