aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4generatorobject_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-07-03 11:07:15 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-07-03 11:19:03 +0000
commitfc01254cf89543e509e8ebaca93aac7f009247dd (patch)
tree5da1b88e31797bc7dfa63343d3a9e9c3659c8252 /src/qml/jsruntime/qv4generatorobject_p.h
parenta2372fd2c643615687ea3b8b1ccf53d699b6debd (diff)
Fix class members that are generators
Properly support member functions that are generators in classes. Change-Id: I5fc8d5b58a17c61a446b43d6576bb83de5ecd920 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4generatorobject_p.h')
-rw-r--r--src/qml/jsruntime/qv4generatorobject_p.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4generatorobject_p.h b/src/qml/jsruntime/qv4generatorobject_p.h
index 331b416856..a97050473c 100644
--- a/src/qml/jsruntime/qv4generatorobject_p.h
+++ b/src/qml/jsruntime/qv4generatorobject_p.h
@@ -75,6 +75,9 @@ struct GeneratorFunctionCtor : FunctionObject {
struct GeneratorFunction : ScriptFunction {
};
+struct MemberGeneratorFunction : ScriptFunction {
+};
+
struct GeneratorPrototype : FunctionObject {
void init();
};
@@ -110,6 +113,15 @@ struct GeneratorFunction : ScriptFunction
static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc);
};
+struct MemberGeneratorFunction : GeneratorFunction
+{
+ V4_OBJECT2(MemberGeneratorFunction, GeneratorFunction)
+ V4_INTERNALCLASS(MemberGeneratorFunction)
+
+ static Heap::FunctionObject *create(ExecutionContext *scope, Function *function);
+ static ReturnedValue virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *);
+};
+
struct GeneratorPrototype : Object
{
void init(ExecutionEngine *engine, Object *ctor);