diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2017-04-06 10:05:55 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-04-07 18:17:58 +0000 |
commit | 928cd15d3d3ab82734f49eb9d694faf59c3a0c6d (patch) | |
tree | b4ccd30048fc23f59c8f156d6a0d1060b7121f16 /Source/JavaScriptCore | |
parent | be770ca621f6463339b7d15be088e1b9acd851e5 (diff) | |
download | qtwebkit-928cd15d3d3ab82734f49eb9d694faf59c3a0c6d.tar.gz |
Import WebKit commit 342c7c7c069db3ca1d09ae6c5f7d600f9b241778
Change-Id: I8886595114569f61168aed76b23ad7288c5cb34c
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/JavaScriptCore')
7 files changed, 44 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/API/JSCallbackObject.h b/Source/JavaScriptCore/API/JSCallbackObject.h index addd21986..8356e704d 100644 --- a/Source/JavaScriptCore/API/JSCallbackObject.h +++ b/Source/JavaScriptCore/API/JSCallbackObject.h @@ -149,7 +149,19 @@ public: void setPrivate(void* data); void* getPrivate(); + // FIXME: We should fix the warnings for extern-template in JSObject template classes: https://bugs.webkit.org/show_bug.cgi?id=161979 +#if COMPILER(CLANG) +#if __has_warning("-Wundefined-var-template") +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundefined-var-template" +#endif +#endif DECLARE_INFO; +#if COMPILER(CLANG) +#if __has_warning("-Wundefined-var-template") +#pragma clang diagnostic pop +#endif +#endif JSClassRef classRef() const { return m_callbackObjectData->jsClass; } bool inherits(JSClassRef) const; diff --git a/Source/JavaScriptCore/b3/B3ValueInlines.h b/Source/JavaScriptCore/b3/B3ValueInlines.h index 86cb8f6ad..d38cc44e2 100644 --- a/Source/JavaScriptCore/b3/B3ValueInlines.h +++ b/Source/JavaScriptCore/b3/B3ValueInlines.h @@ -42,7 +42,7 @@ namespace JSC { namespace B3 { template<typename T> -T* Value::as() +inline T* Value::as() { if (T::accepts(opcode())) return static_cast<T*>(this); @@ -50,7 +50,7 @@ T* Value::as() } template<typename T> -const T* Value::as() const +inline const T* Value::as() const { return const_cast<Value*>(this)->as<T>(); } diff --git a/Source/JavaScriptCore/dfg/DFGClobberize.h b/Source/JavaScriptCore/dfg/DFGClobberize.h index 461217772..d7ce00df5 100644 --- a/Source/JavaScriptCore/dfg/DFGClobberize.h +++ b/Source/JavaScriptCore/dfg/DFGClobberize.h @@ -844,7 +844,9 @@ void clobberize(Graph& graph, Node* node, const ReadFunctor& read, const WriteFu read(JSObject_butterfly); AbstractHeap heap(NamedProperties, node->multiGetByOffsetData().identifierNumber); read(heap); - def(HeapLocation(NamedPropertyLoc, heap, node->child1()), LazyNode(node)); + // FIXME: We cannot def() for MultiGetByOffset because CSE is not smart enough to decay it + // to a CheckStructure. + // https://bugs.webkit.org/show_bug.cgi?id=159859 return; } diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h index bd437e4ad..bc323021a 100644 --- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h +++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h @@ -150,7 +150,7 @@ public: void setIndexQuicklyToDouble(unsigned i, double value) { - setIndexQuicklyToNativeValue(i, toNativeFromValue<Adaptor>(value)); + setIndexQuicklyToNativeValue(i, toNativeFromValue<Adaptor>(jsNumber(value))); } void setIndexQuickly(unsigned i, JSValue value) diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.h index 5590df42e..d89fd034e 100644 --- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.h +++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.h @@ -43,7 +43,19 @@ public: static JSGenericTypedArrayViewConstructor* create( VM&, JSGlobalObject*, Structure*, JSObject* prototype, const String& name, FunctionExecutable* privateAllocator); + // FIXME: We should fix the warnings for extern-template in JSObject template classes: https://bugs.webkit.org/show_bug.cgi?id=161979 +#if COMPILER(CLANG) +#if __has_warning("-Wundefined-var-template") +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundefined-var-template" +#endif +#endif DECLARE_INFO; +#if COMPILER(CLANG) +#if __has_warning("-Wundefined-var-template") +#pragma clang diagnostic pop +#endif +#endif static Structure* createStructure(VM&, JSGlobalObject*, JSValue prototype); diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.h index 7ef77490a..12d381246 100644 --- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.h +++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.h @@ -42,8 +42,20 @@ protected: public: static JSGenericTypedArrayViewPrototype* create( VM&, JSGlobalObject*, Structure*); - + + // FIXME: We should fix the warnings for extern-template in JSObject template classes: https://bugs.webkit.org/show_bug.cgi?id=161979 +#if COMPILER(CLANG) +#if __has_warning("-Wundefined-var-template") +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundefined-var-template" +#endif +#endif DECLARE_INFO; +#if COMPILER(CLANG) +#if __has_warning("-Wundefined-var-template") +#pragma clang diagnostic pop +#endif +#endif static Structure* createStructure(VM&, JSGlobalObject*, JSValue prototype); }; diff --git a/Source/JavaScriptCore/runtime/TypedArrayAdaptors.h b/Source/JavaScriptCore/runtime/TypedArrayAdaptors.h index d4dc53557..270e36860 100644 --- a/Source/JavaScriptCore/runtime/TypedArrayAdaptors.h +++ b/Source/JavaScriptCore/runtime/TypedArrayAdaptors.h @@ -27,6 +27,7 @@ #define TypedArrayAdaptors_h #include "JSCJSValue.h" +#include "MathCommon.h" #include "TypedArrayType.h" #include <wtf/MathExtras.h> |