aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4functionobject_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2018-09-04 12:19:10 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2018-10-05 11:18:16 +0000
commit052d22e116957a170e290a49d077d3e9f290a237 (patch)
tree8d63f1b622a7c93d8b845c3d77f796f5ad18493b /src/qml/jsruntime/qv4functionobject_p.h
parent08342d761369c3755778f6d69fa6f5907ae1aead (diff)
ES7: Implement Tail Position Calls in the runtime
Change-Id: If1629109722496b3fd10b36b2376548440f2fee9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject_p.h')
-rw-r--r--src/qml/jsruntime/qv4functionobject_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h
index b08b333411..e03d49c74d 100644
--- a/src/qml/jsruntime/qv4functionobject_p.h
+++ b/src/qml/jsruntime/qv4functionobject_p.h
@@ -71,7 +71,8 @@ namespace Heap {
Member(class, Pointer, ExecutionContext *, scope) \
Member(class, NoMark, Function *, function) \
Member(class, NoMark, VTable::Call, jsCall) \
- Member(class, NoMark, VTable::CallAsConstructor, jsConstruct)
+ Member(class, NoMark, VTable::CallAsConstructor, jsConstruct) \
+ Member(class, NoMark, bool, canBeTailCalled)
DECLARE_HEAP_OBJECT(FunctionObject, Object) {
DECLARE_MARKOBJECTS(FunctionObject);
@@ -175,6 +176,7 @@ struct Q_QML_EXPORT FunctionObject: Object {
V4_NEEDS_DESTROY
enum { NInlineProperties = 1 };
+ bool canBeTailCalled() const { return d()->canBeTailCalled; }
Heap::ExecutionContext *scope() const { return d()->scope; }
Function *function() const { return d()->function; }