aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4regexp_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-05-06 08:46:56 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2014-07-22 13:49:11 +0200
commitf3f31957b79c55f3e076473b0d4c41c8872535b3 (patch)
tree11ff071e0db3708b3970000a536f67fa911d02fe /src/qml/jsruntime/qv4regexp_p.h
parente391b6f08405a6a9d3470297fc5667f5c7a0c4a8 (diff)
Convert QV4RegExp to new storage scheme
Change-Id: Ic752b880ce3dfcb59f807794f0f54fb8ed0e61bf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4regexp_p.h')
-rw-r--r--src/qml/jsruntime/qv4regexp_p.h36
1 files changed, 23 insertions, 13 deletions
diff --git a/src/qml/jsruntime/qv4regexp_p.h b/src/qml/jsruntime/qv4regexp_p.h
index 270fe9aa2d..15086181a2 100644
--- a/src/qml/jsruntime/qv4regexp_p.h
+++ b/src/qml/jsruntime/qv4regexp_p.h
@@ -93,10 +93,7 @@ public:
class RegExp : public Managed
{
- V4_MANAGED
- Q_MANAGED_TYPE(RegExp)
-
- struct Data {
+ struct Data : Managed::Data {
QString pattern;
OwnPtr<JSC::Yarr::BytecodePattern> byteCode;
#if ENABLE(YARR_JIT)
@@ -107,22 +104,35 @@ class RegExp : public Managed
bool ignoreCase;
bool multiLine;
};
- Data data;
+ struct {
+ QString pattern;
+ OwnPtr<JSC::Yarr::BytecodePattern> byteCode;
+#if ENABLE(YARR_JIT)
+ JSC::Yarr::YarrCodeBlock jitCode;
+#endif
+ RegExpCache *cache;
+ int subPatternCount;
+ bool ignoreCase;
+ bool multiLine;
+ } __data;
+ V4_MANAGED_NEW
+ Q_MANAGED_TYPE(RegExp)
+
- QString pattern() const { return data.pattern; }
- OwnPtr<JSC::Yarr::BytecodePattern> &byteCode() { return data.byteCode; }
+ QString pattern() const { return d()->pattern; }
+ OwnPtr<JSC::Yarr::BytecodePattern> &byteCode() { return d()->byteCode; }
#if ENABLE(YARR_JIT)
- JSC::Yarr::YarrCodeBlock jitCode() const { return data.jitCode; }
+ JSC::Yarr::YarrCodeBlock jitCode() const { return d()->jitCode; }
#endif
- RegExpCache *cache() const { return data.cache; }
- int subPatternCount() const { return data.subPatternCount; }
- bool ignoreCase() const { return data.ignoreCase; }
- bool multiLine() const { return data.multiLine; }
+ RegExpCache *cache() const { return d()->cache; }
+ int subPatternCount() const { return d()->subPatternCount; }
+ bool ignoreCase() const { return d()->ignoreCase; }
+ bool multiLine() const { return d()->multiLine; }
static RegExp* create(ExecutionEngine* engine, const QString& pattern, bool ignoreCase = false, bool multiline = false);
~RegExp();
- bool isValid() const { return data.byteCode.get(); }
+ bool isValid() const { return d()->byteCode.get(); }
uint match(const QString& string, int start, uint *matchOffsets);