<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[162707] trunk/Source/WTF</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/162707">162707</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2014-01-24 10:20:06 -0800 (Fri, 24 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Simplify Compiler.h
https://bugs.webkit.org/show_bug.cgi?id=127491

Patch by Darin Adler &lt;darin@apple.com&gt; on 2014-01-24
Reviewed by Anders Carlsson.

* wtf/Assertions.h: Remove COMPILER_SUPPORTS(CXX_STATIC_ASSERT), since
we now have that for all compilers that can build WebKit.

* wtf/Compiler.h: Removed always true feature flags, including:
COMPILER_SUPPORTS(CXX_VARIADIC_TEMPLATES), COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES),
COMPILER_SUPPORTS(CXX_DELETED_FUNCTIONS), COMPILER_SUPPORTS(CXX_NULLPTR),
COMPILER_SUPPORTS(CXX_EXPLICIT_CONVERSIONS), COMPILER_SUPPORTS(CXX_STATIC_ASSERT),
COMPILER_SUPPORTS(CXX_OVERRIDE_CONTROL), COMPILER_SUPPORTS(CXX_STRONG_ENUMS), and
COMPILER_SUPPORTS(CXX_AUTO_TYPE). Sorted sections alphabetically. Separated out
nested #if and #else into separate checks for greater readability. Removed obsolete
check for COMPILER(RVCT). Removed unused COMPILER(GCCE) detection.

