From 052d22e116957a170e290a49d077d3e9f290a237 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 4 Sep 2018 12:19:10 +0200 Subject: ES7: Implement Tail Position Calls in the runtime Change-Id: If1629109722496b3fd10b36b2376548440f2fee9 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4functionobject_p.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4functionobject_p.h') 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; } -- cgit v1.2.3