summaryrefslogtreecommitdiff
path: root/src/script/bridge
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-08-13 10:39:28 +0200
committerOlivier Goffart <ogoffart@trolltech.com>2009-08-13 15:24:12 +0200
commit04ac768f2ac5e3800893370c13c261a075a723ff (patch)
treea14a6c9580cde04bb962c350b9667d4510e66972 /src/script/bridge
parent88c6dc6ec7f73de279703b30874b30511901854b (diff)
downloadqt4-tools-04ac768f2ac5e3800893370c13c261a075a723ff.tar.gz
Lazily construct the QScriptActivationObject
We can store flags on the ReturnValueRegister entry in the stackframe header (as native function don't use that) Then when requesting an activation object we can lookup the flags to know if we should create it. This reduce a lot the cost of a native call. Reviewed-by: Kent Hansen
Diffstat (limited to 'src/script/bridge')
-rw-r--r--src/script/bridge/qscriptactivationobject_p.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/script/bridge/qscriptactivationobject_p.h b/src/script/bridge/qscriptactivationobject_p.h
index eb60ae5d37..8c62b23c95 100644
--- a/src/script/bridge/qscriptactivationobject_p.h
+++ b/src/script/bridge/qscriptactivationobject_p.h
@@ -74,12 +74,9 @@ public:
struct QScriptActivationObjectData : public JSVariableObjectData {
QScriptActivationObjectData(JSC::Register* registers)
- : JSVariableObjectData(&symbolTable, registers), calledAsConstructor(false)
+ : JSVariableObjectData(&symbolTable, registers)
{ }
JSC::SymbolTable symbolTable;
-
- //specifies if the context of this activation object is called as constructor
- bool calledAsConstructor;
};
QScriptActivationObjectData *d_ptr() const { return static_cast<QScriptActivationObjectData *>(d); }