Changeset 160254 in webkit


Ignore:
Timestamp:
Dec 6, 2013 2:56:46 PM (10 years ago)
Author:
Brent Fulgham
Message:

../JavaScriptCore: [Win] Support compiling with VS2013
https://bugs.webkit.org/show_bug.cgi?id=125353

Reviewed by Anders Carlsson.

  • API/tests/testapi.c: Use C99 defines if available.
  • jit/JITOperations.cpp: Don't attempt to define C linkage when

returning a C++ object.

../WebCore: [Win] Support compiling with VS2013
https://bugs.webkit.org/show_bug.cgi?id=125353

Reviewed by Anders Carlsson.

  • loader/archive/cf/LegacyWebArchive.cpp:

(WebCore::LegacyWebArchive::create): Use nullptr
(WebCore::LegacyWebArchive::createFromSelection): Ditto

../WebKit: [Win] Support compiling with VS2013.
https://bugs.webkit.org/show_bug.cgi?id=125353

Reviewed by Anders Carlsson.

  • WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Provide

proper exports for VS2013 build.

../WTF: [Win] Support compiling with VS2013
https://bugs.webkit.org/show_bug.cgi?id=125353

Reviewed by Anders Carlsson.

  • wtf/Compiler.h: Show proper features for VS2012 and VS2013.
  • wtf/MathExtras.h: Don't implement common C99 routines when

they are available through the runtime libraries.

  • wtf/RetainPtr.h:

(WTF::RetainPtr::operator bool): Added.

  • wtf/StdLibExtras.h: Use Microsoft's version of make_unique

when it exists.

