aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm/stubs
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-08-06 14:55:21 +0200
committerLars Knoll <lars.knoll@qt.io>2018-08-10 14:16:09 +0000
commit18d2f78437d28987297148b63b99ceed6313a78a (patch)
tree845e016b002a123e394df43fcf88cf2dc7ee1fb6 /src/3rdparty/masm/stubs
parent577630fe4a1f6a129239788080ff9e802118fd26 (diff)
Update Yarr to the latest version from WebKit
Updated Yarr to a to commit 4d2a53d60487cb1f8b2a9a1e9f684af336fd7d2c in WebKit. Adjusted the yarr code base to work with our older version of wtf and masm. Change-Id: I04b4593ece051e1d7aa087b87aa08c92595d1098 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/3rdparty/masm/stubs')
-rw-r--r--src/3rdparty/masm/stubs/ExecutableAllocator.h4
-rw-r--r--src/3rdparty/masm/stubs/Options.h2
-rw-r--r--src/3rdparty/masm/stubs/SuperSampler.h50
-rw-r--r--src/3rdparty/masm/stubs/runtime/ConcurrentJSLock.h53
-rw-r--r--src/3rdparty/masm/stubs/runtime/RegExpKey.h46
-rw-r--r--src/3rdparty/masm/stubs/runtime/VM.h50
-rw-r--r--src/3rdparty/masm/stubs/wtf/HashMap.h58
-rw-r--r--src/3rdparty/masm/stubs/wtf/HashSet.h67
-rw-r--r--src/3rdparty/masm/stubs/wtf/Optional.h83
-rw-r--r--src/3rdparty/masm/stubs/wtf/PassRefPtr.h14
-rw-r--r--src/3rdparty/masm/stubs/wtf/Vector.h7
-rw-r--r--src/3rdparty/masm/stubs/wtf/text/CString.h4
-rw-r--r--src/3rdparty/masm/stubs/wtf/text/StringBuilder.h52
-rw-r--r--src/3rdparty/masm/stubs/wtf/text/WTFString.h15
-rw-r--r--src/3rdparty/masm/stubs/wtf/unicode/Unicode.h30
-rw-r--r--src/3rdparty/masm/stubs/wtf/unicode/utypes.h1
-rw-r--r--src/3rdparty/masm/stubs/yarr/YarrUnicodeProperties.cpp70
17 files changed, 598 insertions, 8 deletions
diff --git a/src/3rdparty/masm/stubs/ExecutableAllocator.h b/src/3rdparty/masm/stubs/ExecutableAllocator.h
index 1ab28588fb..471fe3c952 100644
--- a/src/3rdparty/masm/stubs/ExecutableAllocator.h
+++ b/src/3rdparty/masm/stubs/ExecutableAllocator.h
@@ -82,7 +82,7 @@ struct ExecutableMemoryHandle : public RefCounted<ExecutableMemoryHandle> {
inline bool isManaged() const { return true; }
- void* start() { return m_allocation->start(); }
+ void *start() { return m_allocation->start(); }
size_t sizeInBytes() { return m_size; }
QV4::ExecutableAllocator::ChunkOfPages *chunk() const
@@ -98,7 +98,7 @@ struct ExecutableAllocator {
: realAllocator(alloc)
{}
- PassRefPtr<ExecutableMemoryHandle> allocate(JSGlobalData&, size_t size, void*, int)
+ Ref<ExecutableMemoryHandle> allocate(JSGlobalData&, size_t size, void*, int)
{
return adoptRef(new ExecutableMemoryHandle(realAllocator, size));
}
diff --git a/src/3rdparty/masm/stubs/Options.h b/src/3rdparty/masm/stubs/Options.h
index e03cc67690..6339c06033 100644
--- a/src/3rdparty/masm/stubs/Options.h
+++ b/src/3rdparty/masm/stubs/Options.h
@@ -44,6 +44,8 @@ namespace JSC {
struct Options {
static bool showDisassembly();
static bool showDFGDisassembly() { return true; }
+ static bool zeroStackFrame() { return true; }
+ static bool dumpCompiledRegExpPatterns() { return false; }
};
}
diff --git a/src/3rdparty/masm/stubs/SuperSampler.h b/src/3rdparty/masm/stubs/SuperSampler.h
new file mode 100644
index 0000000000..422de528e1
--- /dev/null
+++ b/src/3rdparty/masm/stubs/SuperSampler.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQml module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#pragma once
+
+namespace WTF {
+
+struct SuperSamplerScope {
+ SuperSamplerScope(bool) {}
+};
+
+}
+
+using WTF::SuperSamplerScope;
diff --git a/src/3rdparty/masm/stubs/runtime/ConcurrentJSLock.h b/src/3rdparty/masm/stubs/runtime/ConcurrentJSLock.h
new file mode 100644
index 0000000000..43868feadb
--- /dev/null
+++ b/src/3rdparty/masm/stubs/runtime/ConcurrentJSLock.h
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQml module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#pragma once
+
+namespace JSC {
+
+class NoLock {
+public:
+ void lock() { }
+ void unlock() { }
+ bool isHeld() { return false; }
+};
+
+typedef NoLock ConcurrentJSLock;
+
+} // namespace JSC
diff --git a/src/3rdparty/masm/stubs/runtime/RegExpKey.h b/src/3rdparty/masm/stubs/runtime/RegExpKey.h
new file mode 100644
index 0000000000..392f66fb83
--- /dev/null
+++ b/src/3rdparty/masm/stubs/runtime/RegExpKey.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2010 University of Szeged
+ * Copyright (C) 2010 Renata Hodovan (hodovan@inf.u-szeged.hu)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF SZEGED ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UNIVERSITY OF SZEGED OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <wtf/text/WTFString.h>
+
+namespace JSC {
+
+enum RegExpFlags : int8_t {
+ NoFlags = 0,
+ FlagGlobal = 1,
+ FlagIgnoreCase = 2,
+ FlagMultiline = 4,
+ FlagSticky = 8,
+ FlagUnicode = 16,
+ FlagDotAll = 32,
+ InvalidFlags = 64,
+ DeletedValueFlags = -1
+};
+
+} // namespace JSC
diff --git a/src/3rdparty/masm/stubs/runtime/VM.h b/src/3rdparty/masm/stubs/runtime/VM.h
new file mode 100644
index 0000000000..94cce814f3
--- /dev/null
+++ b/src/3rdparty/masm/stubs/runtime/VM.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQml module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef MASM_VM_H
+#define MASM_VM_H
+
+#include <qv4engine_p.h>
+
+namespace JSC {
+
+class VM : public QV4::ExecutionEngine {};
+
+}
+
+#endif // MASM_VM_H
diff --git a/src/3rdparty/masm/stubs/wtf/HashMap.h b/src/3rdparty/masm/stubs/wtf/HashMap.h
new file mode 100644
index 0000000000..888c6cceb0
--- /dev/null
+++ b/src/3rdparty/masm/stubs/wtf/HashMap.h
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQml module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef HASHMAP_H
+#define HASHMAP_H
+
+#include <QtCore/qhash.h>
+
+namespace WTF {
+
+template<typename Key, typename Value>
+class HashMap final : public QHash<Key, Value>
+{
+public:
+ void add(const Key &k, const Value &v) { QHash<Key, Value>::insert(k, v); }
+ Value get(const Key &k) { return QHash<Key, Value>::value(k); }
+};
+
+}
+
+using WTF::HashMap;
+
+#endif
diff --git a/src/3rdparty/masm/stubs/wtf/HashSet.h b/src/3rdparty/masm/stubs/wtf/HashSet.h
new file mode 100644
index 0000000000..3765c9a8b1
--- /dev/null
+++ b/src/3rdparty/masm/stubs/wtf/HashSet.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQml module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef HASHSET_H
+#define HASHSET_H
+
+#include <QtCore/qset.h>
+
+namespace WTF {
+
+template<typename Key>
+class HashSet final : public QSet<Key>
+{
+public:
+ struct SetAddResult {
+ bool isNewEntry;
+ };
+ SetAddResult add(const Key &k)
+ {
+ if (QSet<Key>::find(k) == QSet<Key>::constEnd()) {
+ QSet<Key>::insert(k);
+ return { true };
+ }
+ return { false };
+ }
+};
+
+}
+
+using WTF::HashSet;
+
+#endif
diff --git a/src/3rdparty/masm/stubs/wtf/Optional.h b/src/3rdparty/masm/stubs/wtf/Optional.h
new file mode 100644
index 0000000000..44fa3ee62d
--- /dev/null
+++ b/src/3rdparty/masm/stubs/wtf/Optional.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQml module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#pragma once
+
+#include <QtCore/qglobal.h>
+
+#if __cplusplus > 201402L && QT_HAS_INCLUDE(<optional>)
+#include <optional>
+#else
+
+namespace std {
+
+struct nullopt_t {};
+
+constexpr nullopt_t nullopt {};
+
+template<typename T>
+class optional {
+public:
+ optional() = default;
+ optional(nullopt_t) {}
+ optional(const T &v) : _value(v), _hasValue(true) {}
+ ~optional() = default;
+
+ optional &operator =(nullopt_t) {
+ _value = T();
+ _hasValue = false;
+ return *this;
+ }
+
+ T operator->() { return _value; }
+ T operator*() { return _value; }
+
+ operator bool() const { return _hasValue; }
+ bool has_value() const { return _hasValue; }
+
+ T value() const { return _value; }
+
+private:
+ T _value = T();
+ bool _hasValue = false;
+};
+
+}
+
+#endif
diff --git a/src/3rdparty/masm/stubs/wtf/PassRefPtr.h b/src/3rdparty/masm/stubs/wtf/PassRefPtr.h
index f072e70dd7..cc03a5d651 100644
--- a/src/3rdparty/masm/stubs/wtf/PassRefPtr.h
+++ b/src/3rdparty/masm/stubs/wtf/PassRefPtr.h
@@ -83,14 +83,22 @@ public:
private:
PassRefPtr<T>& operator=(const PassRefPtr<T>& t);
- template <typename PtrType> friend PassRefPtr<PtrType> adoptRef(PtrType*);
+protected:
mutable T* m_ptr;
};
template <typename T>
-PassRefPtr<T> adoptRef(T* ptr)
+class Ref : public PassRefPtr<T>
{
- PassRefPtr<T> result;
+ using PassRefPtr<T>::PassRefPtr;
+
+ template <typename PtrType> friend Ref<PtrType> adoptRef(PtrType*);
+};
+
+template <typename T>
+Ref<T> adoptRef(T* ptr)
+{
+ Ref<T> result;
result.m_ptr = ptr;
return result;
}
diff --git a/src/3rdparty/masm/stubs/wtf/Vector.h b/src/3rdparty/masm/stubs/wtf/Vector.h
index 2025acf8a9..f4f4dc5cf4 100644
--- a/src/3rdparty/masm/stubs/wtf/Vector.h
+++ b/src/3rdparty/masm/stubs/wtf/Vector.h
@@ -55,6 +55,8 @@ class Vector : public std::vector<T> {
public:
Vector() {}
Vector(int initialSize) : std::vector<T>(initialSize) {}
+ Vector(const Vector &other) : std::vector<T>(other) {}
+ Vector(std::initializer_list<T> list) : std::vector<T>(list) {}
inline void append(const T& value)
{ this->push_back(value); }
@@ -63,6 +65,9 @@ public:
inline void append(const OtherType& other)
{ this->push_back(T(other)); }
+ inline void append(T&& other)
+ { this->push_back(std::move(other)); }
+
inline void append(const Vector<T>& vector)
{
this->insert(this->end(), vector.begin(), vector.end());
@@ -80,6 +85,8 @@ public:
this->push_back(*it);
}
+ unsigned size() const { return static_cast<unsigned>(std::vector<T>::size()); }
+
using std::vector<T>::insert;
inline void reserveInitialCapacity(size_t size) { this->reserve(size); }
diff --git a/src/3rdparty/masm/stubs/wtf/text/CString.h b/src/3rdparty/masm/stubs/wtf/text/CString.h
index 26f74f7593..7129f5049e 100644
--- a/src/3rdparty/masm/stubs/wtf/text/CString.h
+++ b/src/3rdparty/masm/stubs/wtf/text/CString.h
@@ -39,4 +39,8 @@
#ifndef CSTRING_H
#define CSTRING_H
+class CString : public QByteArray {
+
+};
+
#endif // CSTRING_H
diff --git a/src/3rdparty/masm/stubs/wtf/text/StringBuilder.h b/src/3rdparty/masm/stubs/wtf/text/StringBuilder.h
new file mode 100644
index 0000000000..a382f6da83
--- /dev/null
+++ b/src/3rdparty/masm/stubs/wtf/text/StringBuilder.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQml module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#pragma once
+
+#include <wtf/text/WTFString.h>
+
+namespace WTF {
+
+struct StringBuilder : public String
+{
+ String toString() const { return *this; }
+};
+
+}
+
+using WTF::StringBuilder;
diff --git a/src/3rdparty/masm/stubs/wtf/text/WTFString.h b/src/3rdparty/masm/stubs/wtf/text/WTFString.h
index 928c684fdb..da5183f734 100644
--- a/src/3rdparty/masm/stubs/wtf/text/WTFString.h
+++ b/src/3rdparty/masm/stubs/wtf/text/WTFString.h
@@ -42,26 +42,33 @@
#include <QString>
#include <wtf/ASCIICType.h>
#include <wtf/unicode/Unicode.h>
+#include <memory>
namespace WTF {
+class PrintStream;
+
class String : public QString
{
public:
+ String() = default;
String(const QString& s) : QString(s) {}
bool is8Bit() const { return false; }
const unsigned char *characters8() const { return 0; }
const UChar *characters16() const { return reinterpret_cast<const UChar*>(constData()); }
template <typename T>
- const T* getCharacters() const;
+ const T* characters() const;
+
+ bool operator!() const { return isEmpty(); }
+ void dump(PrintStream &) const {}
};
template <>
-inline const unsigned char* String::getCharacters<unsigned char>() const { return characters8(); }
+inline const unsigned char* String::characters<unsigned char>() const { return characters8(); }
template <>
-inline const UChar* String::getCharacters<UChar>() const { return characters16(); }
+inline const UChar* String::characters<UChar>() const { return characters16(); }
}
@@ -70,4 +77,6 @@ namespace JSC {
using WTF::String;
}
+#define WTFMove(value) std::move(value)
+
#endif // WTFSTRING_H
diff --git a/src/3rdparty/masm/stubs/wtf/unicode/Unicode.h b/src/3rdparty/masm/stubs/wtf/unicode/Unicode.h
index d61cec5c4e..0f7f005c89 100644
--- a/src/3rdparty/masm/stubs/wtf/unicode/Unicode.h
+++ b/src/3rdparty/masm/stubs/wtf/unicode/Unicode.h
@@ -43,6 +43,7 @@
typedef unsigned char LChar;
typedef unsigned short UChar;
+typedef int32_t UChar32;
namespace Unicode {
inline UChar toLower(UChar ch) {
@@ -52,6 +53,35 @@ namespace Unicode {
inline UChar toUpper(UChar ch) {
return QChar::toUpper(ch);
}
+ inline UChar32 u_tolower(UChar32 ch) {
+ return QChar::toLower(ch);
+ }
+ inline UChar32 u_toupper(UChar32 ch) {
+ return QChar::toUpper(ch);
+ }
}
+using Unicode::u_toupper;
+using Unicode::u_tolower;
+
+#define U16_IS_LEAD(ch) QChar::isHighSurrogate((ch))
+#define U16_IS_TRAIL(ch) QChar::isLowSurrogate((ch))
+#define U16_GET_SUPPLEMENTARY(lead, trail) static_cast<UChar32>(QChar::surrogateToUcs4((lead), (trail)))
+#define U_IS_BMP(ch) ((ch) < 0x10000)
+#define U16_LENGTH(c) ((uint32_t)(c)<=0xffff ? 1 : 2)
+#define UCHAR_MAX_VALUE 0x10ffff
+
+#define U_MASK(category) (1u << (category))
+#define U_GET_GC_MASK(c) U_MASK(QChar::category((c)))
+#define U_GC_L_MASK (U_GC_LU_MASK|U_GC_LL_MASK|U_GC_LT_MASK|U_GC_LM_MASK|U_GC_LO_MASK)
+#define U_GC_LU_MASK U_MASK(QChar::Letter_Uppercase)
+#define U_GC_LL_MASK U_MASK(QChar::Letter_Lowercase)
+#define U_GC_LT_MASK U_MASK(QChar::Letter_Titlecase)
+#define U_GC_LM_MASK U_MASK(QChar::Letter_Modifier)
+#define U_GC_LO_MASK U_MASK(QChar::Letter_Other)
+#define U_GC_MN_MASK U_MASK(QChar::Mark_NonSpacing)
+#define U_GC_MC_MASK U_MASK(QChar::Mark_SpacingCombining)
+#define U_GC_ND_MASK U_MASK(QChar::Number_DecimalDigit)
+#define U_GC_PC_MASK U_MASK(QChar::Punctuation_Connector)
+
#endif // UNICODE_H
diff --git a/src/3rdparty/masm/stubs/wtf/unicode/utypes.h b/src/3rdparty/masm/stubs/wtf/unicode/utypes.h
new file mode 100644
index 0000000000..e1b4ff90a6
--- /dev/null
+++ b/src/3rdparty/masm/stubs/wtf/unicode/utypes.h
@@ -0,0 +1 @@
+#include <unicode/Unicode.h>
diff --git a/src/3rdparty/masm/stubs/yarr/YarrUnicodeProperties.cpp b/src/3rdparty/masm/stubs/yarr/YarrUnicodeProperties.cpp
new file mode 100644
index 0000000000..99c925f406
--- /dev/null
+++ b/src/3rdparty/masm/stubs/yarr/YarrUnicodeProperties.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQml module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "config.h"
+#include "yarr/YarrUnicodeProperties.h"
+#include "qchar.h"
+
+#include "yarr/Yarr.h"
+#include "yarr/YarrPattern.h"
+
+using namespace WTF;
+
+namespace JSC { namespace Yarr {
+
+std::optional<BuiltInCharacterClassID> unicodeMatchPropertyValue(WTF::String unicodePropertyName, WTF::String unicodePropertyValue)
+{
+ Q_UNUSED(unicodePropertyName);
+ Q_UNUSED(unicodePropertyValue);
+ return std::nullopt;
+}
+
+std::optional<BuiltInCharacterClassID> unicodeMatchProperty(WTF::String unicodePropertyValue)
+{
+ Q_UNUSED(unicodePropertyValue);
+ return std::nullopt;
+}
+
+std::unique_ptr<CharacterClass> createUnicodeCharacterClassFor(BuiltInCharacterClassID unicodeClassID)
+{
+ Q_UNUSED(unicodeClassID);
+ return nullptr;
+}
+
+} } // namespace JSC::Yarr