summaryrefslogtreecommitdiff
path: root/src/qml/jsruntime/qv4object.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-05-19 15:50:22 +0200
committerLars Knoll <lars.knoll@qt.io>2017-05-19 18:54:54 +0000
commit8bc243f569e3feb1005fbca426bf24f59c38af2e (patch)
tree3e69253b161432e4a02c3daa2de4ffbd2d9293f4 /src/qml/jsruntime/qv4object.cpp
parent5bc38a50308665bdc185eb96dbcc9ba7948ab4e0 (diff)
downloadqtdeclarative-8bc243f569e3feb1005fbca426bf24f59c38af2e.tar.gz
Move the engine() accessor from Object to Managed
We can easily do this now that Managed has a pointer to an internal class (which always has a back pointer to the ExecutionEngine). Remove the extra engine pointer from ExecutionContext, and clean up tow methods in String. Change-Id: I98d750b1afbdeadf42e66ae0c92c48db1a7adc31 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r--src/qml/jsruntime/qv4object.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index 04336d4f88..98f5c7464f 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -254,7 +254,7 @@ void Object::getOwnProperty(String *name, PropertyAttributes *attrs, Property *p
if (idx != UINT_MAX)
return getOwnProperty(idx, attrs, p);
- name->makeIdentifier(engine());
+ name->makeIdentifier();
Identifier *id = name->identifier();
uint member = internalClass()->find(id);
@@ -299,7 +299,7 @@ Value *Object::getValueOrSetter(String *name, PropertyAttributes *attrs)
{
Q_ASSERT(name->asArrayIndex() == UINT_MAX);
- name->makeIdentifier(engine());
+ name->makeIdentifier();
Identifier *id = name->identifier();
Heap::Object *o = d();
@@ -377,7 +377,7 @@ bool Object::hasOwnProperty(String *name) const
if (idx != UINT_MAX)
return hasOwnProperty(idx);
- name->makeIdentifier(engine());
+ name->makeIdentifier();
Identifier *id = name->identifier();
if (internalClass()->find(id) < UINT_MAX)
@@ -437,7 +437,7 @@ PropertyAttributes Object::query(const Managed *m, String *name)
if (idx != UINT_MAX)
return queryIndexed(m, idx);
- name->makeIdentifier(m->internalClass()->engine);
+ name->makeIdentifier();
Identifier *id = name->identifier();
const Object *o = static_cast<const Object *>(m);
@@ -640,10 +640,10 @@ ReturnedValue Object::internalGet(String *name, bool *hasProperty) const
if (idx != UINT_MAX)
return getIndexed(idx, hasProperty);
- Scope scope(engine());
- name->makeIdentifier(scope.engine);
+ name->makeIdentifier();
Identifier *id = name->identifier();
+ Scope scope(engine());
ScopedObject o(scope, this);
while (o) {
uint idx = o->internalClass()->find(id);
@@ -708,7 +708,7 @@ void Object::internalPut(String *name, const Value &value)
if (idx != UINT_MAX)
return putIndexed(idx, value);
- name->makeIdentifier(engine());
+ name->makeIdentifier();
Identifier *id = name->identifier();
uint member = internalClass()->find(id);
@@ -862,7 +862,7 @@ bool Object::internalDeleteProperty(String *name)
if (idx != UINT_MAX)
return deleteIndexedProperty(idx);
- name->makeIdentifier(engine());
+ name->makeIdentifier();
uint memberIdx = internalClass()->find(name->identifier());
if (memberIdx != UINT_MAX) {
@@ -901,7 +901,7 @@ bool Object::__defineOwnProperty__(ExecutionEngine *engine, String *name, const
return __defineOwnProperty__(engine, idx, p, attrs);
Scope scope(engine);
- name->makeIdentifier(scope.engine);
+ name->makeIdentifier();
uint memberIndex;