diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> | 2013-02-08 16:27:41 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> | 2013-02-08 16:31:20 +0100 |
commit | 84f9848fd9f20536b18834a54ef15c6a65f8a682 (patch) | |
tree | c31353dd1434692b2b4f351126b3abcd8460b8a8 /src/3rdparty/javascriptcore | |
parent | e7a8eef49d6d205e6cb549e879a27af4fe7fcce4 (diff) | |
parent | 689406ac2424095d6cd4e6bcb3430e53a7e7bbfa (diff) | |
download | qtscript-wip/android.tar.gz |
Merge branch 'dev' into androidwip/android
Change-Id: Iee99e20b0c2eedd01e06a93b10381c03b42788dc
Diffstat (limited to 'src/3rdparty/javascriptcore')
20 files changed, 75 insertions, 47 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog index 5ab23e6..00d3499 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog +++ b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog @@ -1,3 +1,17 @@ +2012-08-08 Patrick Gansterer <paroga@webkit.org> + + [WIN] Use GetTimeZoneInformation() for getting the timezone name + https://bugs.webkit.org/show_bug.cgi?id=91936 + + Reviewed by Ryosuke Niwa. + + The MS CRT implementation of strftime calls the same functions in the background. + Using them directly avoids the overhead of parsing the format string and removes + the dependency on strftime() for WinCE where this function does not exist. + + * runtime/DateConversion.cpp: + (JSC::formatTime): + 2010-07-08 Gavin Barraclough <barraclough@apple.com> Reviewed by Sam Weinig. diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri index 7a3dcd2..29dea36 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri +++ b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri @@ -13,12 +13,6 @@ CONFIG(debug, debug|release) { OBJECTS_DIR = obj/release } -symbian: { - # Need to guarantee this comes before system includes of /epoc32/include - MMP_RULES += "USERINCLUDE ../JavaScriptCore/profiler" - LIBS += -lhal -} - INCLUDEPATH = \ $$PWD \ $$PWD/.. \ @@ -69,8 +63,6 @@ contains(JAVASCRIPTCORE_JIT,no) { } wince* { - INCLUDEPATH += $$QT.core.sources/../3rdparty/ce-compat - SOURCES += $$QT.core.sources/../3rdparty/ce-compat/ce_time.c DEFINES += WINCEBASIC } diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/config.h b/src/3rdparty/javascriptcore/JavaScriptCore/config.h index 2af2e71..6be10fc 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/config.h +++ b/src/3rdparty/javascriptcore/JavaScriptCore/config.h @@ -39,10 +39,10 @@ #if OS(WINDOWS) -// If we don't define these, they get defined in windef.h. -// We want to use std::min and std::max -#define max max -#define min min +// windef.h defines min and max unless NOMINMAX is defined. +#ifndef NOMINMAX +# define NOMINMAX +#endif #if !COMPILER(MSVC7) && !OS(WINCE) // We need to define this before the first #include of stdlib.h or it won't contain rand_s. diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp index 9269fdd..4300a57 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp @@ -852,7 +852,7 @@ JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSObjec } Register* oldEnd = m_registerFile.end(); -#ifdef QT_BUILD_SCRIPT_LIB //with QtScript, we do not necesserly start from scratch +#ifdef QT_BUILD_SCRIPT_LIB //with Qt Script, we do not necesserly start from scratch Register* newEnd = oldEnd + globalRegisterOffset + codeBlock->m_numCalleeRegisters; #else Register* newEnd = m_registerFile.start() + globalRegisterOffset + codeBlock->m_numCalleeRegisters; @@ -862,7 +862,7 @@ JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSObjec return jsNull(); } -#ifdef QT_BUILD_SCRIPT_LIB //with QtScript, we do not necesserly start from scratch +#ifdef QT_BUILD_SCRIPT_LIB //with Qt Script, we do not necesserly start from scratch CallFrame* newCallFrame = CallFrame::create(oldEnd + globalRegisterOffset); #else CallFrame* newCallFrame = CallFrame::create(m_registerFile.start() + globalRegisterOffset); diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp index e1237e4..5233923 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp @@ -39,7 +39,11 @@ #if CPU(X86_64) // These limits suitable on 64-bit platforms (particularly x86-64, where we require all jumps to have a 2Gb max range). +#ifdef QT_USE_ONEGB_VMALLOCATOR + #define VM_POOL_SIZE (1024u * 1024u * 1024u) // 1Gb +#else #define VM_POOL_SIZE (2u * 1024u * 1024u * 1024u) // 2Gb +#endif #define COALESCE_LIMIT (16u * 1024u * 1024u) // 16Mb #else // These limits are hopefully sensible on embedded platforms. diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp index 9028f50..3124d35 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorSymbian.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) + * Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp index d8027ff..1abdf8b 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp @@ -1170,7 +1170,7 @@ DEFINE_STUB_FUNCTION(int, timeout_check) } #ifdef QT_BUILD_SCRIPT_LIB else { - // It's possible that the call to QtScript's implementation of + // It's possible that the call to Qt Script's implementation of // TimeoutChecker::didTimeOut() caused an error to be thrown. // In that case, didTimeOut() should still return false, since // we don't want the interrupted-exception to override the diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/pcre/pcre.pri b/src/3rdparty/javascriptcore/JavaScriptCore/pcre/pcre.pri index 4f59e17..ca5e58f 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/pcre/pcre.pri +++ b/src/3rdparty/javascriptcore/JavaScriptCore/pcre/pcre.pri @@ -1,7 +1,6 @@ # Perl Compatible Regular Expressions - Qt4 build info VPATH += $$PWD INCLUDEPATH += $$PWD $$OUTPUT_DIR/JavaScriptCore/tmp -DEPENDPATH += $$PWD SOURCES += \ pcre_compile.cpp \ diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConversion.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConversion.cpp index f129407..2ca70ff 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConversion.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConversion.cpp @@ -48,6 +48,10 @@ #include <wtf/DateMath.h> #include <wtf/StringExtras.h> +#if OS(WINDOWS) +#include <windows.h> +#endif + using namespace WTF; namespace JSC { @@ -79,12 +83,22 @@ void formatDateUTCVariant(const GregorianDateTime &t, DateConversionBuffer& buff void formatTime(const GregorianDateTime &t, DateConversionBuffer& buffer) { int offset = abs(gmtoffset(t)); +#if OS(WINDOWS) + TIME_ZONE_INFORMATION timeZoneInformation; + GetTimeZoneInformation(&timeZoneInformation); + const WCHAR* timeZoneName = t.isDST ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName; +#else char timeZoneName[70]; struct tm gtm = t; strftime(timeZoneName, sizeof(timeZoneName), "%Z", >m); +#endif if (timeZoneName[0]) { +#if OS(WINDOWS) + snprintf(buffer, DateConversionBufferSize, "%02d:%02d:%02d GMT%c%02d%02d (%S)", +#else snprintf(buffer, DateConversionBufferSize, "%02d:%02d:%02d GMT%c%02d%02d (%s)", +#endif t.hour, t.minute, t.second, gmtoffset(t) < 0 ? '-' : '+', offset / (60*60), (offset / 60) % 60, timeZoneName); } else { diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h index 053b4c0..06548ce 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h @@ -135,7 +135,7 @@ namespace JSC { class JSImmediate { #ifdef QT_BUILD_SCRIPT_LIB - public: // QtScript needs isImmediate() and from() functions + public: // Qt Script needs isImmediate() and from() functions #else private: #endif diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSObject.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSObject.cpp index 8706b8d..869267b 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSObject.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSObject.cpp @@ -533,7 +533,7 @@ NEVER_INLINE void JSObject::fillGetterPropertySlot(PropertySlot& slot, JSValue* Structure* JSObject::createInheritorID() { #ifdef QT_BUILD_SCRIPT_LIB - // ### QtScript needs the hasOwnProperty() calls etc. for QScriptObject + // ### Qt Script needs the hasOwnProperty() calls etc. for QScriptObject m_inheritorID = Structure::create(this, TypeInfo(ObjectType, ImplementsHasInstance | JSC::OverridesHasInstance | JSC::OverridesGetOwnPropertySlot | JSC::OverridesMarkChildren | JSC::OverridesGetPropertyNames)); #else m_inheritorID = JSObject::createStructure(this); diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/MarkStackSymbian.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/MarkStackSymbian.cpp index bda14ac..1a69733 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/MarkStackSymbian.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/MarkStackSymbian.cpp @@ -1,5 +1,5 @@ /* - Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) + Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h index a18949e..fc5676a 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h @@ -27,6 +27,7 @@ #define WTF_MathExtras_h #include <float.h> +#include <limits> #include <math.h> #include <stdlib.h> @@ -39,13 +40,6 @@ #include <machine/ieee.h> #endif -#if COMPILER(MSVC) -#if OS(WINCE) -#include <stdlib.h> -#endif -#include <limits> -#endif - #ifndef M_PI const double piDouble = 3.14159265358979323846; const float piFloat = 3.14159265358979323846f; @@ -186,4 +180,26 @@ inline float deg2turn(float d) { return d / 360.0f; } inline float rad2grad(float r) { return r * 200.0f / piFloat; } inline float grad2rad(float g) { return g * piFloat / 200.0f; } +#if COMPILER(MINGW64) && (!defined(__MINGW64_VERSION_RC) || __MINGW64_VERSION_RC < 1) +inline double wtf_pow(double x, double y) +{ + // MinGW-w64 has a custom implementation for pow. + // This handles certain special cases that are different. + if ((x == 0.0 || isinf(x)) && isfinite(y)) { + double f; + if (modf(y, &f) != 0.0) + return ((x == 0.0) ^ (y > 0.0)) ? std::numeric_limits<double>::infinity() : 0.0; + } + + if (x == 2.0) { + int yInt = static_cast<int>(y); + if (y == yInt) + return ldexp(1.0, yInt); + } + + return pow(x, y); +} +#define pow(x, y) wtf_pow(x, y) +#endif // COMPILER(MINGW64) && (!defined(__MINGW64_VERSION_RC) || __MINGW64_VERSION_RC < 1) + #endif // #ifndef WTF_MathExtras_h diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/qt/MainThreadQt.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/qt/MainThreadQt.cpp index 0ac2717..ae3f2ba 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/qt/MainThreadQt.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/qt/MainThreadQt.cpp @@ -1,6 +1,6 @@ /* * Copyright (C) 2007 Staikos Computing Services Inc. - * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) + * Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies) * Copyright (C) 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp index 6a28e9e..3489ba0 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + * Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h index 21422f6..5f5555a 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + * Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp index ca13399..1e21fc3 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) + * Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h index 69d78c1..bd6b75b 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) + * Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/SymbianDefines.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/SymbianDefines.h index 99db5d7..fbf4dcf 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/SymbianDefines.h +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/SymbianDefines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) + * Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/src/3rdparty/javascriptcore/WebKit.pri b/src/3rdparty/javascriptcore/WebKit.pri index 9aaaa99..d3f22fd 100644 --- a/src/3rdparty/javascriptcore/WebKit.pri +++ b/src/3rdparty/javascriptcore/WebKit.pri @@ -10,8 +10,6 @@ CONFIG(standalone_package) { OUTPUT_DIR=$$PWD } -CONFIG += depend_includepath - isEmpty(OUTPUT_DIR) { CONFIG(debug, debug|release) { OUTPUT_DIR=$$PWD/WebKitBuild/Debug @@ -40,18 +38,13 @@ building-libs { else: LIBS += $${QTWEBKITLIBNAME}.lib } else { LIBS += -lQtWebKit - symbian { - TARGET.EPOCSTACKSIZE = 0x14000 // 80 kB - TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 // Min 128kB, Max 32MB - } } } } - DEPENDPATH += $$PWD/WebKit/qt/Api } greaterThan(QT_MINOR_VERSION, 5):DEFINES += WTF_USE_ACCELERATED_COMPOSITING -!mac:!unix|symbian { +!mac:!unix { DEFINES += USE_SYSTEM_MALLOC } @@ -66,7 +59,7 @@ CONFIG -= warn_on *-g++*:QMAKE_CXXFLAGS += -Wall -Wreturn-type -fno-strict-aliasing -Wcast-align -Wchar-subscripts -Wformat-security -Wreturn-type -Wno-unused-parameter -Wno-sign-compare -Wno-switch -Wno-switch-enum -Wundef -Wmissing-noreturn -Winit-self # Enable GNU compiler extensions to the ARM compiler for all Qt ports using RVCT -symbian|*-armcc { +*-armcc { RVCT_COMMON_CFLAGS = --gnu --diag_suppress 68,111,177,368,830,1293 RVCT_COMMON_CXXFLAGS = $$RVCT_COMMON_CFLAGS --no_parse_templates } @@ -76,11 +69,7 @@ symbian|*-armcc { QMAKE_CXXFLAGS += $$RVCT_COMMON_CXXFLAGS } -symbian { - QMAKE_CXXFLAGS.ARMCC += $$RVCT_COMMON_CXXFLAGS -} - -symbian|maemo5: DEFINES *= QT_NO_UITOOLS +maemo5: DEFINES *= QT_NO_UITOOLS contains(DEFINES, QT_NO_UITOOLS): CONFIG -= uitools |