aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-01-13 17:22:08 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2015-01-16 21:12:57 +0100
commit498d4322ce87b20a798d4c9fbf4f7d84c1730486 (patch)
treef2bd8763b894d3a50f2007a1af8df03a0c3fa83d /src
parent8ffb79bbd214c239e414dc4e9cf4569b3219bdab (diff)
Don't require an ExecutionEngine member in String anymore
Change-Id: I7c1a5471507669871564d79dc17d1026c268b6d0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/qml/jsapi/qjsvalue.cpp4
-rw-r--r--src/qml/jsruntime/qv4context.cpp4
-rw-r--r--src/qml/jsruntime/qv4object.cpp12
-rw-r--r--src/qml/jsruntime/qv4string.cpp4
-rw-r--r--src/qml/jsruntime/qv4string_p.h6
-rw-r--r--src/qml/qml/qqmlxmlhttprequest.cpp4
6 files changed, 17 insertions, 17 deletions
diff --git a/src/qml/jsapi/qjsvalue.cpp b/src/qml/jsapi/qjsvalue.cpp
index a158d3ad72..0a29e7802c 100644
--- a/src/qml/jsapi/qjsvalue.cpp
+++ b/src/qml/jsapi/qjsvalue.cpp
@@ -974,7 +974,7 @@ QJSValue QJSValue::property(const QString& name) const
if (idx < UINT_MAX)
return property(idx);
- s->makeIdentifier();
+ s->makeIdentifier(engine);
QV4::ScopedValue result(scope, o->get(s));
if (engine->hasException)
result = engine->catchException();
@@ -1045,7 +1045,7 @@ void QJSValue::setProperty(const QString& name, const QJSValue& value)
return;
}
- s->makeIdentifier();
+ s->makeIdentifier(scope.engine);
QV4::ScopedValue v(scope, value.d->getValue(engine));
o->put(s, v);
if (engine->hasException)
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index 40c02ef4ee..408ccf051a 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -343,7 +343,7 @@ ReturnedValue ExecutionContext::getProperty(String *name)
{
Scope scope(this);
ScopedValue v(scope);
- name->makeIdentifier();
+ name->makeIdentifier(scope.engine);
if (name->equals(d()->engine->id_this))
return d()->callData->thisObject.asReturnedValue();
@@ -410,7 +410,7 @@ ReturnedValue ExecutionContext::getPropertyAndBase(String *name, Heap::Object **
Scope scope(this);
ScopedValue v(scope);
*base = (Heap::Object *)0;
- name->makeIdentifier();
+ name->makeIdentifier(scope.engine);
if (name->equals(d()->engine->id_this))
return d()->callData->thisObject.asReturnedValue();
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index d30c113c32..77ac2a6049 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -591,9 +591,9 @@ ReturnedValue Object::internalGet(String *name, bool *hasProperty)
if (idx != UINT_MAX)
return getIndexed(idx, hasProperty);
- name->makeIdentifier();
-
Scope scope(engine());
+ name->makeIdentifier(scope.engine);
+
ScopedObject o(scope, this);
while (o) {
uint idx = o->internalClass()->find(name);
@@ -656,7 +656,7 @@ void Object::internalPut(String *name, const ValueRef value)
if (idx != UINT_MAX)
return putIndexed(idx, value);
- name->makeIdentifier();
+ name->makeIdentifier(engine());
uint member = internalClass()->find(name);
Property *pd = 0;
@@ -813,7 +813,7 @@ bool Object::internalDeleteProperty(String *name)
if (idx != UINT_MAX)
return deleteIndexedProperty(idx);
- name->makeIdentifier();
+ name->makeIdentifier(engine());
uint memberIdx = internalClass()->find(name);
if (memberIdx != UINT_MAX) {
@@ -851,9 +851,9 @@ bool Object::__defineOwnProperty__(ExecutionEngine *engine, String *name, const
if (idx != UINT_MAX)
return __defineOwnProperty__(engine, idx, p, attrs);
- name->makeIdentifier();
-
Scope scope(engine);
+ name->makeIdentifier(scope.engine);
+
Property *current;
PropertyAttributes *cattrs;
uint memberIndex;
diff --git a/src/qml/jsruntime/qv4string.cpp b/src/qml/jsruntime/qv4string.cpp
index de5c7ffa24..7626d13c59 100644
--- a/src/qml/jsruntime/qv4string.cpp
+++ b/src/qml/jsruntime/qv4string.cpp
@@ -169,12 +169,12 @@ uint String::toUInt(bool *ok) const
return UINT_MAX;
}
-void String::makeIdentifierImpl() const
+void String::makeIdentifierImpl(ExecutionEngine *e) const
{
if (d()->largestSubLength)
d()->simplifyString();
Q_ASSERT(!d()->largestSubLength);
- engine()->identifierTable->identifier(this);
+ e->identifierTable->identifier(this);
}
void Heap::String::simplifyString() const
diff --git a/src/qml/jsruntime/qv4string_p.h b/src/qml/jsruntime/qv4string_p.h
index e70af2462a..249d9040b2 100644
--- a/src/qml/jsruntime/qv4string_p.h
+++ b/src/qml/jsruntime/qv4string_p.h
@@ -154,13 +154,13 @@ struct Q_QML_PRIVATE_EXPORT String : public Managed {
}
uint toUInt(bool *ok) const;
- void makeIdentifier() const {
+ void makeIdentifier(ExecutionEngine *e) const {
if (d()->identifier)
return;
- makeIdentifierImpl();
+ makeIdentifierImpl(e);
}
- void makeIdentifierImpl() const;
+ void makeIdentifierImpl(ExecutionEngine *e) const;
static uint createHashValue(const QChar *ch, int length);
static uint createHashValue(const char *ch, int length);
diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp
index f5451a2976..552fcd3975 100644
--- a/src/qml/qml/qqmlxmlhttprequest.cpp
+++ b/src/qml/qml/qqmlxmlhttprequest.cpp
@@ -904,7 +904,7 @@ ReturnedValue NamedNodeMap::get(Managed *m, String *name, bool *hasProperty)
NamedNodeMap *r = static_cast<NamedNodeMap *>(m);
QV4::ExecutionEngine *v4 = m->engine();
- name->makeIdentifier();
+ name->makeIdentifier(v4);
if (name->equals(v4->id_length))
return Primitive::fromInt32(r->d()->list.count()).asReturnedValue();
@@ -949,7 +949,7 @@ ReturnedValue NodeList::get(Managed *m, String *name, bool *hasProperty)
QV4::ExecutionEngine *v4 = m->engine();
NodeList *r = static_cast<NodeList *>(m);
- name->makeIdentifier();
+ name->makeIdentifier(v4);
if (name->equals(v4->id_length))
return Primitive::fromInt32(r->d()->d->children.count()).asReturnedValue();