diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-24 15:56:34 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-24 16:13:52 (GMT) |
commit | d6dca535c9620482d5f9d252a3d0c5dd292f6a0f (patch) | |
tree | edf08f428a382c5ccd052874c6b984d90507f06c /src/script/api/qscriptvalue.cpp | |
parent | f7ebdd380d16a7be9713930b5ab41c32e996dcdb (diff) | |
download | Qt-d6dca535c9620482d5f9d252a3d0c5dd292f6a0f.zip Qt-d6dca535c9620482d5f9d252a3d0c5dd292f6a0f.tar.gz Qt-d6dca535c9620482d5f9d252a3d0c5dd292f6a0f.tar.bz2 |
make some internal qtscript functions inline
Make it faster.
Diffstat (limited to 'src/script/api/qscriptvalue.cpp')
-rw-r--r-- | src/script/api/qscriptvalue.cpp | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index 5f11239..b0e09de 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -276,59 +276,6 @@ qsreal ToInteger(qsreal n) } // namespace QScript -QScriptValuePrivate::QScriptValuePrivate(QScriptEnginePrivate *e) - : engine(e), prev(0), next(0) -{ - ref = 0; -} - -QScriptValuePrivate::~QScriptValuePrivate() -{ - if (engine) - engine->unregisterScriptValue(this); -} - -void QScriptValuePrivate::initFrom(JSC::JSValue value) -{ - if (value.isCell()) { - Q_ASSERT(engine != 0); - value = engine->toUsableValue(value); - JSC::JSCell *cell = JSC::asCell(value); - Q_ASSERT(cell != engine->originalGlobalObject()); - } - type = JSC; - jscValue = value; - if (engine) - engine->registerScriptValue(this); -} - -void QScriptValuePrivate::initFrom(double value) -{ - type = Number; - numberValue = value; - if (engine) - engine->registerScriptValue(this); -} - -void QScriptValuePrivate::initFrom(const QString &value) -{ - type = String; - stringValue = value; - if (engine) - engine->registerScriptValue(this); -} - -bool QScriptValuePrivate::isJSC() const -{ - return (type == JSC); -} - -QScriptValue QScriptValuePrivate::property(const QString &name, int resolveMode) const -{ - JSC::ExecState *exec = engine->currentFrame; - return property(JSC::Identifier(exec, name), resolveMode); -} - QScriptValue QScriptValuePrivate::property(const JSC::Identifier &id, int resolveMode) const { Q_ASSERT(isJSC()); |