Changeset 270377 in webkit
- Timestamp:
- Dec 2, 2020, 4:42:58 PM (6 years ago)
- Location:
- trunk/Source
- Files:
-
- 9 edited
-
JavaScriptCore/ChangeLog (modified) (1 diff)
-
JavaScriptCore/assembler/ARM64Assembler.h (modified) (3 diffs)
-
JavaScriptCore/assembler/AbstractMacroAssembler.h (modified) (1 diff)
-
JavaScriptCore/assembler/LinkBuffer.cpp (modified) (2 diffs)
-
JavaScriptCore/jit/ExecutableAllocator.cpp (modified) (15 diffs)
-
JavaScriptCore/jit/ExecutableAllocator.h (modified) (1 diff)
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/wtf/PlatformEnable.h (modified) (1 diff)
-
WTF/wtf/PlatformUse.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r270371 r270377 1 2020-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 1 20 2020-12-02 Ross Kirsling <ross.kirsling@sony.com> 2 21 -
trunk/Source/JavaScriptCore/assembler/ARM64Assembler.h
r269020 r270377 2606 2606 ASSERT(static_cast<int>(offset) == offset); 2607 2607 2608 #if USE(JUMP_ISLANDS)2608 #if ENABLE(JUMP_ISLANDS) 2609 2609 if (!isInt<26>(offset)) { 2610 2610 to = ExecutableAllocator::singleton().getJumpIslandTo(where, to); … … 2804 2804 } 2805 2805 2806 #if USE(JUMP_ISLANDS)2806 #if ENABLE(JUMP_ISLANDS) 2807 2807 static void* prepareForAtomicRelinkJumpConcurrently(void* from, void* to) 2808 2808 { … … 3054 3054 ASSERT(static_cast<int>(offset) == offset); 3055 3055 3056 #if USE(JUMP_ISLANDS)3056 #if ENABLE(JUMP_ISLANDS) 3057 3057 if (!isInt<26>(offset)) { 3058 3058 to = ExecutableAllocator::singleton().getJumpIslandTo(bitwise_cast<void*>(fromInstruction), to); -
trunk/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h
r268247 r270377 915 915 static CodeLocationLabel<destTag> prepareForAtomicRepatchNearCallConcurrently(CodeLocationNearCall<callTag> nearCall, CodeLocationLabel<destTag> destination) 916 916 { 917 #if USE(JUMP_ISLANDS)917 #if ENABLE(JUMP_ISLANDS) 918 918 switch (nearCall.callMode()) { 919 919 case NearCallMode::Tail: -
trunk/Source/JavaScriptCore/assembler/LinkBuffer.cpp
r269020 r270377 389 389 } 390 390 391 #if ENABLE(JIT) 391 392 if (useFastJITPermissions()) { 392 393 ASSERT(codeOutData == outData); … … 397 398 performJITMemcpy(codeOutData, outData, m_size); 398 399 } 400 #else 401 ASSERT(codeOutData != outData); 402 performJITMemcpy(codeOutData, outData, m_size); 403 #endif 399 404 400 405 jumpsToLink.clear(); -
trunk/Source/JavaScriptCore/jit/ExecutableAllocator.cpp
r269349 r270377 94 94 static constexpr size_t fixedExecutableMemoryPoolSize = 16 * MB; 95 95 #elif CPU(ARM64) 96 #if USE(JUMP_ISLANDS)96 #if ENABLE(JUMP_ISLANDS) 97 97 static constexpr size_t fixedExecutableMemoryPoolSize = 1 * GB; 98 98 // These sizes guarantee that any jump within an island can jump forwards or backwards … … 323 323 324 324 reservation.size = fixedExecutableMemoryPoolSize; 325 #if ! USE(JUMP_ISLANDS)325 #if !ENABLE(JUMP_ISLANDS) 326 326 // FIXME: Consider making jump islands work with Options::jitMemoryReservationSize 327 327 // https://bugs.webkit.org/show_bug.cgi?id=209037 … … 372 372 WTF_MAKE_FAST_ALLOCATED; 373 373 374 #if USE(JUMP_ISLANDS)374 #if ENABLE(JUMP_ISLANDS) 375 375 class Islands; 376 376 class RegionAllocator; … … 379 379 public: 380 380 FixedVMPoolExecutableAllocator() 381 #if USE(JUMP_ISLANDS)381 #if ENABLE(JUMP_ISLANDS) 382 382 : m_allocators(constructFixedSizeArrayWithArguments<RegionAllocator, numberOfRegions>(*this)) 383 383 #else … … 388 388 m_reservation = WTFMove(reservation.pageReservation); 389 389 if (m_reservation) { 390 #if USE(JUMP_ISLANDS)390 #if ENABLE(JUMP_ISLANDS) 391 391 uintptr_t start = bitwise_cast<uintptr_t>(memoryStart()); 392 392 uintptr_t reservationEnd = bitwise_cast<uintptr_t>(memoryEnd()); … … 428 428 RefPtr<ExecutableMemoryHandle> allocate(size_t sizeInBytes) 429 429 { 430 #if USE(JUMP_ISLANDS)430 #if ENABLE(JUMP_ISLANDS) 431 431 auto locker = holdLock(getLock()); 432 432 … … 447 447 #else 448 448 return m_allocator.allocate(sizeInBytes); 449 #endif // USE(JUMP_ISLANDS)449 #endif // ENABLE(JUMP_ISLANDS) 450 450 } 451 451 … … 480 480 bool isInAllocatedMemory(const AbstractLocker& locker, void* address) 481 481 { 482 #if USE(JUMP_ISLANDS)482 #if ENABLE(JUMP_ISLANDS) 483 483 if (RegionAllocator* allocator = findRegion(bitwise_cast<uintptr_t>(address))) 484 484 return allocator->isInAllocatedMemory(locker, address); … … 511 511 } 512 512 513 #if USE(JUMP_ISLANDS)513 #if ENABLE(JUMP_ISLANDS) 514 514 void handleWillBeReleased(const LockHolder& locker, MetaAllocatorHandle& handle) 515 515 { … … 645 645 return result; 646 646 } 647 #endif // USE(JUMP_ISLANDS)647 #endif // ENABLE(JUMP_ISLANDS) 648 648 649 649 private: … … 676 676 }; 677 677 678 #if USE(JUMP_ISLANDS)678 #if ENABLE(JUMP_ISLANDS) 679 679 class RegionAllocator final : public Allocator { 680 680 using Base = Allocator; … … 781 781 FastBitVector islandBits; 782 782 }; 783 #endif // USE(JUMP_ISLANDS)783 #endif // ENABLE(JUMP_ISLANDS) 784 784 785 785 template <typename Function> 786 786 void forEachAllocator(Function function) 787 787 { 788 #if USE(JUMP_ISLANDS)788 #if ENABLE(JUMP_ISLANDS) 789 789 for (RegionAllocator& allocator : m_allocators) { 790 790 using FunctionResultType = decltype(function(allocator)); … … 799 799 #else 800 800 function(m_allocator); 801 #endif // USE(JUMP_ISLANDS)802 } 803 804 #if USE(JUMP_ISLANDS)801 #endif // ENABLE(JUMP_ISLANDS) 802 } 803 804 #if ENABLE(JUMP_ISLANDS) 805 805 class Islands : public RedBlackTree<Islands, void*>::Node { 806 806 WTF_MAKE_FAST_ALLOCATED; … … 810 810 Vector<CodeLocationLabel<ExecutableMemoryPtrTag>> jumpIslands; 811 811 }; 812 #endif // USE(JUMP_ISLANDS)812 #endif // ENABLE(JUMP_ISLANDS) 813 813 814 814 Lock m_lock; 815 815 PageReservation m_reservation; 816 #if USE(JUMP_ISLANDS)816 #if ENABLE(JUMP_ISLANDS) 817 817 std::array<RegionAllocator, numberOfRegions> m_allocators; 818 818 RedBlackTree<Islands, void*> m_islandsForJumpSourceLocation; 819 819 #else 820 820 Allocator m_allocator; 821 #endif // USE(JUMP_ISLANDS)821 #endif // ENABLE(JUMP_ISLANDS) 822 822 }; 823 823 … … 951 951 #endif 952 952 953 #if USE(JUMP_ISLANDS)953 #if ENABLE(JUMP_ISLANDS) 954 954 void* ExecutableAllocator::getJumpIslandTo(void* from, void* newDestination) 955 955 { -
trunk/Source/JavaScriptCore/jit/ExecutableAllocator.h
r263380 r270377 179 179 Lock& getLock() const; 180 180 181 #if USE(JUMP_ISLANDS)181 #if ENABLE(JUMP_ISLANDS) 182 182 JS_EXPORT_PRIVATE void* getJumpIslandTo(void* from, void* newDestination); 183 183 JS_EXPORT_PRIVATE void* getJumpIslandToConcurrently(void* from, void* newDestination); -
trunk/Source/WTF/ChangeLog
r270321 r270377 1 2020-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 1 18 2020-12-01 Youenn Fablet <youenn@apple.com> 2 19 -
trunk/Source/WTF/wtf/PlatformEnable.h
r270120 r270377 595 595 #endif 596 596 597 #if !defined(ENABLE_JUMP_ISLANDS) && CPU(ARM64) && CPU(ADDRESS64) && ENABLE(JIT) 598 #define ENABLE_JUMP_ISLANDS 1 599 #endif 600 597 601 /* FIXME: This should be turned into an #error invariant */ 598 602 /* The FTL *does not* work on 32-bit platforms. Disable it even if someone asked us to enable it. */ -
trunk/Source/WTF/wtf/PlatformUse.h
r270067 r270377 314 314 #endif 315 315 316 #if CPU(ARM64) && CPU(ADDRESS64)317 #define USE_JUMP_ISLANDS 1318 #endif319 320 316 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) \ 321 317 || (PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
Note:
See TracChangeset
for help on using the changeset viewer.