⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 272135 in webkit


Ignore:
Timestamp:
Feb 1, 2021, 2:20:15 AM (6 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r270377 - aarch64 llint does not build with JIT disabled
​https://bugs.webkit.org/show_bug.cgi?id=219288
<rdar://problem/71855960>

Source/JavaScriptCore:

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-12-02
Reviewed by Darin Adler.

  • assembler/ARM64Assembler.h: Rename USE(JUMP_ISLANDS) to ENABLE(JUMP_ISLANDS).

(JSC::ARM64Assembler::replaceWithJump):
(JSC::ARM64Assembler::linkJumpOrCall):

  • assembler/AbstractMacroAssembler.h: Rename USE(JUMP_ISLANDS) to ENABLE(JUMP_ISLANDS).

(JSC::AbstractMacroAssembler::prepareForAtomicRepatchNearCallConcurrently):

  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::copyCompactAndLinkCode): Guard JIT-specific code with ENABLE(JIT).

  • jit/ExecutableAllocator.cpp: Rename USE(JUMP_ISLANDS) to ENABLE(JUMP_ISLANDS).

(JSC::initializeJITPageReservation):

  • jit/ExecutableAllocator.h: Rename USE(JUMP_ISLANDS) to ENABLE(JUMP_ISLANDS).

Source/WTF:

Rename USE(JUMP_ISLANDS) to ENABLE(JUMP_ISLANDS), and make it depend on ENABLE(JIT). We need
it to depend on ENABLE(JIT) to fix the build, but this is awkward to do otherwise, because
USE macros are defined in PlatformUse.h before ENABLE macros in PlatformEnable.h. But it
makes sense, since USE macros should be used for "a particular third-party library or
optional OS service," and jump islands are neither, so ENABLE is more suitable anyway.

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-12-02
Reviewed by Darin Adler.

  • wtf/PlatformEnable.h:
  • wtf/PlatformUse.h:
