aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4context_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-30 14:14:00 +0200
committerLars Knoll <lars.knoll@qt.io>2017-09-01 12:30:23 +0000
commitede52ec76ed0939ce41bb81843dc750241c6e78f (patch)
treecb39f94e9a5eb3a948d18bc1cb90e1c975c8636c /src/qml/jsruntime/qv4context_p.h
parent3bb642089b736b1ca1c0f722af2dc18bed3e068b (diff)
Add the current context and function object to CallData
Like this we can avoid creating Scope's when calling functions. Change-Id: I59b82c85eafd3a5437c233aba5f2e8330d5ce104 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4context_p.h')
-rw-r--r--src/qml/jsruntime/qv4context_p.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4context_p.h b/src/qml/jsruntime/qv4context_p.h
index f5ecc3ba1d..fdfcc7a345 100644
--- a/src/qml/jsruntime/qv4context_p.h
+++ b/src/qml/jsruntime/qv4context_p.h
@@ -88,6 +88,8 @@ struct CallData
return i < argc ? args[i].asReturnedValue() : Primitive::undefinedValue().asReturnedValue();
}
+ Value function;
+ Value dummy_context;
Value thisObject;
Value args[1];
@@ -95,8 +97,8 @@ struct CallData
};
Q_STATIC_ASSERT(std::is_standard_layout<CallData>::value);
-Q_STATIC_ASSERT(offsetof(CallData, thisObject) == 8);
-Q_STATIC_ASSERT(offsetof(CallData, args) == 16);
+Q_STATIC_ASSERT(offsetof(CallData, thisObject) == 3*sizeof(Value));
+Q_STATIC_ASSERT(offsetof(CallData, args) == 4*sizeof(Value));
namespace Heap {