Changeset 272135 in webkit
- Timestamp:
- Feb 1, 2021, 2:20:15 AM (6 years ago)
- Location:
- releases/WebKitGTK/webkit-2.30/Source
- Files:
-
- 8 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) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.30/Source/JavaScriptCore/ChangeLog
r272134 r272135 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 2021-01-19 Lauro Moura <lmoura@igalia.com> 2 21 -
releases/WebKitGTK/webkit-2.30/Source/JavaScriptCore/assembler/ARM64Assembler.h
r263380 r272135 2572 2572 ASSERT(static_cast<int>(offset) == offset); 2573 2573 2574 #if USE(JUMP_ISLANDS)2574 #if ENABLE(JUMP_ISLANDS) 2575 2575 if (!isInt<26>(offset)) { 2576 2576 to = ExecutableAllocator::singleton().getJumpIslandTo(where, to); … … 2770 2770 } 2771 2771 2772 #if USE(JUMP_ISLANDS)2772 #if ENABLE(JUMP_ISLANDS) 2773 2773 static void* prepareForAtomicRelinkJumpConcurrently(void* from, void* to) 2774 2774 { … … 3020 3020 ASSERT(static_cast<int>(offset) == offset); 3021 3021 3022 #if USE(JUMP_ISLANDS)3022 #if ENABLE(JUMP_ISLANDS) 3023 3023 if (!isInt<26>(offset)) { 3024 3024 to = ExecutableAllocator::singleton().getJumpIslandTo(bitwise_cast<void*>(fromInstruction), to); -
releases/WebKitGTK/webkit-2.30/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h
r263049 r272135 917 917 static CodeLocationLabel<destTag> prepareForAtomicRepatchNearCallConcurrently(CodeLocationNearCall<callTag> nearCall, CodeLocationLabel<destTag> destination) 918 918 { 919 #if USE(JUMP_ISLANDS)919 #if ENABLE(JUMP_ISLANDS) 920 920 switch (nearCall.callMode()) { 921 921 case NearCallMode::Tail: -
releases/WebKitGTK/webkit-2.30/Source/JavaScriptCore/assembler/LinkBuffer.cpp
r263380 r272135 375 375 } 376 376 377 #if ENABLE(JIT) 377 378 if (useFastJITPermissions()) { 378 379 ASSERT(codeOutData == outData); … … 383 384 performJITMemcpy(codeOutData, outData, m_size); 384 385 } 386 #else 387 ASSERT(codeOutData != outData); 388 performJITMemcpy(codeOutData, outData, m_size); 389 #endif 385 390 386 391 jumpsToLink.clear(); -
releases/WebKitGTK/webkit-2.30/Source/JavaScriptCore/jit/ExecutableAllocator.cpp
r263380 r272135 82 82 static constexpr size_t fixedExecutableMemoryPoolSize = 16 * MB; 83 83 #elif CPU(ARM64) 84 #if USE(JUMP_ISLANDS)84 #if ENABLE(JUMP_ISLANDS) 85 85 static constexpr size_t fixedExecutableMemoryPoolSize = 1 * GB; 86 86 // These sizes guarantee that any jump within an island can jump forwards or backwards … … 311 311 312 312 reservation.size = fixedExecutableMemoryPoolSize; 313 #if ! USE(JUMP_ISLANDS)313 #if !ENABLE(JUMP_ISLANDS) 314 314 // FIXME: Consider making jump islands work with Options::jitMemoryReservationSize 315 315 // https://bugs.webkit.org/show_bug.cgi?id=209037 … … 360 360 WTF_MAKE_FAST_ALLOCATED; 361 361 362 #if USE(JUMP_ISLANDS)362 #if ENABLE(JUMP_ISLANDS) 363 363 class Islands; 364 364 class RegionAllocator; … … 367 367 public: 368 368 FixedVMPoolExecutableAllocator() 369 #if USE(JUMP_ISLANDS)369 #if ENABLE(JUMP_ISLANDS) 370 370 : m_allocators(constructFixedSizeArrayWithArguments<RegionAllocator, numberOfRegions>(*this)) 371 371 #else … … 376 376 m_reservation = WTFMove(reservation.pageReservation); 377 377 if (m_reservation) { 378 #if USE(JUMP_ISLANDS)378 #if ENABLE(JUMP_ISLANDS) 379 379 uintptr_t start = bitwise_cast<uintptr_t>(memoryStart()); 380 380 uintptr_t reservationEnd = bitwise_cast<uintptr_t>(memoryEnd()); … … 416 416 RefPtr<ExecutableMemoryHandle> allocate(size_t sizeInBytes) 417 417 { 418 #if USE(JUMP_ISLANDS)418 #if ENABLE(JUMP_ISLANDS) 419 419 auto locker = holdLock(getLock()); 420 420 … … 435 435 #else 436 436 return m_allocator.allocate(sizeInBytes); 437 #endif // USE(JUMP_ISLANDS)437 #endif // ENABLE(JUMP_ISLANDS) 438 438 } 439 439 … … 468 468 bool isInAllocatedMemory(const AbstractLocker& locker, void* address) 469 469 { 470 #if USE(JUMP_ISLANDS)470 #if ENABLE(JUMP_ISLANDS) 471 471 if (RegionAllocator* allocator = findRegion(bitwise_cast<uintptr_t>(address))) 472 472 return allocator->isInAllocatedMemory(locker, address); … … 499 499 } 500 500 501 #if USE(JUMP_ISLANDS)501 #if ENABLE(JUMP_ISLANDS) 502 502 void handleWillBeReleased(const LockHolder& locker, MetaAllocatorHandle& handle) 503 503 { … … 633 633 return result; 634 634 } 635 #endif // USE(JUMP_ISLANDS)635 #endif // ENABLE(JUMP_ISLANDS) 636 636 637 637 private: … … 664 664 }; 665 665 666 #if USE(JUMP_ISLANDS)666 #if ENABLE(JUMP_ISLANDS) 667 667 class RegionAllocator final : public Allocator { 668 668 using Base = Allocator; … … 769 769 FastBitVector islandBits; 770 770 }; 771 #endif // USE(JUMP_ISLANDS)771 #endif // ENABLE(JUMP_ISLANDS) 772 772 773 773 template <typename Function> 774 774 void forEachAllocator(Function function) 775 775 { 776 #if USE(JUMP_ISLANDS)776 #if ENABLE(JUMP_ISLANDS) 777 777 for (RegionAllocator& allocator : m_allocators) { 778 778 using FunctionResultType = decltype(function(allocator)); … … 787 787 #else 788 788 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) 793 793 class Islands : public RedBlackTree<Islands, void*>::Node { 794 794 WTF_MAKE_FAST_ALLOCATED; … … 798 798 Vector<CodeLocationLabel<ExecutableMemoryPtrTag>> jumpIslands; 799 799 }; 800 #endif // USE(JUMP_ISLANDS)800 #endif // ENABLE(JUMP_ISLANDS) 801 801 802 802 Lock m_lock; 803 803 PageReservation m_reservation; 804 #if USE(JUMP_ISLANDS)804 #if ENABLE(JUMP_ISLANDS) 805 805 std::array<RegionAllocator, numberOfRegions> m_allocators; 806 806 RedBlackTree<Islands, void*> m_islandsForJumpSourceLocation; 807 807 #else 808 808 Allocator m_allocator; 809 #endif // USE(JUMP_ISLANDS)809 #endif // ENABLE(JUMP_ISLANDS) 810 810 }; 811 811 … … 939 939 #endif 940 940 941 #if USE(JUMP_ISLANDS)941 #if ENABLE(JUMP_ISLANDS) 942 942 void* ExecutableAllocator::getJumpIslandTo(void* from, void* newDestination) 943 943 { -
releases/WebKitGTK/webkit-2.30/Source/JavaScriptCore/jit/ExecutableAllocator.h
r263380 r272135 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); -
releases/WebKitGTK/webkit-2.30/Source/WTF/ChangeLog
r272132 r272135 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-07 Zan Dobersek <zdobersek@igalia.com> 2 19 -
releases/WebKitGTK/webkit-2.30/Source/WTF/wtf/PlatformEnable.h
r265228 r272135 600 600 #endif 601 601 602 #if !defined(ENABLE_JUMP_ISLANDS) && CPU(ARM64) && CPU(ADDRESS64) && ENABLE(JIT) 603 #define ENABLE_JUMP_ISLANDS 1 604 #endif 605 602 606 /* FIXME: This should be turned into an #error invariant */ 603 607 /* The FTL *does not* work on 32-bit platforms. Disable it even if someone asked us to enable it. */ … … 871 875 #error "ENABLE(WEBGL2) requires ENABLE(WEBGL)" 872 876 #endif 873 874 #if CPU(ARM64) && CPU(ADDRESS64)875 #define USE_JUMP_ISLANDS 1876 #endif
Note:
See TracChangeset
for help on using the changeset viewer.