Rename IdentifierHash to IdentifierTable
authorLars Knoll <lars.knoll@digia.com>
Thu, 27 Jun 2013 06:57:47 +0000 (08:57 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 28 Jun 2013 12:56:11 +0000 (14:56 +0200)
Change-Id: Ifbf9e947c305e33def311b76a38af17dae90b46b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/qml/v4/qv4engine.cpp
src/qml/qml/v4/qv4engine_p.h
src/qml/qml/v4/qv4identifier_p.h
src/qml/qml/v4/qv4internalclass.cpp
src/qml/qml/v4/qv4string.cpp

index 3d2f79f..0139a05 100644 (file)
@@ -114,7 +114,7 @@ ExecutionEngine::ExecutionEngine(QQmlJS::EvalISelFactory *factory)
 
     memoryManager->setExecutionEngine(this);
 
-    identifierCache = new IdentifierHash(this);
+    identifierTable = new IdentifierTable(this);
 
     emptyClass =  new (classPool.allocate(sizeof(InternalClass))) InternalClass(this);
 
@@ -283,7 +283,7 @@ ExecutionEngine::~ExecutionEngine()
     delete memoryManager;
     delete m_qmlExtensions;
     emptyClass->destroy();
-    delete identifierCache;
+    delete identifierTable;
     delete bumperPointerAllocator;
     delete regExpCache;
     UnwindHelper::deregisterFunctions(functions);
@@ -430,7 +430,7 @@ String *ExecutionEngine::newString(const QString &s)
 
 String *ExecutionEngine::newIdentifier(const QString &text)
 {
-    return identifierCache->insert(text);
+    return identifierTable->insert(text);
 }
 
 Object *ExecutionEngine::newStringObject(const Value &value)
@@ -810,7 +810,7 @@ void ExecutionEngine::requireArgumentsAccessors(int n)
 
 void ExecutionEngine::markObjects()
 {
-    identifierCache->mark();
+    identifierTable->mark();
 
     globalObject->mark();
 
index b861994..090ae95 100644 (file)
@@ -100,7 +100,7 @@ struct URIErrorPrototype;
 struct VariantPrototype;
 struct SequencePrototype;
 struct EvalFunction;
-struct IdentifierHash;
+struct IdentifierTable;
 struct InternalClass;
 class MultiplyWrappedQObjectMap;
 class RegExp;
@@ -119,7 +119,7 @@ struct Q_QML_EXPORT ExecutionEngine
 
     WTF::BumpPointerAllocator *bumperPointerAllocator; // Used by Yarr Regex engine.
 
-    IdentifierHash *identifierCache;
+    IdentifierTable *identifierTable;
 
     QQmlJS::Debugging::Debugger *debugger;
 
index c4ae825..b778df8 100644 (file)
@@ -56,13 +56,13 @@ struct Identifier
 };
 
 
-struct IdentifierHash
+struct IdentifierTable
 {
     ExecutionEngine *engine;
     QHash<QString, String *> identifiers;
 public:
 
-    IdentifierHash(ExecutionEngine *engine) : engine(engine) {}
+    IdentifierTable(ExecutionEngine *engine) : engine(engine) {}
 
     String *insert(const QString &s)
     {
index e590399..84b17a4 100644 (file)
@@ -181,7 +181,7 @@ InternalClass *InternalClass::addMember(String *string, PropertyAttributes data,
 {
 //    qDebug() << "InternalClass::addMember()" << string->toQString() << size << hex << (uint)data.m_all << data.type();
     data.resolve();
-    engine->identifierCache->toIdentifier(string);
+    engine->identifierTable->toIdentifier(string);
 
     if (propertyTable.lookup(string->identifier) < size)
         return changeMember(string, data, index);
@@ -237,7 +237,7 @@ void InternalClass::removeMember(Object *object, Identifier *id)
 
 uint InternalClass::find(String *string)
 {
-    engine->identifierCache->toIdentifier(string);
+    engine->identifierTable->toIdentifier(string);
     const Identifier *id = string->identifier;
 
     uint index = propertyTable.lookup(id);
index 966da14..ad321bc 100644 (file)
@@ -210,7 +210,7 @@ uint String::toUInt(bool *ok) const
 
 void String::makeIdentifierImpl()
 {
-    engine()->identifierCache->toIdentifier(this);
+    engine()->identifierTable->toIdentifier(this);
 }
 
 void String::createHashValue() const