aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4function_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4function_p.h')
-rw-r--r--src/qml/jsruntime/qv4function_p.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4function_p.h b/src/qml/jsruntime/qv4function_p.h
index aeef9ad61b..54d0528c42 100644
--- a/src/qml/jsruntime/qv4function_p.h
+++ b/src/qml/jsruntime/qv4function_p.h
@@ -51,7 +51,9 @@
//
#include "qv4global_p.h"
+#include <private/qqmlglobal_p.h>
#include <private/qv4compileddata_p.h>
+#include <private/qv4context_p.h>
QT_BEGIN_NAMESPACE
@@ -68,6 +70,8 @@ struct Q_QML_EXPORT Function {
InternalClass *internalClass;
uint nFormals;
bool activationRequired;
+ bool hasQmlDependencies;
+ bool canUseSimpleCall;
Function(ExecutionEngine *engine, CompiledData::CompilationUnit *unit, const CompiledData::Function *function,
ReturnedValue (*codePtr)(ExecutionEngine *, const uchar *));
@@ -88,8 +92,22 @@ struct Q_QML_EXPORT Function {
inline bool needsActivation() const
{ return activationRequired; }
+ inline bool canUseSimpleFunction() const { return canUseSimpleCall; }
+
+ QQmlSourceLocation sourceLocation() const
+ {
+ return QQmlSourceLocation(sourceFile(), compiledFunction->location.line, compiledFunction->location.column);
+ }
+
};
+
+inline unsigned int Heap::CallContext::formalParameterCount() const
+{
+ return v4Function ? v4Function->nFormals : 0;
+}
+
+
}
QT_END_NAMESPACE