From 3f1d0b27a11a1d560c11057d2a801224d1613d60 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 23 Jul 2014 13:56:43 +0200 Subject: Changed Value to store Managed::Data pointers directly This is a step towards storing direct heap object pointers for the values on the JS stack, to avoid the costly indirection for data access. Change-Id: Ibb57ed6cf52a7088bbc95ee04ae3a4cb25b8c045 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4regexp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4regexp.cpp') diff --git a/src/qml/jsruntime/qv4regexp.cpp b/src/qml/jsruntime/qv4regexp.cpp index e84c96f417..ed672892c2 100644 --- a/src/qml/jsruntime/qv4regexp.cpp +++ b/src/qml/jsruntime/qv4regexp.cpp @@ -73,7 +73,8 @@ RegExp* RegExp::create(ExecutionEngine* engine, const QString& pattern, bool ign return result; } - RegExp *result = engine->memoryManager->alloc(engine, pattern, ignoreCase, multiline); + Scope scope(engine); + Scoped result(scope, engine->memoryManager->alloc(engine, pattern, ignoreCase, multiline)); if (!cache) cache = engine->regExpCache = new RegExpCache; -- cgit v1.2.3