aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4context_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4context_p.h')
-rw-r--r--src/qml/jsruntime/qv4context_p.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4context_p.h b/src/qml/jsruntime/qv4context_p.h
index ea2d266146..48319c7444 100644
--- a/src/qml/jsruntime/qv4context_p.h
+++ b/src/qml/jsruntime/qv4context_p.h
@@ -154,6 +154,10 @@ struct Q_QML_EXPORT ExecutionContext : public Managed
inline CallContext *asCallContext();
inline const CallContext *asCallContext() const;
+ inline const CatchContext *asCatchContext() const;
+ inline const WithContext *asWithContext() const;
+
+ Heap::FunctionObject *getFunctionObject() const;
static void markObjects(Heap::Base *m, ExecutionEngine *e);
};
@@ -202,6 +206,16 @@ inline const CallContext *ExecutionContext::asCallContext() const
return d()->type >= Heap::ExecutionContext::Type_SimpleCallContext ? static_cast<const CallContext *>(this) : 0;
}
+inline const CatchContext *ExecutionContext::asCatchContext() const
+{
+ return d()->type == Heap::ExecutionContext::Type_CatchContext ? static_cast<const CatchContext *>(this) : 0;
+}
+
+inline const WithContext *ExecutionContext::asWithContext() const
+{
+ return d()->type == Heap::ExecutionContext::Type_WithContext ? static_cast<const WithContext *>(this) : 0;
+}
+
/* Function *f, int argc */
#define requiredMemoryForExecutionContect(f, argc) \
((sizeof(CallContext::Data) + 7) & ~7) + sizeof(Value) * (f->varCount() + qMax((uint)argc, f->formalParameterCount())) + sizeof(CallData)