Changeset 258825 in webkit


Ignore:
Timestamp:
Mar 22, 2020 9:57:06 PM (4 years ago)
Author:
ysuzuki@apple.com
Message:

Unreviewed, rename keepAlive to ensureStillAliveHere
https://bugs.webkit.org/show_bug.cgi?id=209398

Based on Geoff and Mark's feedback, renaming keepAlive to ensureStillAliveHere
to make the effect of keepAlive clear.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileAtomicsReadModifyWrite):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileArraySlice):
(JSC::FTL::DFG::LowerDFGToB3::ensureStillAliveHere):
(JSC::FTL::DFG::LowerDFGToB3::keepAlive): Deleted.

  • heap/HeapCell.cpp:

(JSC::ensureStillAliveHere):
(JSC::keepAlive): Deleted.

  • heap/HeapCell.h:

(JSC::ensureStillAliveHere):
(JSC::HeapCell::use const):
(JSC::keepAlive): Deleted.

  • runtime/JSCJSValue.cpp:

(JSC::ensureStillAliveHere):
(JSC::keepAlive): Deleted.

  • runtime/JSCJSValue.h:

(JSC::ensureStillAliveHere):
(JSC::keepAlive): Deleted.

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):

Location:
trunk/Source/JavaScriptCore
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r258824 r258825  
     12020-03-22  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        Unreviewed, rename keepAlive to ensureStillAliveHere
     4        https://bugs.webkit.org/show_bug.cgi?id=209398
     5
     6        Based on Geoff and Mark's feedback, renaming keepAlive to ensureStillAliveHere
     7        to make the effect of keepAlive clear.
     8
     9        * ftl/FTLLowerDFGToB3.cpp:
     10        (JSC::FTL::DFG::LowerDFGToB3::compileAtomicsReadModifyWrite):
     11        (JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
     12        (JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
     13        (JSC::FTL::DFG::LowerDFGToB3::compileArraySlice):
     14        (JSC::FTL::DFG::LowerDFGToB3::ensureStillAliveHere):
     15        (JSC::FTL::DFG::LowerDFGToB3::keepAlive): Deleted.
     16        * heap/HeapCell.cpp:
     17        (JSC::ensureStillAliveHere):
     18        (JSC::keepAlive): Deleted.
     19        * heap/HeapCell.h:
     20        (JSC::ensureStillAliveHere):
     21        (JSC::HeapCell::use const):
     22        (JSC::keepAlive): Deleted.
     23        * runtime/JSCJSValue.cpp:
     24        (JSC::ensureStillAliveHere):
     25        (JSC::keepAlive): Deleted.
     26        * runtime/JSCJSValue.h:
     27        (JSC::ensureStillAliveHere):
     28        (JSC::keepAlive): Deleted.
     29        * wasm/js/WebAssemblyModuleRecord.cpp:
     30        (JSC::WebAssemblyModuleRecord::link):
     31
    1322020-03-22  Yusuke Suzuki  <ysuzuki@apple.com>
    233
  • trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

    r258603 r258825  
    38413841
    38423842        // We have to keep base alive since that keeps storage alive.
    3843         keepAlive(lowCell(baseEdge));
     3843        ensureStillAliveHere(lowCell(baseEdge));
    38443844        setIntTypedArrayLoadResult(result, type);
    38453845    }
     
    47274727               
    47284728                // We have to keep base alive since that keeps storage alive.
    4729                 keepAlive(base);
     4729                ensureStillAliveHere(base);
    47304730                setDouble(result);
    47314731                return;
     
    50955095               
    50965096                // We have to keep base alive since that keeps storage alive.
    5097                 keepAlive(base);
     5097                ensureStillAliveHere(base);
    50985098                return;
    50995099            }
     
    56105610
    56115611        // Keep the sourceArray alive at least until after anything that can GC.
    5612         keepAlive(sourceArray);
     5612        ensureStillAliveHere(sourceArray);
    56135613
    56145614        LBasicBlock loop = m_out.newBlock();
     
    1834518345    }
    1834618346
    18347     void keepAlive(LValue value)
     18347    void ensureStillAliveHere(LValue value)
    1834818348    {
    1834918349        PatchpointValue* patchpoint = m_out.patchpoint(Void);
  • trunk/Source/JavaScriptCore/heap/HeapCell.cpp

    r258824 r258825  
    4545#if !COMPILER(GCC_COMPATIBLE)
    4646// This makes the argument opaque from the compiler.
    47 NEVER_INLINE void keepAlive(const void*)
     47NEVER_INLINE void ensureStillAliveHere(const void*)
    4848{
    4949}
  • trunk/Source/JavaScriptCore/heap/HeapCell.h

    r253074 r258825  
    3939
    4040#if COMPILER(GCC_COMPATIBLE)
    41 ALWAYS_INLINE void keepAlive(const void* pointer)
     41ALWAYS_INLINE void ensureStillAliveHere(const void* pointer)
    4242{
    4343    asm volatile ("" : : "r"(pointer) : "memory");
    4444}
    4545#else
    46 JS_EXPORT_PRIVATE void keepAlive(const void*);
     46JS_EXPORT_PRIVATE void ensureStillAliveHere(const void*);
    4747#endif
    4848
     
    9696    ALWAYS_INLINE void use() const
    9797    {
    98         keepAlive(this);
     98        ensureStillAliveHere(this);
    9999    }
    100100};
  • trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp

    r258824 r258825  
    430430#if !COMPILER(GCC_COMPATIBLE)
    431431// This makes the argument opaque from the compiler.
    432 NEVER_INLINE void keepAlive(JSValue)
     432NEVER_INLINE void ensureStillAliveHere(JSValue)
    433433{
    434434}
  • trunk/Source/JavaScriptCore/runtime/JSCJSValue.h

    r258824 r258825  
    639639
    640640#if COMPILER(GCC_COMPATIBLE)
    641 ALWAYS_INLINE void keepAlive(JSValue value)
     641ALWAYS_INLINE void ensureStillAliveHere(JSValue value)
    642642{
    643643#if USE(JSVALUE64)
     
    648648}
    649649#else
    650 JS_EXPORT_PRIVATE void keepAlive(JSValue);
     650JS_EXPORT_PRIVATE void ensureStillAliveHere(JSValue);
    651651#endif
    652652
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp

    r253121 r258825  
    429429                scope.assertNoException();
    430430                m_instance->linkGlobal(vm, globalIndex, globalValue);
    431                 keepAlive(bitwise_cast<void*>(initialBits)); // Ensure this is kept alive while creating JSWebAssemblyGlobal.
     431                ensureStillAliveHere(bitwise_cast<void*>(initialBits)); // Ensure this is kept alive while creating JSWebAssemblyGlobal.
    432432                break;
    433433            }
Note: See TracChangeset for help on using the changeset viewer.