* wtf/RefPtr.h: Remove COMPILER_SUPPORTS(CXX_NULLPTR), since we now have
that for all compilers that can build WebKit.
* wtf/RetainPtr.h: Ditto.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfAssertionsh">trunk/Source/WTF/wtf/Assertions.h</a></li>
<li><a href="#trunkSourceWTFwtfCompilerh">trunk/Source/WTF/wtf/Compiler.h</a></li>
<li><a href="#trunkSourceWTFwtfRefPtrh">trunk/Source/WTF/wtf/RefPtr.h</a></li>
<li><a href="#trunkSourceWTFwtfRetainPtrh">trunk/Source/WTF/wtf/RetainPtr.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (162706 => 162707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2014-01-24 18:09:18 UTC (rev 162706)
+++ trunk/Source/WTF/ChangeLog        2014-01-24 18:20:06 UTC (rev 162707)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2014-01-24  Darin Adler  &lt;darin@apple.com&gt;
+
+        Simplify Compiler.h
+        https://bugs.webkit.org/show_bug.cgi?id=127491
+
+        Reviewed by Anders Carlsson.
+
+        * wtf/Assertions.h: Remove COMPILER_SUPPORTS(CXX_STATIC_ASSERT), since
+        we now have that for all compilers that can build WebKit.
+
+        * wtf/Compiler.h: Removed always true feature flags, including:
+        COMPILER_SUPPORTS(CXX_VARIADIC_TEMPLATES), COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES),
+        COMPILER_SUPPORTS(CXX_DELETED_FUNCTIONS), COMPILER_SUPPORTS(CXX_NULLPTR),
+        COMPILER_SUPPORTS(CXX_EXPLICIT_CONVERSIONS), COMPILER_SUPPORTS(CXX_STATIC_ASSERT),
+        COMPILER_SUPPORTS(CXX_OVERRIDE_CONTROL), COMPILER_SUPPORTS(CXX_STRONG_ENUMS), and
+        COMPILER_SUPPORTS(CXX_AUTO_TYPE). Sorted sections alphabetically. Separated out
+        nested #if and #else into separate checks for greater readability. Removed obsolete
+        check for COMPILER(RVCT). Removed unused COMPILER(GCCE) detection.
+
+        * wtf/RefPtr.h: Remove COMPILER_SUPPORTS(CXX_NULLPTR), since we now have
+        that for all compilers that can build WebKit.
+        * wtf/RetainPtr.h: Ditto.
+
</ins><span class="cx"> 2014-01-23  Max Vujovic  &lt;mvujovic@adobe.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove CSS Custom Filters code and tests
</span></span></pre></div>
<a id="trunkSourceWTFwtfAssertionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/Assertions.h (162706 => 162707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/Assertions.h        2014-01-24 18:09:18 UTC (rev 162706)
+++ trunk/Source/WTF/wtf/Assertions.h        2014-01-24 18:20:06 UTC (rev 162707)
</span><span class="lines">@@ -322,10 +322,8 @@
</span><span class="cx"> #if COMPILER_SUPPORTS(C_STATIC_ASSERT)
</span><span class="cx"> /* Unlike static_assert below, this also works in plain C code. */
</span><span class="cx"> #define COMPILE_ASSERT(exp, name) _Static_assert((exp), #name)
</span><del>-#elif COMPILER_SUPPORTS(CXX_STATIC_ASSERT)
-#define COMPILE_ASSERT(exp, name) static_assert((exp), #name)
</del><span class="cx"> #else
</span><del>-#define COMPILE_ASSERT(exp, name) typedef int dummy##name [(exp) ? 1 : -1]
</del><ins>+#define COMPILE_ASSERT(exp, name) static_assert((exp), #name)
</ins><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWTFwtfCompilerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/Compiler.h (162706 => 162707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/Compiler.h        2014-01-24 18:09:18 UTC (rev 162706)
+++ trunk/Source/WTF/wtf/Compiler.h        2014-01-24 18:20:06 UTC (rev 162707)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2011, 2012, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -35,263 +35,225 @@
</span><span class="cx"> /* COMPILER_QUIRK() - whether the compiler being used to build the project requires a given quirk. */
</span><span class="cx"> #define COMPILER_QUIRK(WTF_COMPILER_QUIRK) (defined WTF_COMPILER_QUIRK_##WTF_COMPILER_QUIRK  &amp;&amp; WTF_COMPILER_QUIRK_##WTF_COMPILER_QUIRK)
</span><span class="cx"> 
</span><del>-/* ==== COMPILER() - the compiler being used to build the project ==== */
</del><ins>+/* ==== COMPILER() - primary detection of the compiler being used to build the project, in alphabetical order ==== */
</ins><span class="cx"> 
</span><span class="cx"> /* COMPILER(CLANG) - Clang  */
</span><ins>+
</ins><span class="cx"> #if defined(__clang__)
</span><span class="cx"> #define WTF_COMPILER_CLANG 1
</span><del>-
-/* Specific compiler features */
-#define WTF_COMPILER_SUPPORTS_CXX_VARIADIC_TEMPLATES __has_feature(cxx_variadic_templates)
-#define WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES __has_feature(cxx_rvalue_references)
-#define WTF_COMPILER_SUPPORTS_CXX_DELETED_FUNCTIONS __has_feature(cxx_deleted_functions)
-#define WTF_COMPILER_SUPPORTS_CXX_NULLPTR __has_feature(cxx_nullptr)
-#define WTF_COMPILER_SUPPORTS_CXX_EXPLICIT_CONVERSIONS __has_feature(cxx_explicit_conversions)
</del><span class="cx"> #define WTF_COMPILER_SUPPORTS_BLOCKS __has_feature(blocks)
</span><span class="cx"> #define WTF_COMPILER_SUPPORTS_C_STATIC_ASSERT __has_feature(c_static_assert)
</span><del>-#define WTF_COMPILER_SUPPORTS_CXX_STATIC_ASSERT __has_feature(cxx_static_assert)
-#define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL __has_feature(cxx_override_control)
-#define WTF_COMPILER_SUPPORTS_CXX_STRONG_ENUMS __has_feature(cxx_strong_enums)
</del><span class="cx"> #define WTF_COMPILER_SUPPORTS_CXX_REFERENCE_QUALIFIED_FUNCTIONS __has_feature(cxx_reference_qualified_functions)
</span><del>-#define WTF_COMPILER_SUPPORTS_CXX_AUTO_TYPE __has_feature(cxx_auto_type)
</del><span class="cx"> #define WTF_COMPILER_SUPPORTS_CXX_GENERALIZED_INITIALIZERS __has_feature(cxx_generalized_initializers)
</span><del>-
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-/* COMPILER(MSVC) - Microsoft Visual C++ */
-#if defined(_MSC_VER)
-#if _MSC_VER &lt; 1800
-#error &quot;Please use a newer version of Visual Studio. WebKit requires VS2013 or newer to compile.&quot;
-#endif
-#define WTF_COMPILER_MSVC 1
</del><ins>+/* COMPILER(GCC) - GNU Compiler Collection */
</ins><span class="cx"> 
</span><del>-/* Specific compiler features */
-#define WTF_COMPILER_SUPPORTS_CXX_NULLPTR 1
-#define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL 1
-#define WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES 1
-#define WTF_COMPILER_SUPPORTS_CXX_STATIC_ASSERT 1
-#define WTF_COMPILER_SUPPORTS_CXX_AUTO_TYPE 1
-#define WTF_COMPILER_SUPPORTS_CXX_STRONG_ENUMS 1
-#define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL 1
-#define WTF_COMPILER_SUPPORTS_CXX_DELETED_FUNCTIONS 1
-#define WTF_COMPILER_SUPPORTS_CXX_EXPLICIT_CONVERSIONS 1
-#define WTF_COMPILER_SUPPORTS_CXX_GENERALIZED_INITIALIZERS 1
-#define WTF_COMPILER_SUPPORTS_CXX_VARIADIC_TEMPLATES 1
</del><ins>+/* Note: This section must come after the Clang section since we check !COMPILER(CLANG) here. */
</ins><span class="cx"> 
</span><del>-#endif /* defined(_MSC_VER) */
-
-/* COMPILER(GCCE) - GNU Compiler Collection for Embedded */
-#if defined(__GCCE__)
-#define WTF_COMPILER_GCCE 1
-#define GCCE_VERSION (__GCCE__ * 10000 + __GCCE_MINOR__ * 100 + __GCCE_PATCHLEVEL__)
-#define GCCE_VERSION_AT_LEAST(major, minor, patch) (GCCE_VERSION &gt;= (major * 10000 + minor * 100 + patch))
-#endif
-
-/* COMPILER(GCC) - GNU Compiler Collection */
</del><span class="cx"> #if defined(__GNUC__)
</span><span class="cx"> #define WTF_COMPILER_GCC 1
</span><span class="cx"> #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
</span><span class="cx"> #define GCC_VERSION_AT_LEAST(major, minor, patch) (GCC_VERSION &gt;= (major * 10000 + minor * 100 + patch))
</span><del>-#else
-/* Define this for !GCC compilers, just so we can write things like GCC_VERSION_AT_LEAST(4, 1, 0). */
</del><ins>+#endif
+
+/* Define GCC_VERSION_AT_LEAST for all compilers, so we can write things like GCC_VERSION_AT_LEAST(4, 1, 0). */
+/* FIXME: Doesn't seem all that valuable. Can we remove this? */
+#if !defined(GCC_VERSION_AT_LEAST)
</ins><span class="cx"> #define GCC_VERSION_AT_LEAST(major, minor, patch) 0
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-/* Specific compiler features */
-#if COMPILER(GCC) &amp;&amp; !COMPILER(CLANG)
-#if !GCC_VERSION_AT_LEAST(4, 7, 0)
</del><ins>+#if COMPILER(GCC) &amp;&amp; !COMPILER(CLANG) &amp;&amp; !GCC_VERSION_AT_LEAST(4, 7, 0)
</ins><span class="cx"> #error &quot;Please use a newer version of GCC. WebKit requires GCC 4.7.0 or newer to compile.&quot;
</span><span class="cx"> #endif
</span><del>-#if GCC_VERSION_AT_LEAST(4, 8, 0)
-#pragma GCC diagnostic ignored &quot;-Wmaybe-uninitialized&quot;
-#endif
-#if defined(__STDC_VERSION__) &amp;&amp; __STDC_VERSION__ &gt;= 201112L
-/* C11 support */
</del><ins>+
+#if COMPILER(GCC) &amp;&amp; !COMPILER(CLANG) &amp;&amp; defined(__STDC_VERSION__) &amp;&amp; __STDC_VERSION__ &gt;= 201112L
</ins><span class="cx"> #define WTF_COMPILER_SUPPORTS_C_STATIC_ASSERT 1
</span><span class="cx"> #endif
</span><del>-#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(__cplusplus) &amp;&amp; __cplusplus &gt;= 201103L)
-/* C++11 support */
-#define WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES 1
-#define WTF_COMPILER_SUPPORTS_CXX_STATIC_ASSERT 1
-#define WTF_COMPILER_SUPPORTS_CXX_VARIADIC_TEMPLATES 1
-#define WTF_COMPILER_SUPPORTS_CXX_AUTO_TYPE 1
-#define WTF_COMPILER_SUPPORTS_CXX_DELETED_FUNCTIONS 1
-#define WTF_COMPILER_SUPPORTS_CXX_EXPLICIT_CONVERSIONS 1
-#define WTF_COMPILER_SUPPORTS_CXX_NULLPTR 1
-/* Strong enums should work from gcc 4.4, but doesn't seem to support some operators */
-#define WTF_COMPILER_SUPPORTS_CXX_STRONG_ENUMS 1
</del><ins>+
+#if COMPILER(GCC) &amp;&amp; !COMPILER(CLANG) &amp;&amp; GCC_VERSION_AT_LEAST(4, 8, 0)
+#pragma GCC diagnostic ignored &quot;-Wmaybe-uninitialized&quot;
+#endif
+
+#if COMPILER(GCC) &amp;&amp; !COMPILER(CLANG) &amp;&amp; (defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(__cplusplus) &amp;&amp; __cplusplus &gt;= 201103L))
</ins><span class="cx"> #pragma GCC diagnostic ignored &quot;-Wunused-local-typedefs&quot;
</span><del>-#define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL 1
-#endif /* defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(__cplusplus) &amp;&amp; __cplusplus &gt;= 201103L) */
-#endif /* COMPILER(GCC) */
</del><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> /* COMPILER(MINGW) - MinGW GCC */
</span><del>-/* COMPILER(MINGW64) - mingw-w64 GCC - only used as additional check to exclude mingw.org specific functions */
</del><ins>+
</ins><span class="cx"> #if defined(__MINGW32__)
</span><span class="cx"> #define WTF_COMPILER_MINGW 1
</span><del>-#include &lt;_mingw.h&gt; /* private MinGW header */
-    #if defined(__MINGW64_VERSION_MAJOR) /* best way to check for mingw-w64 vs mingw.org */
-        #define WTF_COMPILER_MINGW64 1
-    #endif /* __MINGW64_VERSION_MAJOR */
-#endif /* __MINGW32__ */
-
-/* COMPILER(SUNCC) */
-#if defined(__SUNPRO_CC) || defined(__SUNPRO_C)
-#define WTF_COMPILER_SUNCC 1
</del><ins>+#include &lt;_mingw.h&gt;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-/* ABI */
-#if defined(__ARM_EABI__) || defined(__EABI__)
-#define WTF_COMPILER_SUPPORTS_EABI 1
-#endif
</del><ins>+/* COMPILER(MINGW64) - mingw-w64 GCC - used as additional check to exclude mingw.org specific functions */
</ins><span class="cx"> 
</span><del>-/* ==== Compiler features ==== */
</del><ins>+/* Note: This section must come after the MinGW section since we check COMPILER(MINGW) here. */
</ins><span class="cx"> 
</span><del>-/* Required C++11 features. We can remove these once they've been required for some time */
-
-#ifdef __cplusplus
-#if !COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
-#error &quot;Please use a compiler that supports C++11 rvalue references.&quot;
</del><ins>+#if COMPILER(MINGW) &amp;&amp; defined(__MINGW64_VERSION_MAJOR) /* best way to check for mingw-w64 vs mingw.org */
+#define WTF_COMPILER_MINGW64 1
</ins><span class="cx"> #endif
</span><del>-#if !COMPILER_SUPPORTS(CXX_STATIC_ASSERT)
-#error &quot;Please use a compiler that supports C++11 static_assert.&quot;
-#endif
-#if !COMPILER_SUPPORTS(CXX_AUTO_TYPE)
-#error &quot;Please use a compiler that supports C++11 auto.&quot;
-#endif
-#if !COMPILER_SUPPORTS(CXX_VARIADIC_TEMPLATES)
-#error &quot;Please use a compiler that supports C++11 variadic templates.&quot;
-#endif
-#endif
</del><span class="cx"> 
</span><del>-/* PURE_FUNCTION */
</del><ins>+/* COMPILER(MSVC) - Microsoft Visual C++ */
</ins><span class="cx"> 
</span><del>-#if COMPILER(GCC)
-#define PURE_FUNCTION __attribute__ ((__pure__))
-#else
-#define PURE_FUNCTION
</del><ins>+#if defined(_MSC_VER)
+#define WTF_COMPILER_MSVC 1
+#define WTF_COMPILER_SUPPORTS_CXX_GENERALIZED_INITIALIZERS 1
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-/* ALWAYS_INLINE */
</del><ins>+#if defined(_MSC_VER) &amp;&amp; _MSC_VER &lt; 1800
+#error &quot;Please use a newer version of Visual Studio. WebKit requires VS2013 or newer to compile.&quot;
+#endif
</ins><span class="cx"> 
</span><del>-#ifndef ALWAYS_INLINE
-#if COMPILER(GCC) &amp;&amp; defined(NDEBUG) &amp;&amp; !COMPILER(MINGW)
-#define ALWAYS_INLINE inline __attribute__((__always_inline__))
-#elif COMPILER(MSVC) &amp;&amp; defined(NDEBUG)
-#define ALWAYS_INLINE __forceinline
-#else
-#define ALWAYS_INLINE inline
</del><ins>+/* COMPILER(SUNCC) */
+
+#if defined(__SUNPRO_CC) || defined(__SUNPRO_C)
+#define WTF_COMPILER_SUNCC 1
</ins><span class="cx"> #endif
</span><del>-#endif
</del><span class="cx"> 
</span><ins>+/* ==== COMPILER_SUPPORTS - additional compiler feature detection, in alphabetical order ==== */
</ins><span class="cx"> 
</span><del>-/* NEVER_INLINE */
</del><ins>+/* COMPILER_SUPPORTS(EABI) */
</ins><span class="cx"> 
</span><del>-#ifndef NEVER_INLINE
-#if COMPILER(GCC)
-#define NEVER_INLINE __attribute__((__noinline__))
-#elif COMPILER(MSVC) || COMPILER(RVCT)
-#define NEVER_INLINE __declspec(noinline)
-#else
-#define NEVER_INLINE
</del><ins>+#if defined(__ARM_EABI__) || defined(__EABI__)
+#define WTF_COMPILER_SUPPORTS_EABI 1
</ins><span class="cx"> #endif
</span><del>-#endif
</del><span class="cx"> 
</span><ins>+/* ==== Compiler-independent macros for various compiler features ==== */
</ins><span class="cx"> 
</span><del>-/* UNLIKELY */
</del><ins>+/* ALWAYS_INLINE */
</ins><span class="cx"> 
</span><del>-#ifndef UNLIKELY
-#if COMPILER(GCC)
-#define UNLIKELY(x) __builtin_expect(!!(x), 0)
-#else
-#define UNLIKELY(x) (x)
</del><ins>+#if !defined(ALWAYS_INLINE) &amp;&amp; COMPILER(GCC) &amp;&amp; defined(NDEBUG) &amp;&amp; !COMPILER(MINGW)
+#define ALWAYS_INLINE inline __attribute__((__always_inline__))
</ins><span class="cx"> #endif
</span><ins>+
+#if !defined(ALWAYS_INLINE) &amp;&amp; COMPILER(MSVC) &amp;&amp; defined(NDEBUG)
+#define ALWAYS_INLINE __forceinline
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if !defined(ALWAYS_INLINE)
+#define ALWAYS_INLINE inline
+#endif
</ins><span class="cx"> 
</span><span class="cx"> /* LIKELY */
</span><span class="cx"> 
</span><del>-#ifndef LIKELY
-#if COMPILER(GCC)
</del><ins>+#if !defined(LIKELY) &amp;&amp; COMPILER(GCC)
</ins><span class="cx"> #define LIKELY(x) __builtin_expect(!!(x), 1)
</span><del>-#else
</del><ins>+#endif
+
+#if !defined(LIKELY)
</ins><span class="cx"> #define LIKELY(x) (x)
</span><span class="cx"> #endif
</span><ins>+
+/* NEVER_INLINE */
+
+#if !defined(NEVER_INLINE) &amp;&amp; COMPILER(GCC)
+#define NEVER_INLINE __attribute__((__noinline__))
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if !defined(NEVER_INLINE) &amp;&amp; COMPILER(MSVC)
+#define NEVER_INLINE __declspec(noinline)
+#endif
</ins><span class="cx"> 
</span><ins>+#if !defined(NEVER_INLINE)
+#define NEVER_INLINE
+#endif
+
</ins><span class="cx"> /* NO_RETURN */
</span><span class="cx"> 
</span><del>-
-#ifndef NO_RETURN
-#if COMPILER(GCC)
</del><ins>+#if !defined(NO_RETURN) &amp;&amp; COMPILER(GCC)
</ins><span class="cx"> #define NO_RETURN __attribute((__noreturn__))
</span><del>-#elif COMPILER(MSVC)
</del><ins>+#endif
+
+#if !defined(NO_RETURN) &amp;&amp; COMPILER(MSVC)
</ins><span class="cx"> #define NO_RETURN __declspec(noreturn)
</span><del>-#else
</del><ins>+#endif
+
+#if !defined(NO_RETURN)
</ins><span class="cx"> #define NO_RETURN
</span><span class="cx"> #endif
</span><del>-#endif
</del><span class="cx"> 
</span><del>-
</del><span class="cx"> /* NO_RETURN_WITH_VALUE */
</span><span class="cx"> 
</span><del>-#ifndef NO_RETURN_WITH_VALUE
-#if !COMPILER(MSVC)
</del><ins>+#if !defined(NO_RETURN_WITH_VALUE) &amp;&amp; !COMPILER(MSVC)
</ins><span class="cx"> #define NO_RETURN_WITH_VALUE NO_RETURN
</span><del>-#else
</del><ins>+#endif
+
+#if !defined(NO_RETURN_WITH_VALUE)
</ins><span class="cx"> #define NO_RETURN_WITH_VALUE
</span><span class="cx"> #endif
</span><ins>+
+/* OBJC_CLASS */
+
+#if !defined(OBJC_CLASS) &amp;&amp; defined(__OBJC__)
+#define OBJC_CLASS @class
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if !defined(OBJC_CLASS)
+#define OBJC_CLASS class
+#endif
</ins><span class="cx"> 
</span><del>-/* WARN_UNUSED_RETURN */
</del><ins>+/* PURE_FUNCTION */
</ins><span class="cx"> 
</span><del>-#if COMPILER(GCC)
-#define WARN_UNUSED_RETURN __attribute__ ((warn_unused_result))
-#else
-#define WARN_UNUSED_RETURN
</del><ins>+#if !defined(PURE_FUNCTION) &amp;&amp; COMPILER(GCC)
+#define PURE_FUNCTION __attribute__((__pure__))
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if !defined(PURE_FUNCTION)
+#define PURE_FUNCTION
+#endif
</ins><span class="cx"> 
</span><span class="cx"> /* REFERENCED_FROM_ASM */
</span><span class="cx"> 
</span><del>-#ifndef REFERENCED_FROM_ASM
-#if COMPILER(GCC)
-#define REFERENCED_FROM_ASM __attribute__((used))
-#else
</del><ins>+#if !defined(REFERENCED_FROM_ASM) &amp;&amp; COMPILER(GCC)
+#define REFERENCED_FROM_ASM __attribute__((__used__))
+#endif
+
+#if !defined(REFERENCED_FROM_ASM)
</ins><span class="cx"> #define REFERENCED_FROM_ASM
</span><span class="cx"> #endif
</span><ins>+
+/* UNLIKELY */
+
+#if !defined(UNLIKELY) &amp;&amp; COMPILER(GCC)
+#define UNLIKELY(x) __builtin_expect(!!(x), 0)
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-/* OBJC_CLASS */
</del><ins>+#if !defined(UNLIKELY)
+#define UNLIKELY(x) (x)
+#endif
</ins><span class="cx"> 
</span><del>-#ifndef OBJC_CLASS
-#ifdef __OBJC__
-#define OBJC_CLASS @class
-#else
-#define OBJC_CLASS class
</del><ins>+/* UNUSED_LABEL */
+
+/* Keep the compiler from complaining for a local label that is defined but not referenced. */
+/* Helpful when mixing hand-written and autogenerated code. */
+
+#if !defined(UNUSED_LABEL) &amp;&amp; COMPILER(MSVC)
+#define UNUSED_LABEL(label) if (false) goto label
</ins><span class="cx"> #endif
</span><ins>+
+#if !defined(UNUSED_LABEL)
+#define UNUSED_LABEL(label) UNUSED_PARAM(&amp;&amp; label)
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> /* UNUSED_PARAM */
</span><span class="cx"> 
</span><del>-#if COMPILER(MSVC)
</del><ins>+#if !defined(UNUSED_PARAM) &amp;&amp; COMPILER(MSVC)
</ins><span class="cx"> #define UNUSED_PARAM(variable) (void)&amp;variable
</span><del>-#else
</del><ins>+#endif
+
+#if !defined(UNUSED_PARAM)
</ins><span class="cx"> #define UNUSED_PARAM(variable) (void)variable
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-/* UNUSED_LABEL */
</del><ins>+/* WARN_UNUSED_RETURN */
</ins><span class="cx"> 
</span><del>-/* This is to keep the compiler from complaining when for local labels are
- declared but not referenced. For example, this can happen with code that
- works with auto-generated code.
- */
-#if COMPILER(MSVC)
-#define UNUSED_LABEL(label) if (false) goto label
-#else
-#define UNUSED_LABEL(label) UNUSED_PARAM(&amp;&amp; label)
</del><ins>+#if !defined(WARN_UNUSED_RETURN) &amp;&amp; COMPILER(GCC)
+#define WARN_UNUSED_RETURN __attribute__((__warn_unused_result__))
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if !defined(WARN_UNUSED_RETURN)
+#define WARN_UNUSED_RETURN
+#endif
+
</ins><span class="cx"> #endif /* WTF_Compiler_h */
</span></span></pre></div>
<a id="trunkSourceWTFwtfRefPtrh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/RefPtr.h (162706 => 162707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/RefPtr.h        2014-01-24 18:09:18 UTC (rev 162706)
+++ trunk/Source/WTF/wtf/RefPtr.h        2014-01-24 18:20:06 UTC (rev 162707)
</span><span class="lines">@@ -72,9 +72,6 @@
</span><span class="cx">         RefPtr&amp; operator=(const RefPtr&amp;);
</span><span class="cx">         RefPtr&amp; operator=(T*);
</span><span class="cx">         RefPtr&amp; operator=(const PassRefPtr&lt;T&gt;&amp;);
</span><del>-#if !COMPILER_SUPPORTS(CXX_NULLPTR)
-        RefPtr&amp; operator=(std::nullptr_t) { clear(); return *this; }
-#endif
</del><span class="cx">         template&lt;typename U&gt; RefPtr&amp; operator=(const RefPtr&lt;U&gt;&amp;);
</span><span class="cx">         template&lt;typename U&gt; RefPtr&amp; operator=(const PassRefPtr&lt;U&gt;&amp;);
</span><span class="cx">         RefPtr&amp; operator=(RefPtr&amp;&amp;);
</span></span></pre></div>
<a id="trunkSourceWTFwtfRetainPtrh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/RetainPtr.h (162706 => 162707)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/RetainPtr.h        2014-01-24 18:09:18 UTC (rev 162706)
+++ trunk/Source/WTF/wtf/RetainPtr.h        2014-01-24 18:20:06 UTC (rev 162707)
</span><span class="lines">@@ -136,10 +136,6 @@
</span><span class="cx">         RetainPtr&amp; operator=(RetainPtr&amp;&amp;);
</span><span class="cx">         template&lt;typename U&gt; RetainPtr&amp; operator=(RetainPtr&lt;U&gt;&amp;&amp;);
</span><span class="cx"> 
</span><del>-#if !COMPILER_SUPPORTS(CXX_NULLPTR)
-        RetainPtr&amp; operator=(std::nullptr_t) { clear(); return *this; }
-#endif
-
</del><span class="cx">         void swap(RetainPtr&amp;);
</span><span class="cx"> 
</span><span class="cx">     private:
</span></span></pre>
</div>
</div>

</body>
</html>