Remove context argument from String::makeIdentifier()
authorLars Knoll <lars.knoll@digia.com>
Fri, 21 Jun 2013 22:16:40 +0000 (00:16 +0200)
committerSimon Hausmann <simon.hausmann@digia.com>
Sat, 22 Jun 2013 19:56:37 +0000 (21:56 +0200)
Change-Id: I7c02301499cb1a6895e94beb40ec35c2094bb999
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/qml/qqmlxmlhttprequest.cpp
src/qml/qml/v4/qv4context.cpp
src/qml/qml/v4/qv4object.cpp
src/qml/qml/v4/qv4string.cpp
src/qml/qml/v4/qv4string_p.h
src/qml/qml/v8/qjsvalue.cpp

index 8b6471f..aec4949 100644 (file)
@@ -868,7 +868,7 @@ Value NamedNodeMap::get(Managed *m, String *name, bool *hasProperty)
     if (!r)
         v4->current->throwTypeError();
 
-    name->makeIdentifier(v4->current);
+    name->makeIdentifier();
     if (name->isEqualTo(v4->id_length))
         return Value::fromInt32(r->list.count());
 
@@ -923,7 +923,7 @@ Value NodeList::get(Managed *m, String *name, bool *hasProperty)
     if (!r)
         v4->current->throwTypeError();
 
-    name->makeIdentifier(v4->current);
+    name->makeIdentifier();
 
     if (name->isEqualTo(v4->id_length))
         return Value::fromInt32(r->d->children.count());
index 7ab493c..354595f 100644 (file)
@@ -350,7 +350,7 @@ void ExecutionContext::setProperty(String *name, const Value& value)
 
 Value ExecutionContext::getProperty(String *name)
 {
-    name->makeIdentifier(this);
+    name->makeIdentifier();
 
     if (name->isEqualTo(engine->id_this))
         return thisObject;
@@ -412,7 +412,7 @@ Value ExecutionContext::getProperty(String *name)
 
 Value ExecutionContext::getPropertyNoThrow(String *name)
 {
-    name->makeIdentifier(this);
+    name->makeIdentifier();
 
     if (name->isEqualTo(engine->id_this))
         return thisObject;
@@ -474,7 +474,7 @@ Value ExecutionContext::getPropertyNoThrow(String *name)
 Value ExecutionContext::getPropertyAndBase(String *name, Object **base)
 {
     *base = 0;
-    name->makeIdentifier(this);
+    name->makeIdentifier();
 
     if (name->isEqualTo(engine->id_this))
         return thisObject;
index f542f34..639cb4f 100644 (file)
@@ -588,7 +588,7 @@ Value Object::internalGet(String *name, bool *hasProperty)
     if (idx != UINT_MAX)
         return getIndexed(idx, hasProperty);
 
-    name->makeIdentifier(engine()->current);
+    name->makeIdentifier();
 
     Object *o = this;
     while (o) {
@@ -651,7 +651,7 @@ void Object::internalPut(String *name, const Value &value)
     if (idx != UINT_MAX)
         return putIndexed(idx, value);
 
-    name->makeIdentifier(engine()->current);
+    name->makeIdentifier();
 
     uint member = internalClass->find(name);
     Property *pd = 0;
@@ -802,7 +802,7 @@ bool Object::internalDeleteProperty(String *name)
     if (idx != UINT_MAX)
         return deleteIndexedProperty(idx);
 
-    name->makeIdentifier(engine()->current);
+    name->makeIdentifier();
 
     uint memberIdx = internalClass->find(name);
     if (memberIdx != UINT_MAX) {
@@ -851,7 +851,7 @@ bool Object::__defineOwnProperty__(ExecutionContext *ctx, String *name, const Pr
     if (idx != UINT_MAX)
         return __defineOwnProperty__(ctx, idx, p, attrs);
 
-    name->makeIdentifier(ctx);
+    name->makeIdentifier();
 
     Property *current;
     PropertyAttributes *cattrs;
index c9e6657..8807326 100644 (file)
@@ -208,9 +208,9 @@ uint String::toUInt(bool *ok) const
     return UINT_MAX;
 }
 
-void String::makeIdentifierImpl(const ExecutionContext *ctx)
+void String::makeIdentifierImpl()
 {
-    ctx->engine->identifierCache->toIdentifier(this);
+    engine()->identifierCache->toIdentifier(this);
 }
 
 void String::createHashValue() const
index 2a855a2..437b5fb 100644 (file)
@@ -99,13 +99,13 @@ struct Q_QML_EXPORT String : public Managed {
     }
     uint toUInt(bool *ok) const;
 
-    void makeIdentifier(const ExecutionContext *ctx) {
+    void makeIdentifier() {
         if (identifier != UINT_MAX)
             return;
-        makeIdentifierImpl(ctx);
+        makeIdentifierImpl();
     }
 
-    void makeIdentifierImpl(const ExecutionContext *ctx);
+    void makeIdentifierImpl();
 
     void createHashValue() const;
     static uint createHashValue(const QChar *ch, int length);
index e45a221..036cdc8 100644 (file)
@@ -800,7 +800,7 @@ QJSValue QJSValue::property(const QString& name) const
     if (idx < UINT_MAX)
         return property(idx);
 
-    s->makeIdentifier(engine->current);
+    s->makeIdentifier();
     QV4::ExecutionContext *ctx = engine->current;
     try {
         QV4::Value v = o->get(s);
@@ -871,7 +871,7 @@ void QJSValue::setProperty(const QString& name, const QJSValue& value)
     }
 
     QV4::ExecutionContext *ctx = engine->current;
-    s->makeIdentifier(ctx);
+    s->makeIdentifier();
     try {
         o->put(s, value.d->getValue(engine));
     } catch (QV4::Exception &e) {