aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/jsruntime/qv4engine.cpp12
-rw-r--r--src/qml/jsruntime/qv4engine_p.h1
-rw-r--r--src/qml/jsruntime/qv4regexpobject.cpp2
3 files changed, 14 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 5c7caca477..1ffb3344bc 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -219,6 +219,7 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory)
stringClass = InternalClass::create(this, String::staticVTable(), 0);
regExpValueClass = InternalClass::create(this, RegExp::staticVTable(), 0);
+ id_empty = newIdentifier(QString());
id_undefined = newIdentifier(QStringLiteral("undefined"));
id_null = newIdentifier(QStringLiteral("null"));
id_true = newIdentifier(QStringLiteral("true"));
@@ -830,11 +831,22 @@ void ExecutionEngine::markObjects()
c = c->parent;
}
+ id_empty->mark(this);
+ id_undefined->mark(this);
+ id_null->mark(this);
+ id_true->mark(this);
+ id_false->mark(this);
+ id_boolean->mark(this);
+ id_number->mark(this);
+ id_string->mark(this);
+ id_object->mark(this);
+ id_function->mark(this);
id_length->mark(this);
id_prototype->mark(this);
id_constructor->mark(this);
id_arguments->mark(this);
id_caller->mark(this);
+ id_callee->mark(this);
id_this->mark(this);
id___proto__->mark(this);
id_enumerable->mark(this);
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index 6bfdf1f5a1..6ad822d3b4 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -234,6 +234,7 @@ public:
Property *argumentsAccessors;
int nArgumentsAccessors;
+ StringValue id_empty;
StringValue id_undefined;
StringValue id_null;
StringValue id_true;
diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp
index daf85c0f7d..956d1c594e 100644
--- a/src/qml/jsruntime/qv4regexpobject.cpp
+++ b/src/qml/jsruntime/qv4regexpobject.cpp
@@ -243,7 +243,7 @@ RegExpCtor::RegExpCtor(ExecutionContext *scope)
void RegExpCtor::clearLastMatch()
{
lastMatch = Primitive::nullValue();
- lastInput = engine()->newIdentifier(QString());
+ lastInput = engine()->id_empty;
lastMatchStart = 0;
lastMatchEnd = 0;
}