aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compileddata.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-30 15:41:24 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-02 16:07:33 +0200
commit1e454c8aa6ad0782eee1c8c94ac2780954a08351 (patch)
treee3be185e878972ff018e9610fea15248877ca499 /src/qml/compiler/qv4compileddata.cpp
parent430dfd326cb9d8dab8ebd11e83dd52e6d55c4229 (diff)
Remove more uses of Value
Change-Id: I889e760f75b485a28e1f2a2c26b2337ae9bfafac Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4compileddata.cpp')
-rw-r--r--src/qml/compiler/qv4compileddata.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp
index 4139a7ee0d..5c1c41814d 100644
--- a/src/qml/compiler/qv4compileddata.cpp
+++ b/src/qml/compiler/qv4compileddata.cpp
@@ -81,9 +81,9 @@ QV4::Function *CompilationUnit::linkToEngine(ExecutionEngine *engine)
for (int i = 0; i < data->stringTableSize; ++i)
runtimeStrings[i] = engine->newIdentifier(data->stringAt(i));
- runtimeRegularExpressions = new QV4::Value[data->regexpTableSize];
+ runtimeRegularExpressions = new QV4::SafeValue[data->regexpTableSize];
// memset the regexps to 0 in case a GC run happens while we're within the loop below
- memset(runtimeRegularExpressions, 0, data->regexpTableSize * sizeof(QV4::Value));
+ memset(runtimeRegularExpressions, 0, data->regexpTableSize * sizeof(QV4::SafeValue));
for (int i = 0; i < data->regexpTableSize; ++i) {
const CompiledData::RegExp *re = data->regexpAt(i);
int flags = 0;
@@ -93,8 +93,7 @@ QV4::Function *CompilationUnit::linkToEngine(ExecutionEngine *engine)
flags |= QQmlJS::V4IR::RegExp::RegExp_IgnoreCase;
if (re->flags & CompiledData::RegExp::RegExp_Multiline)
flags |= QQmlJS::V4IR::RegExp::RegExp_Multiline;
- QV4::RegExpObject *obj = engine->newRegExpObject(data->stringAt(re->stringIndex), flags)->getPointer();
- runtimeRegularExpressions[i] = QV4::Value::fromObject(obj);
+ runtimeRegularExpressions[i] = engine->newRegExpObject(data->stringAt(re->stringIndex), flags);
}
if (data->lookupTableSize) {