summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptvalue_p.h
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-10-22 16:27:50 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-10-23 10:18:24 (GMT)
commitd610da0f40819213fd45bf77f6c2131769df693d (patch)
tree42c45c142cf57554a5600b1fdc87be5cb765a04b /src/script/api/qscriptvalue_p.h
parent7bfa219ebd050523ecd0d72ad7154e1ce3b83ae9 (diff)
downloadQt-d610da0f40819213fd45bf77f6c2131769df693d.zip
Qt-d610da0f40819213fd45bf77f6c2131769df693d.tar.gz
Qt-d610da0f40819213fd45bf77f6c2131769df693d.tar.bz2
Inline internal property lookup function
Also avoid looking up the object's own properties twice (before we called getOwnPropertySlot() and then getPropertySlot() on the same object). Makes QScriptValue::property() ~20% faster when calling it on an "empty" object. Reviewed-by: Olivier Goffart
Diffstat (limited to 'src/script/api/qscriptvalue_p.h')
-rw-r--r--src/script/api/qscriptvalue_p.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h
index 9634515..b87b485 100644
--- a/src/script/api/qscriptvalue_p.h
+++ b/src/script/api/qscriptvalue_p.h
@@ -100,8 +100,10 @@ public:
return QScriptValue(d);
}
- QScriptValue property(const JSC::Identifier &id, int resolveMode) const;
- QScriptValue property(quint32 index, int resolveMode) const;
+ inline QScriptValue property(const JSC::Identifier &id, int resolveMode) const;
+ QScriptValue propertyHelper(const JSC::Identifier &id, int resolveMode) const;
+ inline QScriptValue property(quint32 index, int resolveMode) const;
+ QScriptValue propertyHelper(quint32, int resolveMode) const;
inline QScriptValue property(const QString &, int resolveMode) const;
void setProperty(const JSC::Identifier &id, const QScriptValue &value,
const QScriptValue::PropertyFlags &flags);