Changeset 92974 in webkit
- Timestamp:
- Aug 12, 2011, 10:51:08 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r92911 r92974 1 2011-08-12 Sam Weinig <sam@webkit.org> 2 3 Move compiler specific macros to their own header 4 https://bugs.webkit.org/show_bug.cgi?id=66119 5 6 Reviewed by Anders Carlsson. 7 8 * JavaScriptCore.gypi: 9 * JavaScriptCore.vcproj/WTF/WTF.vcproj: 10 * JavaScriptCore.xcodeproj/project.pbxproj: 11 * wtf/CMakeLists.txt: 12 Add Compiler.h 13 14 * wtf/AlwaysInline.h: 15 Move the contents of this file (which no longer was just about ALWAYS_INLINE) to 16 Compiler.h. We can remove this file in a later commit. 17 18 * wtf/Compiler.h: Added. 19 Put all compiler specific checks and features in this file. 20 21 * wtf/Platform.h: 22 Move COMPILER macro and definitions (and the odd WARN_UNUSED_RETURN compiler feature) 23 to Compiler.h. Include Compiler.h since it is necessary. 24 1 25 2011-08-11 Filip Pizlo <fpizlo@apple.com> 2 26 -
trunk/Source/JavaScriptCore/JavaScriptCore.gypi
r92536 r92974 141 141 'wtf/BumpPointerAllocator.h', 142 142 'wtf/ByteArray.h', 143 'wtf/Compiler.h', 143 144 'wtf/Complex.h', 144 145 'wtf/CrossThreadRefCounted.h', -
trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
r92254 r92974 566 566 </File> 567 567 <File 568 RelativePath="..\..\wtf\Compiler.h" 569 > 570 </File> 571 <File 568 572 RelativePath="..\..\wtf\Complex.h" 569 573 > -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r92254 r92974 571 571 BC5F7BBF11823B590052C02C /* ThreadingPrimitives.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5F7BBC11823B590052C02C /* ThreadingPrimitives.h */; settings = {ATTRIBUTES = (Private, ); }; }; 572 572 BC5F7BC011823B590052C02C /* ThreadSafeRefCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5F7BBD11823B590052C02C /* ThreadSafeRefCounted.h */; settings = {ATTRIBUTES = (Private, ); }; }; 573 BC66BAE413F492CC00C23FAE /* Compiler.h in Headers */ = {isa = PBXBuildFile; fileRef = BC66BAE213F4928F00C23FAE /* Compiler.h */; settings = {ATTRIBUTES = (Private, ); }; }; 573 574 BC6AAAE50E1F426500AD87D8 /* ClassInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6AAAE40E1F426500AD87D8 /* ClassInfo.h */; settings = {ATTRIBUTES = (Private, ); }; }; 574 575 BC756FC90E2031B200DE7D12 /* JSGlobalObjectFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = BC756FC70E2031B200DE7D12 /* JSGlobalObjectFunctions.h */; }; … … 1212 1213 BC5F7BBC11823B590052C02C /* ThreadingPrimitives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadingPrimitives.h; sourceTree = "<group>"; }; 1213 1214 BC5F7BBD11823B590052C02C /* ThreadSafeRefCounted.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadSafeRefCounted.h; sourceTree = "<group>"; }; 1215 BC66BAE213F4928F00C23FAE /* Compiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Compiler.h; sourceTree = "<group>"; }; 1214 1216 BC6AAAE40E1F426500AD87D8 /* ClassInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClassInfo.h; sourceTree = "<group>"; }; 1215 1217 BC756FC60E2031B200DE7D12 /* JSGlobalObjectFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObjectFunctions.cpp; sourceTree = "<group>"; }; … … 1651 1653 isa = PBXGroup; 1652 1654 children = ( 1655 06D358A00DAAD9C4003B174E /* mac */, 1656 8656573E115BE35200291F40 /* text */, 1657 E195678D09E7CF1200B89D13 /* unicode */, 1653 1658 A1D764511354448B00C5C7C0 /* Alignment.h */, 1654 A7C40C07130B057D00D002A1 /* BlockStack.h */,1655 5135FAD512D26856003C083B /* Decoder.h */,1656 5135FAD612D26856003C083B /* Encoder.h */,1657 1659 93AA4F770957251F0084B3A7 /* AlwaysInline.h */, 1658 1660 938C4F690CA06BC700D9310A /* ASCIICType.h */, … … 1662 1664 E1A596370DE3E1C300C17E37 /* AVLTree.h */, 1663 1665 DD377CBB12072C18006A2517 /* Bitmap.h */, 1666 A7C40C07130B057D00D002A1 /* BlockStack.h */, 1667 E4D8CE9B12FC42E100BC9F5A /* BloomFilter.h */, 1664 1668 86676D4D11FED55D004B6863 /* BumpPointerAllocator.h */, 1665 1669 A7A1F7AA0F252B3C00E184E2 /* ByteArray.cpp */, 1666 1670 A7A1F7AB0F252B3C00E184E2 /* ByteArray.h */, 1671 BC66BAE213F4928F00C23FAE /* Compiler.h */, 1667 1672 FDA15C1612B03028003A583A /* Complex.h */, 1668 1673 0BDFFAD40FC6171000D69EF4 /* CrossThreadRefCounted.h */, … … 1675 1680 0F29479B126E698C00B3ABF5 /* DecimalNumber.cpp */, 1676 1681 862AF4B512239C7B0024E5B8 /* DecimalNumber.h */, 1682 5135FAD512D26856003C083B /* Decoder.h */, 1677 1683 5186111D0CC824830081412B /* Deque.h */, 1678 1684 938C4F6B0CA06BCE00D9310A /* DisallowCType.h */, … … 1682 1688 D75AF59512F8CB9500FC0ADF /* DynamicAnnotations.cpp */, 1683 1689 D75AF59612F8CB9500FC0ADF /* DynamicAnnotations.h */, 1690 5135FAD612D26856003C083B /* Encoder.h */, 1684 1691 E48E0F2C0F82151700A8CA37 /* FastAllocBase.h */, 1685 1692 65E217B908E7EECC0023E5F6 /* FastMalloc.cpp */, … … 1700 1707 148A1626095D16BB00666D0D /* ListRefPtr.h */, 1701 1708 E1EE79270D6C964500FEA3BA /* Locker.h */, 1702 06D358A00DAAD9C4003B174E /* mac */,1703 1709 06D358A20DAAD9C4003B174E /* MainThread.cpp */, 1704 1710 06D358A30DAAD9C4003B174E /* MainThread.h */, … … 1727 1733 14B3EF0312BC24DD00D29EFF /* PageBlock.h */, 1728 1734 8690231412092D5C00630AF9 /* PageReservation.h */, 1729 BCFBE695122560E800309E9D /* PassOwnArrayPtr.h */,1730 44DD48520FAEA85000D6B4EB /* PassOwnPtr.h */,1731 6580F795094070560082C219 /* PassRefPtr.h */,1732 651DCA02136A6FAB00F74194 /* PassTraits.h */,1733 1735 7934BB761361979300CB99A1 /* ParallelJobs.h */, 1734 1736 7934BB771361979300CB99A1 /* ParallelJobsGeneric.cpp */, … … 1736 1738 7934BB791361979300CB99A1 /* ParallelJobsLibdispatch.h */, 1737 1739 7934BB7A1361979300CB99A1 /* ParallelJobsOpenMP.h */, 1740 BCFBE695122560E800309E9D /* PassOwnArrayPtr.h */, 1741 44DD48520FAEA85000D6B4EB /* PassOwnPtr.h */, 1742 6580F795094070560082C219 /* PassRefPtr.h */, 1743 651DCA02136A6FAB00F74194 /* PassTraits.h */, 1738 1744 65D6D87E09B5A32E0002E4D7 /* Platform.h */, 1739 1745 A7D649A91015224E009B2E1B /* PossiblyNull.h */, 1740 E4D8CE9B12FC42E100BC9F5A /* BloomFilter.h */,1741 1746 088FA5B90EF76D4300578E6F /* RandomNumber.cpp */, 1742 1747 088FA5BA0EF76D4300578E6F /* RandomNumber.h */, … … 1749 1754 51F648D60BB4E2CA0033D760 /* RetainPtr.h */, 1750 1755 969A07290ED1CE6900F1F681 /* SegmentedVector.h */, 1756 A7C40C08130B057D00D002A1 /* SentinelLinkedList.h */, 1751 1757 76FB9F1012E851960051A2EB /* SHA1.cpp */, 1752 1758 76FB9F0E12E851860051A2EB /* SHA1.h */, 1753 A7C40C08130B057D00D002A1 /* SentinelLinkedList.h */,1754 1759 A7C40C09130B057D00D002A1 /* SinglyLinkedList.h */, 1755 1760 0BF28A2811A33DC300638F84 /* SizeLimits.cpp */, … … 1765 1770 6541BD7008E80A17002CBEE7 /* TCSystemAlloc.cpp */, 1766 1771 6541BD7108E80A17002CBEE7 /* TCSystemAlloc.h */, 1767 8656573E115BE35200291F40 /* text */,1768 1772 18BAB52710DADFCD000D945B /* ThreadIdentifierDataPthreads.cpp */, 1769 1773 18BAB52810DADFCD000D945B /* ThreadIdentifierDataPthreads.h */, … … 1772 1776 BC5F7BBC11823B590052C02C /* ThreadingPrimitives.h */, 1773 1777 E1EE793C0D6C9B9200FEA3BA /* ThreadingPthreads.cpp */, 1778 0BAC949E1338728400CF135B /* ThreadRestrictionVerifier.h */, 1774 1779 BC5F7BBD11823B590052C02C /* ThreadSafeRefCounted.h */, 1775 1780 E1B7C8BD0DA3A3360074B0DC /* ThreadSpecific.h */, 1776 0BAC949E1338728400CF135B /* ThreadRestrictionVerifier.h */,1777 1781 0B330C260F38C62300692DE3 /* TypeTraits.cpp */, 1778 1782 0B4D7E620F319AC800AD7E58 /* TypeTraits.h */, 1779 E195678D09E7CF1200B89D13 /* unicode */,1780 1783 935AF46B09E9D9DB00ACD1D8 /* UnusedParam.h */, 1781 1784 E17FF770112131D200076A19 /* ValueCheck.h */, … … 2580 2583 866739D213BFDE710023D87C /* BigInteger.h in Headers */, 2581 2584 866739D313BFDE710023D87C /* Uint16WithFraction.h in Headers */, 2585 BC66BAE413F492CC00C23FAE /* Compiler.h in Headers */, 2582 2586 ); 2583 2587 runOnlyForDeploymentPostprocessing = 0; -
trunk/Source/JavaScriptCore/wtf/AlwaysInline.h
r75447 r92974 19 19 */ 20 20 21 /* This file is no longer necessary, since all the functionality has been moved to Compiler.h. */ 22 21 23 #include "Platform.h" 22 23 #ifndef ALWAYS_INLINE24 #if COMPILER(GCC) && defined(NDEBUG) && !COMPILER(MINGW)25 #define ALWAYS_INLINE inline __attribute__((__always_inline__))26 #elif (COMPILER(MSVC) || COMPILER(RVCT)) && defined(NDEBUG)27 #define ALWAYS_INLINE __forceinline28 #else29 #define ALWAYS_INLINE inline30 #endif31 #endif32 33 #ifndef NEVER_INLINE34 #if COMPILER(GCC)35 #define NEVER_INLINE __attribute__((__noinline__))36 #elif COMPILER(RVCT)37 #define NEVER_INLINE __declspec(noinline)38 #else39 #define NEVER_INLINE40 #endif41 #endif42 43 #ifndef UNLIKELY44 #if COMPILER(GCC) || (RVCT_VERSION_AT_LEAST(3, 0, 0, 0) && defined(__GNUC__))45 #define UNLIKELY(x) __builtin_expect((x), 0)46 #else47 #define UNLIKELY(x) (x)48 #endif49 #endif50 51 #ifndef LIKELY52 #if COMPILER(GCC) || (RVCT_VERSION_AT_LEAST(3, 0, 0, 0) && defined(__GNUC__))53 #define LIKELY(x) __builtin_expect((x), 1)54 #else55 #define LIKELY(x) (x)56 #endif57 #endif58 59 #ifndef NO_RETURN60 #if COMPILER(GCC)61 #define NO_RETURN __attribute((__noreturn__))62 #elif COMPILER(MSVC) || COMPILER(RVCT)63 #define NO_RETURN __declspec(noreturn)64 #else65 #define NO_RETURN66 #endif67 #endif68 69 #ifndef NO_RETURN_WITH_VALUE70 #if !COMPILER(MSVC)71 #define NO_RETURN_WITH_VALUE NO_RETURN72 #else73 #define NO_RETURN_WITH_VALUE74 #endif75 #endif -
trunk/Source/JavaScriptCore/wtf/CMakeLists.txt
r92254 r92974 9 9 BumpPointerAllocator.h 10 10 ByteArray.h 11 Compiler.h 11 12 Complex.h 12 13 CrossThreadRefCounted.h -
trunk/Source/JavaScriptCore/wtf/Platform.h
r92224 r92974 29 29 #define WTF_Platform_h 30 30 31 /* Include compiler specific macros */ 32 #include "Compiler.h" 33 31 34 /* ==== PLATFORM handles OS, operating environment, graphics API, and 32 35 CPU. This macro will be phased out in favor of platform adaptation … … 37 40 /* ==== Platform adaptation macros: these describe properties of the target environment. ==== */ 38 41 39 /* COMPILER() - the compiler being used to build the project */40 #define COMPILER(WTF_FEATURE) (defined WTF_COMPILER_##WTF_FEATURE && WTF_COMPILER_##WTF_FEATURE)41 42 /* CPU() - the target CPU architecture */ 42 43 #define CPU(WTF_FEATURE) (defined WTF_CPU_##WTF_FEATURE && WTF_CPU_##WTF_FEATURE) … … 56 57 57 58 58 59 /* ==== COMPILER() - the compiler being used to build the project ==== */60 61 /* COMPILER(MSVC) Microsoft Visual C++ */62 /* COMPILER(MSVC7_OR_LOWER) Microsoft Visual C++ 2003 or lower*/63 /* COMPILER(MSVC9_OR_LOWER) Microsoft Visual C++ 2008 or lower*/64 #if defined(_MSC_VER)65 #define WTF_COMPILER_MSVC 166 #if _MSC_VER < 140067 #define WTF_COMPILER_MSVC7_OR_LOWER 168 #elif _MSC_VER < 160069 #define WTF_COMPILER_MSVC9_OR_LOWER 170 #endif71 #endif72 73 /* COMPILER(RVCT) - ARM RealView Compilation Tools */74 /* COMPILER(RVCT4_OR_GREATER) - ARM RealView Compilation Tools 4.0 or greater */75 #if defined(__CC_ARM) || defined(__ARMCC__)76 #define WTF_COMPILER_RVCT 177 #define RVCT_VERSION_AT_LEAST(major, minor, patch, build) (__ARMCC_VERSION >= (major * 100000 + minor * 10000 + patch * 1000 + build))78 #else79 /* Define this for !RVCT compilers, just so we can write things like RVCT_VERSION_AT_LEAST(3, 0, 0, 0). */80 #define RVCT_VERSION_AT_LEAST(major, minor, patch, build) 081 #endif82 83 /* COMPILER(GCCE) - GNU Compiler Collection for Embedded */84 #if defined(__GCCE__)85 #define WTF_COMPILER_GCCE 186 #define GCCE_VERSION (__GCCE__ * 10000 + __GCCE_MINOR__ * 100 + __GCCE_PATCHLEVEL__)87 #define GCCE_VERSION_AT_LEAST(major, minor, patch) (GCCE_VERSION >= (major * 10000 + minor * 100 + patch))88 #endif89 90 /* COMPILER(GCC) - GNU Compiler Collection */91 /* --gnu option of the RVCT compiler also defines __GNUC__ */92 #if defined(__GNUC__) && !COMPILER(RVCT)93 #define WTF_COMPILER_GCC 194 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)95 #define GCC_VERSION_AT_LEAST(major, minor, patch) (GCC_VERSION >= (major * 10000 + minor * 100 + patch))96 #else97 /* Define this for !GCC compilers, just so we can write things like GCC_VERSION_AT_LEAST(4, 1, 0). */98 #define GCC_VERSION_AT_LEAST(major, minor, patch) 099 #endif100 101 /* COMPILER(MINGW) - MinGW GCC */102 /* COMPILER(MINGW64) - mingw-w64 GCC - only used as additional check to exclude mingw.org specific functions */103 #if defined(__MINGW32__)104 #define WTF_COMPILER_MINGW 1105 #include <_mingw.h> /* private MinGW header */106 #if defined(__MINGW64_VERSION_MAJOR) /* best way to check for mingw-w64 vs mingw.org */107 #define WTF_COMPILER_MINGW64 1108 #endif /* __MINGW64_VERSION_MAJOR */109 #endif /* __MINGW32__ */110 111 /* COMPILER(WINSCW) - CodeWarrior for Symbian emulator */112 #if defined(__WINSCW__)113 #define WTF_COMPILER_WINSCW 1114 /* cross-compiling, it is not really windows */115 #undef WIN32116 #undef _WIN32117 #endif118 119 /* COMPILER(INTEL) - Intel C++ Compiler */120 #if defined(__INTEL_COMPILER)121 #define WTF_COMPILER_INTEL 1122 #endif123 124 /* COMPILER(SUNCC) */125 #if defined(__SUNPRO_CC) || defined(__SUNPRO_C)126 #define WTF_COMPILER_SUNCC 1127 #endif128 59 129 60 /* ==== CPU() - the target CPU architecture ==== */ … … 1162 1093 #endif 1163 1094 1164 #if COMPILER(GCC)1165 #define WARN_UNUSED_RETURN __attribute__ ((warn_unused_result))1166 #else1167 #define WARN_UNUSED_RETURN1168 #endif1169 1170 1095 #if !ENABLE(NETSCAPE_PLUGIN_API) || (ENABLE(NETSCAPE_PLUGIN_API) && ((OS(UNIX) && (PLATFORM(QT) || PLATFORM(WX))) || PLATFORM(GTK))) 1171 1096 #define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1 -
trunk/Source/JavaScriptGlue/ChangeLog
r92706 r92974 1 2011-08-12 Sam Weinig <sam@webkit.org> 2 3 Move compiler specific macros to their own header 4 https://bugs.webkit.org/show_bug.cgi?id=66119 5 6 Reviewed by Anders Carlsson. 7 8 * ForwardingHeaders/wtf/Compiler.h: Added. 9 1 10 2011-08-09 Mark Hahnenberg <mhahnenberg@apple.com> 2 11 -
trunk/Source/WebCore/ChangeLog
r92973 r92974 1 2011-08-12 Sam Weinig <sam@webkit.org> 2 3 Move compiler specific macros to their own header 4 https://bugs.webkit.org/show_bug.cgi?id=66119 5 6 Reviewed by Anders Carlsson. 7 8 * ForwardingHeaders/wtf/Compiler.h: Added. 9 1 10 2011-08-12 No'am Rosenthal <noam.rosenthal@nokia.com> 2 11 -
trunk/Tools/ChangeLog
r92972 r92974 1 2011-08-12 Sam Weinig <sam@webkit.org> 2 3 Move compiler specific macros to their own header 4 https://bugs.webkit.org/show_bug.cgi?id=66119 5 6 Reviewed by Anders Carlsson. 7 8 * DumpRenderTree/ForwardingHeaders/wtf/Compiler.h: Added. 9 1 10 2011-08-11 Dimitri Glazkov <dglazkov@chromium.org> 2 11
Note:
See TracChangeset
for help on using the changeset viewer.