Changeset 100037 in webkit
- Timestamp:
- Nov 11, 2011 3:43:00 PM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r100031 r100037 1 2011-11-11 Gavin Barraclough <barraclough@apple.com> 2 3 Update iOS port's configuration setting, particularly in Platform.h 4 https://bugs.webkit.org/show_bug.cgi?id=72187 5 6 Reviewed by David Kilzer. 7 8 * interpreter/Interpreter.h: 9 - Lower the reentry depth. 10 * runtime/DatePrototype.cpp: 11 - iOS also uses CF. 12 * wtf/FastMalloc.cpp: 13 (WTF::TCMalloc_PageHeap::IncrementalScavenge): 14 - Update fastmalloc configuration for iOS. 15 * wtf/OSAllocatorPosix.cpp: 16 (WTF::OSAllocator::reserveAndCommit): 17 - Added flag. 18 * wtf/Platform.h: 19 - Update platform configuration for iOS. 20 1 21 2011-11-11 David Kilzer <ddkilzer@apple.com> 2 22 -
trunk/Source/JavaScriptCore/interpreter/Interpreter.h
r96146 r100037 81 81 }; 82 82 83 #if PLATFORM(IOS) 84 // We use a smaller reentrancy limit on iPhone because of the high amount of 85 // stack space required on the web thread. 86 enum { MaxLargeThreadReentryDepth = 93, MaxSmallThreadReentryDepth = 32 }; 87 #else 83 88 enum { MaxLargeThreadReentryDepth = 256, MaxSmallThreadReentryDepth = 32 }; 89 #endif // PLATFORM(IOS) 84 90 85 91 class Interpreter { -
trunk/Source/JavaScriptCore/runtime/DatePrototype.cpp
r100006 r100037 61 61 #endif 62 62 63 #if PLATFORM(MAC) 63 #if PLATFORM(MAC) || PLATFORM(IOS) 64 64 #include <CoreFoundation/CoreFoundation.h> 65 65 #endif … … 129 129 enum LocaleDateTimeFormat { LocaleDateAndTime, LocaleDate, LocaleTime }; 130 130 131 #if PLATFORM(MAC) 131 #if PLATFORM(MAC) || PLATFORM(IOS) 132 132 133 133 // FIXME: Since this is superior to the strftime-based version, why limit this to PLATFORM(MAC)? … … 196 196 } 197 197 198 #else // !PLATFORM(MAC) 198 #else // !PLATFORM(MAC) && !PLATFORM(IOS) 199 199 200 200 static JSCell* formatLocaleDate(ExecState* exec, const GregorianDateTime& gdt, LocaleDateTimeFormat format) … … 283 283 } 284 284 285 #endif // !PLATFORM(MAC) 285 #endif // !PLATFORM(MAC) && !PLATFORM(IOS) 286 286 287 287 // Converts a list of arguments sent to a Date member function into milliseconds, updating -
trunk/Source/JavaScriptCore/wtf/FastMalloc.cpp
r95934 r100037 101 101 102 102 // Use a background thread to periodically scavenge memory to release back to the system 103 #if PLATFORM(IOS) 104 #define USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY 0 105 #else 103 106 #define USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY 1 107 #endif 104 108 105 109 #ifndef NDEBUG … … 639 643 // Lower and upper bounds on the per-thread cache sizes 640 644 static const size_t kMinThreadCacheSize = kMaxSize * 2; 645 #if PLATFORM(IOS) 646 static const size_t kMaxThreadCacheSize = 512 * 1024; 647 #else 641 648 static const size_t kMaxThreadCacheSize = 2 << 20; 649 #endif 642 650 643 651 // Default bound on the total amount of thread caches … … 1941 1949 if (scavenge_counter_ >= 0) return; // Not yet time to scavenge 1942 1950 1951 #if PLATFORM(IOS) 1952 static const size_t kDefaultReleaseDelay = 64; 1953 #else 1943 1954 // If there is nothing to release, wait for so many pages before 1944 1955 // scavenging again. With 4K pages, this comes to 16MB of memory. 1945 1956 static const size_t kDefaultReleaseDelay = 1 << 8; 1957 #endif 1946 1958 1947 1959 // Find index of free list to scavenge … … 1959 1971 DLL_Prepend(&slist->returned, s); 1960 1972 1973 #if PLATFORM(IOS) 1974 scavenge_counter_ = std::max<size_t>(16UL, std::min<size_t>(kDefaultReleaseDelay, kDefaultReleaseDelay - (free_pages_ / kDefaultReleaseDelay))); 1975 #else 1961 1976 scavenge_counter_ = std::max<size_t>(64UL, std::min<size_t>(kDefaultReleaseDelay, kDefaultReleaseDelay - (free_pages_ / kDefaultReleaseDelay))); 1977 #endif 1962 1978 1963 1979 if (index == kMaxPages && !DLL_IsEmpty(&slist->normal)) … … 4648 4664 &FastMallocZone::log, &FastMallocZone::forceLock, &FastMallocZone::forceUnlock, &FastMallocZone::statistics 4649 4665 4650 #if ndef BUILDING_ON_LEOPARD4666 #if !defined(BUILDING_ON_LEOPARD) || OS(IOS) 4651 4667 , 0 // zone_locked will not be called on the zone unless it advertises itself as version five or higher. 4652 4668 #endif 4653 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 4669 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) || OS(IOS) 4654 4670 , 0, 0, 0, 0 // These members will not be used unless the zone advertises itself as version seven or higher. 4655 4671 #endif -
trunk/Source/JavaScriptCore/wtf/OSAllocatorPosix.cpp
r95901 r100037 55 55 56 56 int flags = MAP_PRIVATE | MAP_ANON; 57 #if defined MAP_JIT 58 if (executable) 59 flags |= MAP_JIT; 60 #endif 57 61 58 62 #if OS(LINUX) -
trunk/Source/JavaScriptCore/wtf/Platform.h
r100031 r100037 548 548 #endif 549 549 550 #if PLATFORM(IOS) 551 #define DONT_FINALIZE_ON_MAIN_THREAD 1 552 #endif 553 550 554 #if PLATFORM(QT) && OS(DARWIN) 551 555 #define WTF_USE_CF 1 … … 563 567 #define ENABLE_GEOLOCATION 1 564 568 #define ENABLE_ICONDATABASE 0 565 #define ENABLE_INSPECTOR 0569 #define ENABLE_INSPECTOR 1 566 570 #define ENABLE_JAVA_BRIDGE 0 567 571 #define ENABLE_NETSCAPE_PLUGIN_API 0 568 572 #define ENABLE_ORIENTATION_EVENTS 1 569 573 #define ENABLE_REPAINT_THROTTLING 1 574 #define ENABLE_WEB_ARCHIVE 1 575 #define HAVE_NETWORK_CFDATA_ARRAY_CALLBACK 1 576 #define HAVE_PTHREAD_RWLOCK 1 570 577 #define HAVE_READLINE 1 578 #define HAVE_RUNLOOP_TIMER 0 571 579 #define WTF_USE_CF 1 580 #define WTF_USE_CFNETWORK 1 572 581 #define WTF_USE_PTHREADS 1 573 #define HAVE_PTHREAD_RWLOCK 1 574 #define ENABLE_WEB_ARCHIVE 1 582 583 #if PLATFORM(IOS_SIMULATOR) 584 #define ENABLE_INTERPRETER 1 585 #define ENABLE_JIT 0 586 #define ENABLE_YARR 0 587 #define ENABLE_YARR_JIT 0 588 #else 589 #define ENABLE_INTERPRETER 1 590 #define ENABLE_JIT 1 591 #define ENABLE_YARR 1 592 #define ENABLE_YARR_JIT 1 593 #endif 594 575 595 #endif 576 596 … … 584 604 #endif 585 605 586 #if USE(CFNETWORK) || PLATFORM(MAC) 606 #if USE(CFNETWORK) || PLATFORM(MAC) || PLATFORM(IOS) 587 607 #define WTF_USE_CFURLCACHE 1 588 608 #define WTF_USE_CFURLSTORAGESESSIONS 1 … … 675 695 #if PLATFORM(IOS) 676 696 #define HAVE_MADV_FREE 1 697 #define HAVE_PTHREAD_SETNAME_NP 1 677 698 #endif 678 699 … … 968 989 #define ENABLE_ASSEMBLER 1 969 990 #endif 970 /* Setting this flag prevents the assembler from using RWX memory; this may improve971 security but currectly comes at a significant performance cost. */972 #if PLATFORM(IOS)973 #define ENABLE_ASSEMBLER_WX_EXCLUSIVE 1974 #endif975 991 976 992 /* Pick which allocator to use; we only need an executable allocator if the assembler is compiled in. 977 993 On x86-64 we use a single fixed mmap, on other platforms we mmap on demand. */ 978 994 #if ENABLE(ASSEMBLER) 979 #if CPU(X86_64) 995 #if CPU(X86_64) || PLATFORM(IOS) 980 996 #define ENABLE_EXECUTABLE_ALLOCATOR_FIXED 1 981 997 #else … … 1041 1057 1042 1058 /* FIXME: Eventually we should enable this for all platforms and get rid of the define. */ 1043 #if PLATFORM( MAC) || PLATFORM(WIN) || PLATFORM(QT)1059 #if PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(QT) 1044 1060 #define WTF_USE_PLATFORM_STRATEGIES 1 1045 1061 #endif
Note: See TracChangeset
for help on using the changeset viewer.