aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4regexpobject_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-02 14:25:15 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-02 17:27:36 +0200
commitea0ea907edbe7dd0c65f10752d7df1de6f0fd63b (patch)
treec9e0641d43cd19dfc3ad022c34e196592e22a6cb /src/qml/jsruntime/qv4regexpobject_p.h
parent6359ab63cd9c730a168e8b8da4c275e2d03d25d5 (diff)
Optimize String.replace and RegExp.exec
This speeds up the v8 regexp benchmark by a factor 2.5 :) Change-Id: Ibd6b18ee28181aa712429cbec4598984e0c69820 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4regexpobject_p.h')
-rw-r--r--src/qml/jsruntime/qv4regexpobject_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4regexpobject_p.h b/src/qml/jsruntime/qv4regexpobject_p.h
index c95c00bbf6..80868d90db 100644
--- a/src/qml/jsruntime/qv4regexpobject_p.h
+++ b/src/qml/jsruntime/qv4regexpobject_p.h
@@ -74,6 +74,11 @@ struct RegExpObject: Object {
RegExp_Multiline = 0x04
};
+ enum {
+ Index_ArrayIndex = ArrayObject::LengthPropertyIndex + 1,
+ Index_ArrayInput = Index_ArrayIndex + 1
+ };
+
RegExp* value;
Property *lastIndexProperty(ExecutionContext *ctx);
bool global;