diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-06-14 11:52:30 +1000 |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-06-14 11:52:30 +1000 |
commit | 49cc32e6c91b0ebe935810f3d5d581e6e8dfcc46 (patch) | |
tree | d60553b9c17c424a264333ff2183d0db39d40ab2 /src/declarative/qml/v8/qv8engine_p.h | |
parent | 797be6d11b0bfe6c46b4e69cd6933990925b6093 (diff) |
Add QHashedV8String to improve lookup performance
Also inline QV8QObjectWrapper::getProperty() which significantly
improves context lookups which contain a lot of QObject property
lookup misses.
Diffstat (limited to 'src/declarative/qml/v8/qv8engine_p.h')
-rw-r--r-- | src/declarative/qml/v8/qv8engine_p.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/declarative/qml/v8/qv8engine_p.h b/src/declarative/qml/v8/qv8engine_p.h index 7398944ff5..b29f465e95 100644 --- a/src/declarative/qml/v8/qv8engine_p.h +++ b/src/declarative/qml/v8/qv8engine_p.h @@ -429,12 +429,9 @@ v8::Handle<v8::Value> QV8Engine::newValueType(const QVariant &value, QDeclarativ // unqualified name in QV8ContextWrapper. bool QV8Engine::startsWithUpper(v8::Handle<v8::String> string) { - uint16_t buffer[2]; - int written = string->Write(buffer, 0, 1); - if (written == 0) return false; - uint16_t c = buffer[0]; - return ((c != '_' ) && (!(c >= 'a' && c <= 'z')) && - ((c >= 'A' && c <= 'Z') || QChar::category(c) == QChar::Letter_Uppercase)); + uint16_t c = string->GetCharacter(0); + return (c >= 'A' && c <= 'Z') || + (c > 127 && QChar::category(c) == QChar::Letter_Uppercase); } QV8Engine::Deletable *QV8Engine::extensionData(int index) const |