Changeset 160671 in webkit
- Timestamp:
- Dec 16, 2013, 4:06:20 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 18 edited
-
JavaScriptCore/API/tests/testapi.c (modified) (1 diff)
-
JavaScriptCore/ChangeLog (modified) (1 diff)
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/wtf/Assertions.h (modified) (1 diff)
-
WTF/wtf/Compiler.h (modified) (4 diffs)
-
WTF/wtf/HashFunctions.h (modified) (2 diffs)
-
WTF/wtf/MathExtras.h (modified) (2 diffs)
-
WTF/wtf/Platform.h (modified) (1 diff)
-
WTF/wtf/StdLibExtras.h (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/WebCorePrefix.h (modified) (1 diff)
-
WebCore/loader/FTPDirectoryParser.cpp (modified) (2 diffs)
-
WebCore/page/DOMWindow.cpp (modified) (1 diff)
-
WebCore/page/DOMWindow.h (modified) (1 diff)
-
WebCore/platform/text/TextEncodingRegistry.cpp (modified) (1 diff)
-
WebCore/testing/Internals.cpp (modified) (1 diff)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/tests/testapi.c
r160494 r160671 44 44 #endif 45 45 46 #if COMPILER(MSVC)47 48 #if _MSC_VER < 180049 #include <wtf/MathExtras.h>50 51 static double nan(const char*)52 {53 return std::numeric_limits<double>::quiet_NaN();54 }55 56 using std::isinf;57 using std::isnan;58 #endif59 60 #endif61 62 46 #if JSC_OBJC_API_ENABLED 63 47 void testObjectiveCAPI(void); -
trunk/Source/JavaScriptCore/ChangeLog
r160670 r160671 1 2013-12-16 Brent Fulgham <bfulgham@apple.com> 2 3 [Win] Remove dead code after conversion to VS2013 4 https://bugs.webkit.org/show_bug.cgi?id=125795 5 6 Reviewed by Darin Adler. 7 8 * API/tests/testapi.c: Remove local nan implementation 9 1 10 2013-12-16 Oliver Hunt <oliver@apple.com> 2 11 -
trunk/Source/WTF/ChangeLog
r160655 r160671 1 2013-12-16 Brent Fulgham <bfulgham@apple.com> 2 3 [Win] Remove dead code after conversion to VS2013 4 https://bugs.webkit.org/show_bug.cgi?id=125795 5 6 Reviewed by Darin Adler. 7 8 * wtf/Assertions.h: Include <inttypes.h> now that it exists. 9 * wtf/Compiler.h: Update compiler checks for VS2013, and 10 enable support for NEVER_INLINE 11 * wtf/HashFunctions.h: 12 (WTF::PtrHash::hash): Remove compiler workaround. 13 * wtf/MathExtras.h: Remove C99 functions that are now supplied 14 by the MS runtime library. 15 * wtf/Platform.h: Remove old MSVC support flags. 16 * wtf/StdLibExtras.h: Remove old MSVC workaround code. 17 1 18 2013-12-16 Alex Christensen <achristensen@webkit.org> 2 19 -
trunk/Source/WTF/wtf/Assertions.h
r160648 r160671 37 37 */ 38 38 39 #include <wtf/Platform.h> 40 39 #include <inttypes.h> 41 40 #include <stdarg.h> 42 41 #include <stddef.h> 43 44 #if !COMPILER(MSVC) 45 #include <inttypes.h> 46 #endif 42 #include <wtf/Platform.h> 47 43 48 44 #ifdef NDEBUG -
trunk/Source/WTF/wtf/Compiler.h
r160648 r160671 66 66 67 67 /* COMPILER(MSVC) - Microsoft Visual C++ */ 68 /* COMPILER(MSVC9_OR_LOWER) - Microsoft Visual C++ 2008 or lower*/69 68 #if defined(_MSC_VER) 69 #if _MSC_VER < 1800 70 #error "Please use a newer version of Visual Studio. WebKit requires VS2013 or newere to compile." 71 #endif 70 72 #define WTF_COMPILER_MSVC 1 71 #if _MSC_VER < 160072 #define WTF_COMPILER_MSVC9_OR_LOWER 173 #endif74 73 75 74 /* Specific compiler features */ 76 #if !COMPILER(CLANG) && _MSC_VER >= 160075 #if !COMPILER(CLANG) 77 76 #define WTF_COMPILER_SUPPORTS_CXX_NULLPTR 1 78 77 #endif … … 80 79 #if !COMPILER(CLANG) 81 80 #define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL 1 82 #if !defined(_MSC_VER) || _MSC_VER < 1800 83 #define WTF_COMPILER_QUIRK_FINAL_IS_CALLED_SEALED 1 84 #endif 85 #endif 86 87 /* Check for VS2010 or newer */ 88 #if _MSC_VER >= 1600 81 #endif 82 89 83 #define WTF_COMPILER_SUPPORTS_CXX_RVALUE_REFERENCES 1 90 84 #define WTF_COMPILER_SUPPORTS_CXX_STATIC_ASSERT 1 91 85 #define WTF_COMPILER_SUPPORTS_CXX_AUTO_TYPE 1 92 #endif93 94 #if _MSC_VER >= 170095 86 #define WTF_COMPILER_SUPPORTS_CXX_STRONG_ENUMS 1 96 87 #define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL 1 97 #endif98 99 #if _MSC_VER >= 1800100 88 #define WTF_COMPILER_SUPPORTS_CXX_DELETED_FUNCTIONS 1 101 89 #define WTF_COMPILER_SUPPORTS_CXX_EXPLICIT_CONVERSIONS 1 102 90 #define WTF_COMPILER_SUPPORTS_CXX_GENERALIZED_INITIALIZERS 1 103 91 #define WTF_COMPILER_SUPPORTS_CXX_VARIADIC_TEMPLATES 1 104 #endif105 92 106 93 #endif /* defined(_MSC_VER) */ … … 224 211 #if COMPILER(GCC) 225 212 #define NEVER_INLINE __attribute__((__noinline__)) 213 #elif COMPILER(MSVC) || COMPILER(RVCT) 214 #define NEVER_INLINE __declspec(noinline) 226 215 #else 227 216 #define NEVER_INLINE … … 350 339 #endif 351 340 352 353 354 341 #endif /* WTF_Compiler_h */ -
trunk/Source/WTF/wtf/HashFunctions.h
r157653 r160671 123 123 static unsigned hash(T key) 124 124 { 125 #if COMPILER(MSVC)126 #pragma warning(push)127 #pragma warning(disable: 4244) // work around what seems to be a bug in MSVC's conversion warnings128 #endif129 125 return IntHash<uintptr_t>::hash(reinterpret_cast<uintptr_t>(key)); 130 #if COMPILER(MSVC)131 #pragma warning(pop)132 #endif133 126 } 134 127 static bool equal(T a, T b) { return a == b; } … … 178 171 template<> struct DefaultHash<unsigned long long> { typedef IntHash<unsigned long long> Hash; }; 179 172 180 #if !COMPILER(MSVC) ||defined(_NATIVE_WCHAR_T_DEFINED)173 #if defined(_NATIVE_WCHAR_T_DEFINED) 181 174 template<> struct DefaultHash<wchar_t> { typedef IntHash<wchar_t> Hash; }; 182 175 #endif -
trunk/Source/WTF/wtf/MathExtras.h
r160254 r160671 122 122 #endif 123 123 124 #if COMPILER(MSVC)125 126 #if _MSC_VER < 1800127 // We must not do 'num + 0.5' or 'num - 0.5' because they can cause precision loss.128 static double round(double num)129 {130 double integer = ceil(num);131 if (num > 0)132 return integer - num > 0.5 ? integer - 1.0 : integer;133 return integer - num >= 0.5 ? integer - 1.0 : integer;134 }135 static float roundf(float num)136 {137 float integer = ceilf(num);138 if (num > 0)139 return integer - num > 0.5f ? integer - 1.0f : integer;140 return integer - num >= 0.5f ? integer - 1.0f : integer;141 }142 143 inline long long llround(double num) { return static_cast<long long>(round(num)); }144 inline long long llroundf(float num) { return static_cast<long long>(roundf(num)); }145 inline long lround(double num) { return static_cast<long>(round(num)); }146 inline long lroundf(float num) { return static_cast<long>(roundf(num)); }147 inline double trunc(double num) { return num > 0 ? floor(num) : ceil(num); }148 149 inline double remainder(double numerator, double denominator)150 {151 double result = fmod(numerator, denominator);152 if (result > 0.5 * denominator)153 return result - denominator;154 155 return result;156 }157 158 inline double asinh(double d)159 {160 return log(d + sqrt(d * d + 1.0));161 }162 163 inline double acosh(double d)164 {165 return log(d + sqrt(d + 1) * sqrt(d - 1));166 }167 168 inline double atanh(double d)169 {170 return (log((1.0 + d) / (1.0 - d))) / 2.0;171 }172 173 inline double expm1(double d)174 {175 return exp(d) - 1.0;176 }177 178 inline double log1p(double d)179 {180 return log(1.0 + d);181 }182 183 inline double cbrt(double d)184 {185 return pow(d, 1.0 / 3.0);186 }187 188 #endif189 190 #endif191 192 124 #if COMPILER(GCC) && OS(QNX) 193 125 // The stdlib on QNX doesn't contain long abs(long). See PR #104666. … … 196 128 197 129 #if COMPILER(MSVC) 198 // MSVC's math.h does not currently supply log2 or log2f.199 inline double log2(double num)200 {201 // This constant is roughly M_LN2, which is not provided by default on Windows.202 return log(num) / 0.693147180559945309417232121458176568;203 }204 205 inline float log2f(float num)206 {207 // This constant is roughly M_LN2, which is not provided by default on Windows.208 return logf(num) / 0.693147180559945309417232121458176568f;209 }210 #endif211 212 #if COMPILER(MSVC)213 // The 64bit version of abs() is already defined in stdlib.h which comes with VC10214 #if COMPILER(MSVC9_OR_LOWER)215 inline long long abs(long long num) { return _abs64(num); }216 #endif217 218 #if _MSC_VER < 1800219 220 namespace std {221 222 inline bool isinf(double num) { return !_finite(num) && !_isnan(num); }223 inline bool isnan(double num) { return !!_isnan(num); }224 inline bool isfinite(double x) { return _finite(x); }225 inline bool signbit(double num) { return _copysign(1.0, num) < 0; }226 227 } // namespace std228 229 #endif230 231 inline double nextafter(double x, double y) { return _nextafter(x, y); }232 inline float nextafterf(float x, float y) { return x > y ? x - FLT_EPSILON : x + FLT_EPSILON; }233 234 inline double copysign(double x, double y) { return _copysign(x, y); }235 130 236 131 // Work around a bug in Win, where atan2(+-infinity, +-infinity) yields NaN instead of specific values. -
trunk/Source/WTF/wtf/Platform.h
r160648 r160671 936 936 to WTF causes many ports to break, and so this way we can address the build 937 937 breakages one port at a time. */ 938 #if !defined(WTF_USE_EXPORT_MACROS) && (PLATFORM(MAC) || (PLATFORM(WIN) && (defined(_MSC_VER) && _MSC_VER >= 1600)))938 #if !defined(WTF_USE_EXPORT_MACROS) && (PLATFORM(MAC) || PLATFORM(WIN)) 939 939 #define WTF_USE_EXPORT_MACROS 1 940 940 #endif -
trunk/Source/WTF/wtf/StdLibExtras.h
r160561 r160671 311 311 } 312 312 313 #if ( defined(_MSC_VER) && _MSC_VER < 1700) || (COMPILER(GCC) && !COMPILER(CLANG) && !GCC_VERSION_AT_LEAST(4, 8, 1))313 #if (COMPILER(GCC) && !COMPILER(CLANG) && !GCC_VERSION_AT_LEAST(4, 8, 1)) 314 314 315 315 // Work-around for Pre-C++11 syntax in MSVC 2010, and prior as well as GCC < 4.8.1. -
trunk/Source/WebCore/ChangeLog
r160669 r160671 1 2013-12-16 Brent Fulgham <bfulgham@apple.com> 2 3 [Win] Remove dead code after converstion to VS2013 4 https://bugs.webkit.org/show_bug.cgi?id=125795 5 6 Reviewed by Darin Adler. 7 8 * WebCorePrefix.h: Remove VS2012 include kludge. 9 * loader/FTPDirectoryParser.cpp: Remove gmtime workaround code. 10 * page/DOMWindow.cpp: Remove older pointer-based open implementation. 11 * page/DOMWindow.h: Ditto 12 * platform/text/TextEncodingRegistry.cpp: 13 (WebCore::TextEncodingNameHash::equal): Remove optimization bug workaround 14 * testing/Internals.cpp: 15 (WebCore::Internals::openDummyInspectorFrontend): Remove compiler workaround 16 1 17 2013-12-16 Daniel Bates <dabates@apple.com> 2 18 -
trunk/Source/WebCore/WebCorePrefix.h
r156302 r160671 131 131 #if USE(CG) 132 132 133 #if defined(_MSC_VER) && _MSC_VER <= 1600134 135 #include <WebCore/WebCoreHeaderDetection.h>136 137 #if HAVE(AVCF_LEGIBLE_OUTPUT)138 // These must be defined before including CGFloat.h139 // This can be removed once we move to VS2012 or newer140 #include <wtf/ExportMacros.h>141 #include <wtf/MathExtras.h>142 143 #define isnan _isnan144 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090145 #include <CoreGraphics/CGFloat.h>146 #endif147 #include <CoreGraphics/CoreGraphics.h>148 #undef isnan149 #endif150 #endif151 152 133 // FIXME <rdar://problem/8208868> Remove support for obsolete ColorSync API, CoreServices header in CoreGraphics 153 134 // We can remove this once the new ColorSync APIs are available in an internal Safari SDK. -
trunk/Source/WebCore/loader/FTPDirectoryParser.cpp
r160581 r160671 1 1 /* 2 2 * Copyright (C) 2002 Cyrus Patel <cyp@fb14.uni-mainz.de> 3 * (C) 2007 Apple Inc. All rights reserved.3 * (C) 2007, 2013 Apple Inc. All rights reserved. 4 4 * 5 5 * This library is free software; you can redistribute it and/or … … 37 37 namespace WebCore { 38 38 #if OS(WINDOWS) && !defined(gmtime_r) 39 #if defined(_MSC_VER) && (_MSC_VER >= 1400)40 39 #define gmtime_r(x, y) gmtime_s((y), (x)) 41 #else /* !_MSC_VER */42 #define gmtime_r(x,y) (gmtime(x)?(*(y)=*gmtime(x),(y)):0)43 #endif44 40 #endif 45 41 -
trunk/Source/WebCore/page/DOMWindow.cpp
r157971 r160671 1901 1901 } 1902 1902 1903 #if defined(_MSC_VER) && _MSC_VER <= 17001904 // Work around a compiler bug in Visual Studio:1905 PassRefPtr<DOMWindow> DOMWindow::open(const String& urlString, const AtomicString& frameName, const String& windowFeaturesString,1906 DOMWindow* activeWindow, DOMWindow* firstWindow)1907 {1908 return open(urlString, frameName, windowFeaturesString, *activeWindow, *firstWindow);1909 }1910 #endif1911 1912 1903 PassRefPtr<DOMWindow> DOMWindow::open(const String& urlString, const AtomicString& frameName, const String& windowFeaturesString, 1913 1904 DOMWindow& activeWindow, DOMWindow& firstWindow) -
trunk/Source/WebCore/page/DOMWindow.h
r159284 r160671 161 161 PassRefPtr<DOMWindow> open(const String& urlString, const AtomicString& frameName, const String& windowFeaturesString, 162 162 DOMWindow& activeWindow, DOMWindow& firstWindow); 163 #if defined(_MSC_VER) && _MSC_VER <= 1700164 PassRefPtr<DOMWindow> open(const String& urlString, const AtomicString& frameName, const String& windowFeaturesString,165 DOMWindow* activeWindow, DOMWindow* firstWindow);166 #endif167 163 168 164 typedef void (*PrepareDialogFunction)(DOMWindow*, void* context); -
trunk/Source/WebCore/platform/text/TextEncodingRegistry.cpp
r152456 r160671 66 66 char c2; 67 67 do { 68 #if defined(_MSC_VER) && _MSC_VER == 170069 // Workaround for a bug in the VS2012 Update1 and Update2 optimizer, remove once the fix is released.70 // https://connect.microsoft.com/VisualStudio/feedback/details/781189/vs2012-update-ctp4-c-optimizing-bug71 c1 = toASCIILower(*s1++);72 c2 = toASCIILower(*s2++);73 if (c1 != c2)74 return false;75 #else76 68 c1 = *s1++; 77 69 c2 = *s2++; 78 70 if (toASCIILower(c1) != toASCIILower(c2)) 79 71 return false; 80 #endif81 72 } while (c1 && c2); 82 73 return !c1 && !c2; -
trunk/Source/WebCore/testing/Internals.cpp
r160457 r160671 1538 1538 ASSERT(window); 1539 1539 1540 #if defined(_MSC_VER) && _MSC_VER <= 17001541 m_frontendWindow = window->open(url, "", "", window, window); // Work around bug in VS2010 and earlier1542 #else1543 1540 m_frontendWindow = window->open(url, "", "", *window, *window); 1544 #endif1545 1541 ASSERT(m_frontendWindow); 1546 1542 -
trunk/Source/WebKit/ChangeLog
r160655 r160671 1 2013-12-16 Brent Fulgham <bfulgham@apple.com> 2 3 [Win] Remove dead code after conversion to VS2013 4 https://bugs.webkit.org/show_bug.cgi?id=125795 5 6 Reviewed by Darin Adler. 7 8 * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: 9 Remove unused function exports. 10 1 11 2013-12-16 Alex Christensen <achristensen@webkit.org> 2 12 -
trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in
r160463 r160671 348 348 symbolWithPointer(?close@DOMWindow@WebCore@@QAEXPAVScriptExecutionContext@2@@Z, ?close@DOMWindow@WebCore@@QEAAXPEAVScriptExecutionContext@2@@Z) 349 349 symbolWithPointer(?document@DOMWindow@WebCore@@QBEPAVDocument@2@XZ, ?document@DOMWindow@WebCore@@QEBAPEAVDocument@2@XZ) 350 #if _MSC_VER < 1800351 symbolWithPointer(?open@DOMWindow@WebCore@@QAE?AV?$PassRefPtr@VDOMWindow@WebCore@@@WTF@@ABVString@4@ABVAtomicString@4@0PAV12@2@Z, ?open@DOMWindow@WebCore@@QEAA?AV?$PassRefPtr@VDOMWindow@WebCore@@@WTF@@AEBVString@4@AEBVAtomicString@4@0PEAV12@2@Z)352 #else353 350 symbolWithPointer(?open@DOMWindow@WebCore@@QAE?AV?$PassRefPtr@VDOMWindow@WebCore@@@WTF@@ABVString@4@ABVAtomicString@4@0AAV12@2@Z, ?open@DOMWindow@WebCore@@QEAA?AV?$PassRefPtr@VDOMWindow@WebCore@@@WTF@@AEBVString@4@AEBVAtomicString@4@0AEAV12@2@Z) 354 355 #endif356 351 symbolWithPointer(?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVDOMWindow@1@@Z, ?toJS@WebCore@@YA?AVJSValue@JSC@@PEAVExecState@3@PEAVJSDOMGlobalObject@1@PEAVDOMWindow@1@@Z) 357 352 symbolWithPointer(?layerTreeAsText@Frame@WebCore@@QBE?AVString@WTF@@I@Z, ?layerTreeAsText@Frame@WebCore@@QEBA?AVString@WTF@@I@Z) … … 443 438 symbolWithPointer(?toUInt32EnforceRange@WebCore@@YAIPAVExecState@JSC@@VJSValue@3@@Z, ?toUInt32EnforceRange@WebCore@@YAIPEAVExecState@JSC@@VJSValue@3@@Z) 444 439 symbolWithPointer(?toUInt64@WebCore@@YA_KPAVExecState@JSC@@VJSValue@3@W4IntegerConversionConfiguration@1@@Z, ?toUInt64@WebCore@@YA_KPEAVExecState@JSC@@VJSValue@3@W4IntegerConversionConfiguration@1@@Z) 445 symbolWithPointer(?commonVM@JSDOMWindowBase@WebCore@@SAPAVVM@JSC@@XZ, ?commonVM@JSDOMWindowBase@WebCore@@SAPEAVVM@JSC@@XZ) 446 440 \ 447 441 #if ENABLE(VIDEO) 448 442 symbolWithPointer(?toTimeRanges@WebCore@@YAPAVTimeRanges@1@VJSValue@JSC@@@Z, ?toTimeRanges@WebCore@@YAPEAVTimeRanges@1@VJSValue@JSC@@@Z) … … 464 458 symbolWithPointer(?setDefaultOriginQuota@ApplicationCacheStorage@WebCore@@QAEX_J@Z, ?setDefaultOriginQuota@ApplicationCacheStorage@WebCore@@QEAAX_J@Z) 465 459 symbolWithPointer(?vm@ScriptExecutionContext@WebCore@@QAEPAVVM@JSC@@XZ, ?vm@ScriptExecutionContext@WebCore@@QEAAPEAVVM@JSC@@XZ) 466 #if _MSC_VER >= 1800467 460 symbolWithPointer(?completeURL@Document@WebCore@@UBE?AVURL@2@ABVString@WTF@@@Z, ?completeURL@Document@WebCore@@UBEA?AVURL@2@AEBVString@WTF@@@Z) 468 461 symbolWithPointer(??1DOMWindow@WebCore@@UAE@XZ, ??1DOMWindow@WebCore@@UEAA@XZ) 469 462 symbolWithPointer(?visibleContentRect@ScrollView@WebCore@@UBE?AVIntRect@2@W4VisibleContentRectIncludesScrollbars@ScrollableArea@2@@Z, ?visibleContentRect@ScrollView@WebCore@@UEAA?AVIntRect@2@W4VisibleContentRectIncludesScrollbars@ScrollableArea@2@@Z) 470 #endif
Note:
See TracChangeset
for help on using the changeset viewer.