Location:
trunk/Source
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/tests/testapi.c

    r155495 r160254  
    4646#if COMPILER(MSVC)
    4747
     48#if _MSC_VER < 1800
    4849#include <wtf/MathExtras.h>
    4950
     
    5556using std::isinf;
    5657using std::isnan;
     58#endif
    5759
    5860#endif
  • trunk/Source/JavaScriptCore/ChangeLog

    r160252 r160254  
     12013-12-06  Roger Fong <roger_fong@apple.com> and Brent Fulgham  <bfulgham@apple.com>
     2
     3        [Win] Support compiling with VS2013
     4        https://bugs.webkit.org/show_bug.cgi?id=125353
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * API/tests/testapi.c: Use C99 defines if available.
     9        * jit/JITOperations.cpp: Don't attempt to define C linkage when
     10        returning a C++ object.
     11
    1122013-12-06  Filip Pizlo  <fpizlo@apple.com>
    213
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r160244 r160254  
    13641364}
    13651365
     1366}
     1367
    13661368static JSValue getByVal(ExecState* exec, JSValue baseValue, JSValue subscript, ReturnAddressPtr returnAddress)
    13671369{
     
    13871389}
    13881390
     1391extern "C" {
     1392   
    13891393EncodedJSValue JIT_OPERATION operationGetByValGeneric(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedSubscript)
    13901394{
  • trunk/Source/WTF/ChangeLog

    r160228 r160254  
     12013-12-06  Roger Fong <roger_fong@apple.com> and Brent Fulgham  <bfulgham@apple.com>
     2
     3        [Win] Support compiling with VS2013
     4        https://bugs.webkit.org/show_bug.cgi?id=125353
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * wtf/Compiler.h: Show proper features for VS2012 and VS2013.
     9        * wtf/MathExtras.h: Don't implement common C99 routines when
     10        they are available through the runtime libraries.
     11        * wtf/RetainPtr.h:
     12        (WTF::RetainPtr::operator bool): Added.
     13        * wtf/StdLibExtras.h: Use Microsoft's version of make_unique
     14        when it exists.
     15
    1162013-12-06  Laszlo Vidacs  <lac@inf.u-szeged.hu>
    217
  • trunk/Source/WTF/wtf/Compiler.h

    r159202 r160254  
    8080#if !COMPILER(CLANG)
    8181#define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL 1
     82#if !defined(_MSC_VER) || _MSC_VER < 1800
    8283#define WTF_COMPILER_QUIRK_FINAL_IS_CALLED_SEALED 1
     84#endif
    8385#endif
    8486
     
    8890#define WTF_COMPILER_SUPPORTS_CXX_STATIC_ASSERT 1
    8991#define WTF_COMPILER_SUPPORTS_CXX_AUTO_TYPE 1
     92#endif
     93
     94#if _MSC_VER >= 1700
     95#define WTF_COMPILER_SUPPORTS_CXX_STRONG_ENUMS 1
     96#define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL 1
     97#endif
     98
     99#if _MSC_VER >= 1800
     100#define WTF_COMPILER_SUPPORTS_CXX_DELETED_FUNCTIONS 1
     101#define WTF_COMPILER_SUPPORTS_CXX_EXPLICIT_CONVERSIONS 1
     102#define WTF_COMPILER_SUPPORTS_CXX_GENERALIZED_INITIALIZERS 1
     103#define WTF_COMPILER_SUPPORTS_CXX_VARIADIC_TEMPLATES 1
    90104#endif
    91105
  • trunk/Source/WTF/wtf/MathExtras.h

    r158401 r160254  
    124124#if COMPILER(MSVC)
    125125
     126#if _MSC_VER < 1800
    126127// We must not do 'num + 0.5' or 'num - 0.5' because they can cause precision loss.
    127128static double round(double num)
     
    139140    return integer - num >= 0.5f ? integer - 1.0f : integer;
    140141}
     142
    141143inline long long llround(double num) { return static_cast<long long>(round(num)); }
    142144inline long long llroundf(float num) { return static_cast<long long>(roundf(num)); }
     
    145147inline double trunc(double num) { return num > 0 ? floor(num) : ceil(num); }
    146148
    147 #if _MSC_VER < 1800
    148 
    149149inline double remainder(double numerator, double denominator)
    150150{
     
    156156}
    157157
    158 #endif
    159 
    160158inline double asinh(double d)
    161159{
     
    187185    return pow(d, 1.0 / 3.0);
    188186}
     187
     188#endif
    189189
    190190#endif
     
    216216#endif
    217217
     218#if _MSC_VER < 1800
     219
    218220namespace std {
    219221
     
    224226
    225227} // namespace std
     228
     229#endif
    226230
    227231inline double nextafter(double x, double y) { return _nextafter(x, y); }
  • trunk/Source/WTF/wtf/RetainPtr.h

    r157653 r160254  
    120120#if COMPILER_SUPPORTS(CXX_EXPLICIT_CONVERSIONS)
    121121        explicit operator PtrType() const { return fromStorageType(m_ptr); }
     122        explicit operator bool() const { return m_ptr; }
    122123#endif
    123124
  • trunk/Source/WTF/wtf/StdLibExtras.h

    r157872 r160254  
    336336
    337337#if COMPILER_SUPPORTS(CXX_VARIADIC_TEMPLATES)
     338#if !defined(_MSC_VER) || _MSC_VER < 1800
    338339    template<class T, class... Args> inline typename _Unique_if<T>::_Single_object
    339340    make_unique(Args&&... args)
     
    341342        return unique_ptr<T>(new T(std::forward<Args>(args)...));
    342343    }
     344#endif
    343345#else
    344346    template<class T> inline typename _Unique_if<T>::_Single_object
     
    409411#endif
    410412
     413#if !defined(_MSC_VER) || _MSC_VER < 1800
    411414    template<class T> inline typename _Unique_if<T>::_Unknown_bound
    412415    make_unique(size_t n)
     
    415418        return unique_ptr<T>(new U[n]());
    416419    }
     420#endif
    417421   
    418422#if COMPILER_SUPPORTS(CXX_VARIADIC_TEMPLATES)
  • trunk/Source/WebCore/ChangeLog

    r160251 r160254  
     12013-12-06  Roger Fong <roger_fong@apple.com> and Brent Fulgham  <bfulgham@apple.com>
     2
     3        [Win] Support compiling with VS2013
     4        https://bugs.webkit.org/show_bug.cgi?id=125353
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * loader/archive/cf/LegacyWebArchive.cpp:
     9        (WebCore::LegacyWebArchive::create): Use nullptr
     10        (WebCore::LegacyWebArchive::createFromSelection): Ditto
     11
    1122013-11-15  Jer Noble  <jer.noble@apple.com>
    213
  • trunk/Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp

    r159171 r160254  
    495495    String markupString = documentTypeString(document) + createMarkup(*range, &nodeList, AnnotateForInterchange);
    496496
    497     return create(markupString, frame, nodeList, 0);
     497    return create(markupString, frame, nodeList, nullptr);
    498498}
    499499
     
    602602
    603603    String markupString = builder.toString();
    604     RefPtr<LegacyWebArchive> archive = create(markupString, frame, nodeList, 0);
     604    RefPtr<LegacyWebArchive> archive = create(markupString, frame, nodeList, nullptr);
    605605   
    606606    if (!document->isFrameSet())
  • trunk/Source/WebKit/ChangeLog

    r160217 r160254  
     12013-12-06  Roger Fong <roger_fong@apple.com> and Brent Fulgham  <bfulgham@apple.com>
     2
     3        [Win] Support compiling with VS2013.
     4        https://bugs.webkit.org/show_bug.cgi?id=125353
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Provide
     9        proper exports for VS2013 build.
     10
    1112013-12-06  Dániel Bátyai  <Batyai.Daniel@stud.u-szeged.hu>
    212
  • trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in

    r160217 r160254  
    347347        symbolWithPointer(?close@DOMWindow@WebCore@@QAEXPAVScriptExecutionContext@2@@Z, ?close@DOMWindow@WebCore@@QEAAXPEAVScriptExecutionContext@2@@Z)
    348348        symbolWithPointer(?document@DOMWindow@WebCore@@QBEPAVDocument@2@XZ, ?document@DOMWindow@WebCore@@QEBAPEAVDocument@2@XZ)
     349#if _MSC_VER < 1800
    349350        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)
     351#else
     352        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)
     353
     354#endif
    350355        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)
    351356        symbolWithPointer(?layerTreeAsText@Frame@WebCore@@QBE?AVString@WTF@@I@Z, ?layerTreeAsText@Frame@WebCore@@QEBA?AVString@WTF@@I@Z)
     
    460465        symbolWithPointer(?setDefaultOriginQuota@ApplicationCacheStorage@WebCore@@QAEX_J@Z, ?setDefaultOriginQuota@ApplicationCacheStorage@WebCore@@QEAAX_J@Z)
    461466        symbolWithPointer(?vm@ScriptExecutionContext@WebCore@@QAEPAVVM@JSC@@XZ, ?vm@ScriptExecutionContext@WebCore@@QEAAPEAVVM@JSC@@XZ)
     467#if _MSC_VER >= 1800
     468        symbolWithPointer(?completeURL@Document@WebCore@@UBE?AVURL@2@ABVString@WTF@@@Z, ?completeURL@Document@WebCore@@UBE?AVURL@2@ABVString@WTF@@@Z)
     469        symbolWithPointer(??1DOMWindow@WebCore@@UAE@XZ, ??1DOMWindow@WebCore@@UAE@XZ)
     470        symbolWithPointer(?visibleContentRect@ScrollView@WebCore@@UBE?AVIntRect@2@W4VisibleContentRectIncludesScrollbars@ScrollableArea@2@@Z, ?visibleContentRect@ScrollView@WebCore@@UBE?AVIntRect@2@W4VisibleContentRectIncludesScrollbars@ScrollableArea@2@@Z)
     471#endif
Note: See TracChangeset for help on using the changeset viewer.