Location:
releases/WebKitGTK/webkit-2.30/Source
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.30/Source/JavaScriptCore/ChangeLog

    r272134 r272135  
     12020-12-02  Michael Catanzaro  <mcatanzaro@gnome.org>
     2
     3        aarch64 llint does not build with JIT disabled
     4        https://bugs.webkit.org/show_bug.cgi?id=219288
     5        <rdar://problem/71855960>
     6
     7        Reviewed by Darin Adler.
     8
     9        * assembler/ARM64Assembler.h: Rename USE(JUMP_ISLANDS) to ENABLE(JUMP_ISLANDS).
     10        (JSC::ARM64Assembler::replaceWithJump):
     11        (JSC::ARM64Assembler::linkJumpOrCall):
     12        * assembler/AbstractMacroAssembler.h: Rename USE(JUMP_ISLANDS) to ENABLE(JUMP_ISLANDS).
     13        (JSC::AbstractMacroAssembler::prepareForAtomicRepatchNearCallConcurrently):
     14        * assembler/LinkBuffer.cpp:
     15        (JSC::LinkBuffer::copyCompactAndLinkCode): Guard JIT-specific code with ENABLE(JIT).
     16        * jit/ExecutableAllocator.cpp: Rename USE(JUMP_ISLANDS) to ENABLE(JUMP_ISLANDS).
     17        (JSC::initializeJITPageReservation):
     18        * jit/ExecutableAllocator.h: Rename USE(JUMP_ISLANDS) to ENABLE(JUMP_ISLANDS).
     19
    1202021-01-19  Lauro Moura  <lmoura@igalia.com>
    221
  • releases/WebKitGTK/webkit-2.30/Source/JavaScriptCore/assembler/ARM64Assembler.h

    r263380 r272135  
    25722572        ASSERT(static_cast<int>(offset) == offset);
    25732573
    2574 #if USE(JUMP_ISLANDS)
     2574#if ENABLE(JUMP_ISLANDS)
    25752575        if (!isInt<26>(offset)) {
    25762576            to = ExecutableAllocator::singleton().getJumpIslandTo(where, to);
    … …  
    27702770    }
    27712771
    2772 #if USE(JUMP_ISLANDS)
     2772#if ENABLE(JUMP_ISLANDS)
    27732773    static void* prepareForAtomicRelinkJumpConcurrently(void* from, void* to)
    27742774    {
    … …  
    30203020        ASSERT(static_cast<int>(offset) == offset);
    30213021
    3022 #if USE(JUMP_ISLANDS)
     3022#if ENABLE(JUMP_ISLANDS)
    30233023        if (!isInt<26>(offset)) {
    30243024            to = ExecutableAllocator::singleton().getJumpIslandTo(bitwise_cast<void*>(fromInstruction), to);
  • releases/WebKitGTK/webkit-2.30/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h

    r263049 r272135  
    917917    static CodeLocationLabel<destTag> prepareForAtomicRepatchNearCallConcurrently(CodeLocationNearCall<callTag> nearCall, CodeLocationLabel<destTag> destination)
    918918    {
    919 #if USE(JUMP_ISLANDS)
     919#if ENABLE(JUMP_ISLANDS)
    920920        switch (nearCall.callMode()) {
    921921        case NearCallMode::Tail:
  • releases/WebKitGTK/webkit-2.30/Source/JavaScriptCore/assembler/LinkBuffer.cpp

    r263380 r272135  
    375375    }
    376376
     377#if ENABLE(JIT)
    377378    if (useFastJITPermissions()) {
    378379        ASSERT(codeOutData == outData);
    … …  
    383384        performJITMemcpy(codeOutData, outData, m_size);
    384385    }
     386#else
     387    ASSERT(codeOutData != outData);
     388    performJITMemcpy(codeOutData, outData, m_size);
     389#endif
    385390
    386391    jumpsToLink.clear();
  • releases/WebKitGTK/webkit-2.30/Source/JavaScriptCore/jit/ExecutableAllocator.cpp

    r263380 r272135  
    8282static constexpr size_t fixedExecutableMemoryPoolSize = 16 * MB;
    8383#elif CPU(ARM64)
    84 #if USE(JUMP_ISLANDS)
     84#if ENABLE(JUMP_ISLANDS)
    8585static constexpr size_t fixedExecutableMemoryPoolSize = 1 * GB;
    8686// These sizes guarantee that any jump within an island can jump forwards or backwards
    … …  
    311311
    312312    reservation.size = fixedExecutableMemoryPoolSize;
    313 #if !USE(JUMP_ISLANDS)
     313#if !ENABLE(JUMP_ISLANDS)
    314314    // FIXME: Consider making jump islands work with Options::jitMemoryReservationSize
    315315    // https://bugs.webkit.org/show_bug.cgi?id=209037
    … …  
    360360    WTF_MAKE_FAST_ALLOCATED;
    361361
    362 #if USE(JUMP_ISLANDS)
     362#if ENABLE(JUMP_ISLANDS)
    363363    class Islands;
    364364    class RegionAllocator;
    … …  
    367367public:
    368368    FixedVMPoolExecutableAllocator()
    369 #if USE(JUMP_ISLANDS)
     369#if ENABLE(JUMP_ISLANDS)
    370370        : m_allocators(constructFixedSizeArrayWithArguments<RegionAllocator, numberOfRegions>(*this))
    371371#else
    … …  
    376376        m_reservation = WTFMove(reservation.pageReservation);
    377377        if (m_reservation) {
    378 #if USE(JUMP_ISLANDS)
     378#if ENABLE(JUMP_ISLANDS)
    379379            uintptr_t start = bitwise_cast<uintptr_t>(memoryStart());
    380380            uintptr_t reservationEnd = bitwise_cast<uintptr_t>(memoryEnd());
    … …  
    416416    RefPtr<ExecutableMemoryHandle> allocate(size_t sizeInBytes)
    417417    {
    418 #if USE(JUMP_ISLANDS)
     418#if ENABLE(JUMP_ISLANDS)
    419419        auto locker = holdLock(getLock());
    420420
    … …  
    435435#else
    436436        return m_allocator.allocate(sizeInBytes);
    437 #endif // USE(JUMP_ISLANDS)
     437#endif // ENABLE(JUMP_ISLANDS)
    438438    }
    439439
    … …  
    468468    bool isInAllocatedMemory(const AbstractLocker& locker, void* address)
    469469    {
    470 #if USE(JUMP_ISLANDS)
     470#if ENABLE(JUMP_ISLANDS)
    471471        if (RegionAllocator* allocator = findRegion(bitwise_cast<uintptr_t>(address)))
    472472            return allocator->isInAllocatedMemory(locker, address);
    … …  
    499499    }
    500500
    501 #if USE(JUMP_ISLANDS)
     501#if ENABLE(JUMP_ISLANDS)
    502502    void handleWillBeReleased(const LockHolder& locker, MetaAllocatorHandle& handle)
    503503    {
    … …  
    633633        return result;
    634634    }
    635 #endif // USE(JUMP_ISLANDS)
     635#endif // ENABLE(JUMP_ISLANDS)
    636636
    637637private:
    … …  
    664664    };
    665665
    666 #if USE(JUMP_ISLANDS)
     666#if ENABLE(JUMP_ISLANDS)
    667667    class RegionAllocator final : public Allocator {
    668668        using Base = Allocator;
    … …  
    769769        FastBitVector islandBits;
    770770    };
    771 #endif // USE(JUMP_ISLANDS)
     771#endif // ENABLE(JUMP_ISLANDS)
    772772
    773773    template <typename Function>
    774774    void forEachAllocator(Function function)
    775775    {
    776 #if USE(JUMP_ISLANDS)
     776#if ENABLE(JUMP_ISLANDS)
    777777        for (RegionAllocator& allocator : m_allocators) {
    778778            using FunctionResultType = decltype(function(allocator));
    … …  
    787787#else
    788788        function(m_allocator);
    789 #endif // USE(JUMP_ISLANDS)
    790     }
    791 
    792 #if USE(JUMP_ISLANDS)
     789#endif // ENABLE(JUMP_ISLANDS)
     790    }
     791
     792#if ENABLE(JUMP_ISLANDS)
    793793    class Islands : public RedBlackTree<Islands, void*>::Node {
    794794        WTF_MAKE_FAST_ALLOCATED;
    … …  
    798798        Vector<CodeLocationLabel<ExecutableMemoryPtrTag>> jumpIslands;
    799799    };
    800 #endif // USE(JUMP_ISLANDS)
     800#endif // ENABLE(JUMP_ISLANDS)
    801801
    802802    Lock m_lock;
    803803    PageReservation m_reservation;
    804 #if USE(JUMP_ISLANDS)
     804#if ENABLE(JUMP_ISLANDS)
    805805    std::array<RegionAllocator, numberOfRegions> m_allocators;
    806806    RedBlackTree<Islands, void*> m_islandsForJumpSourceLocation;
    807807#else
    808808    Allocator m_allocator;
    809 #endif // USE(JUMP_ISLANDS)
     809#endif // ENABLE(JUMP_ISLANDS)
    810810};
    811811
    … …  
    939939#endif
    940940
    941 #if USE(JUMP_ISLANDS)
     941#if ENABLE(JUMP_ISLANDS)
    942942void* ExecutableAllocator::getJumpIslandTo(void* from, void* newDestination)
    943943{
  • releases/WebKitGTK/webkit-2.30/Source/JavaScriptCore/jit/ExecutableAllocator.h

    r263380 r272135  
    179179    Lock& getLock() const;
    180180
    181 #if USE(JUMP_ISLANDS)
     181#if ENABLE(JUMP_ISLANDS)
    182182    JS_EXPORT_PRIVATE void* getJumpIslandTo(void* from, void* newDestination);
    183183    JS_EXPORT_PRIVATE void* getJumpIslandToConcurrently(void* from, void* newDestination);
  • releases/WebKitGTK/webkit-2.30/Source/WTF/ChangeLog

    r272132 r272135  
     12020-12-02  Michael Catanzaro  <mcatanzaro@gnome.org>
     2
     3        aarch64 llint does not build with JIT disabled
     4        https://bugs.webkit.org/show_bug.cgi?id=219288
     5        <rdar://problem/71855960>
     6
     7        Rename USE(JUMP_ISLANDS) to ENABLE(JUMP_ISLANDS), and make it depend on ENABLE(JIT). We need
     8        it to depend on ENABLE(JIT) to fix the build, but this is awkward to do otherwise, because
     9        USE macros are defined in PlatformUse.h before ENABLE macros in PlatformEnable.h. But it
     10        makes sense, since USE macros should be used for "a particular third-party library or
     11        optional OS service," and jump islands are neither, so ENABLE is more suitable anyway.
     12
     13        Reviewed by Darin Adler.
     14
     15        * wtf/PlatformEnable.h:
     16        * wtf/PlatformUse.h:
     17
    1182020-12-07  Zan Dobersek  <zdobersek@igalia.com>
    219
  • releases/WebKitGTK/webkit-2.30/Source/WTF/wtf/PlatformEnable.h

    r265228 r272135  
    600600#endif
    601601
     602#if !defined(ENABLE_JUMP_ISLANDS) && CPU(ARM64) && CPU(ADDRESS64) && ENABLE(JIT)
     603#define ENABLE_JUMP_ISLANDS 1
     604#endif
     605
    602606/* FIXME: This should be turned into an #error invariant */
    603607/* The FTL *does not* work on 32-bit platforms. Disable it even if someone asked us to enable it. */
    … …  
    871875#error "ENABLE(WEBGL2) requires ENABLE(WEBGL)"
    872876#endif
    873 
    874 #if CPU(ARM64) && CPU(ADDRESS64)
    875 #define USE_JUMP_ISLANDS 1
    876 #endif
Note: See TracChangeset for help on using the changeset viewer.