aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4context_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-06-27 16:06:29 +0200
committerLars Knoll <lars.knoll@qt.io>2017-06-29 08:33:17 +0000
commitdfe826d7f86db99bd6ecf681ec73c2e8c8b25a15 (patch)
treee3a98ece0c3e5599a44bbfd817abe2932d4b9355 /src/qml/jsruntime/qv4context_p.h
parent987734ff5872c397651630a616a002947fec3810 (diff)
Switch over to new JS call setup
Differences: - push parameters on the stack, including space for CallData members - call instructions calculate the argument start - use temp space above the calldata to evaluate arguments - fewer temporaries are needed when a call is done while generating the arguments of another call - when calling the function, the js stack space above the callData is not used, allowing for optimizations in the future - Array and ObjectLiteral use the same mechanism Change-Id: Id100fa06f12cc9d941b0f90b0b81b8270a8e4f5d Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4context_p.h')
-rw-r--r--src/qml/jsruntime/qv4context_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4context_p.h b/src/qml/jsruntime/qv4context_p.h
index a854c324d0..5cf134bc70 100644
--- a/src/qml/jsruntime/qv4context_p.h
+++ b/src/qml/jsruntime/qv4context_p.h
@@ -92,6 +92,8 @@ struct CallData
Value thisObject;
Value args[1];
+
+ static constexpr int HeaderSize() { return offsetof(CallData, args)/sizeof(QV4::Value); }
};
Q_STATIC_ASSERT(std::is_standard_layout<CallData>::value);