Ignore:
Timestamp:
Aug 7, 2017, 4:30:15 PM (8 years ago)
Author:
[email protected]
Message:

Baseline JIT should do caging
https://bugs.webkit.org/show_bug.cgi?id=175037

Reviewed by Mark Lam.
Source/bmalloc:


This centralizes the notion of permanently enabling the primitive gigacage, which we only do in jsc
and WebProcess.

This saves the baseline JIT from emitting some code. Otherwise it would always have to emit enabled
checks on each typed array access.

  • bmalloc/Gigacage.cpp:

(Gigacage::primitiveGigacageDisabled):
(Gigacage::disableDisablingPrimitiveGigacageIfShouldBeEnabled):
(Gigacage::isDisablingPrimitiveGigacageDisabled):

  • bmalloc/Gigacage.h:

(Gigacage::isPrimitiveGigacagePermanentlyEnabled):
(Gigacage::canPrimitiveGigacageBeDisabled):

Source/JavaScriptCore:


Adds a AssemblyHelpers::cage and cageConditionally. Uses it in the baseline JIT.

Also modifies FTL caging to be more defensive when caging is disabled.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::caged):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::cage):
(JSC::AssemblyHelpers::cageConditionally):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emitDoubleLoad):
(JSC::JIT::emitContiguousLoad):
(JSC::JIT::emitArrayStorageLoad):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emit_op_put_to_scope):
(JSC::JIT::emitIntTypedArrayGetByVal):
(JSC::JIT::emitFloatTypedArrayGetByVal):
(JSC::JIT::emitIntTypedArrayPutByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):

  • jsc.cpp:

(jscmain):
(primitiveGigacageDisabled): Deleted.

Source/WebKit:


Use a better API to disable disabling the primitive gigacage.

  • WebProcess/WebProcess.cpp:

(WebKit::m_webSQLiteDatabaseTracker):
(WebKit::primitiveGigacageDisabled): Deleted.

Source/WTF:

  • wtf/Gigacage.h:

(Gigacage::disableDisablingPrimitiveGigacageIfShouldBeEnabled):
(Gigacage::isDisablingPrimitiveGigacageDisabled):
(Gigacage::isPrimitiveGigacagePermanentlyEnabled):
(Gigacage::canPrimitiveGigacageBeDisabled):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r220352 r220368  
     12017-08-07  Filip Pizlo  <[email protected]>
     2
     3        Baseline JIT should do caging
     4        https://bugs.webkit.org/show_bug.cgi?id=175037
     5
     6        Reviewed by Mark Lam.
     7       
     8        Adds a AssemblyHelpers::cage and cageConditionally. Uses it in the baseline JIT.
     9       
     10        Also modifies FTL caging to be more defensive when caging is disabled.
     11
     12        * ftl/FTLLowerDFGToB3.cpp:
     13        (JSC::FTL::DFG::LowerDFGToB3::caged):
     14        * jit/AssemblyHelpers.h:
     15        (JSC::AssemblyHelpers::cage):
     16        (JSC::AssemblyHelpers::cageConditionally):
     17        * jit/JITPropertyAccess.cpp:
     18        (JSC::JIT::emitDoubleLoad):
     19        (JSC::JIT::emitContiguousLoad):
     20        (JSC::JIT::emitArrayStorageLoad):
     21        (JSC::JIT::emitGenericContiguousPutByVal):
     22        (JSC::JIT::emitArrayStoragePutByVal):
     23        (JSC::JIT::emit_op_get_from_scope):
     24        (JSC::JIT::emit_op_put_to_scope):
     25        (JSC::JIT::emitIntTypedArrayGetByVal):
     26        (JSC::JIT::emitFloatTypedArrayGetByVal):
     27        (JSC::JIT::emitIntTypedArrayPutByVal):
     28        (JSC::JIT::emitFloatTypedArrayPutByVal):
     29        * jsc.cpp:
     30        (jscmain):
     31        (primitiveGigacageDisabled): Deleted.
     32
    1332017-08-06  Filip Pizlo  <[email protected]>
    234
Note: See TracChangeset for help on using the changeset viewer.