diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-08-08 13:15:40 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-08-15 14:24:23 +0000 |
commit | a1964f0b8e0569ef9ab754e2ec4c4d0559bc7681 (patch) | |
tree | 36416a7583527d87409ce0f9152687750a265e03 /src/qml/compiler/qv4compileddata_p.h | |
parent | 15f56b74dc18c1105c9943f76599dbab5214b8e8 (diff) |
Cleanup RegExpObject
Move properties from RegExpObject to getters in RegExp.prototype
to be compliant with the JS spec.
Implement support for the sticky flags ('y') and correctly parse
the flags in the RegExp constructor.
Change-Id: I5cf05d14e8139cf30d46235b8d466fb96084fcb7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index 4b0e6422bb..7581fe3fff 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -137,15 +137,17 @@ static_assert(sizeof(Location) == 4, "Location structure needs to have the expec struct RegExp { enum Flags : unsigned int { + RegExp_NoFlags = 0x0, RegExp_Global = 0x01, RegExp_IgnoreCase = 0x02, RegExp_Multiline = 0x04, - RegExp_Unicode = 0x08 + RegExp_Unicode = 0x08, + RegExp_Sticky = 0x10 }; union { quint32 _dummy; - quint32_le_bitfield<0, 4> flags; - quint32_le_bitfield<4, 28> stringIndex; + quint32_le_bitfield<0, 5> flags; + quint32_le_bitfield<5, 27> stringIndex; }; RegExp() : _dummy(0) { } |