Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qv4generatorobject_p.h
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant
4
5#ifndef QV4GENERATOROBJECT_P_H
6#define QV4GENERATOROBJECT_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
21
23
24namespace QV4 {
25
33
34namespace Heap {
35
37 void init(ExecutionEngine *engine);
38};
39
41 void init(QV4::ExecutionContext *scope, Function *function, QV4::String *name = nullptr) {
42 ArrowFunction::init(scope, function, name);
43 }
44};
45
48
50 void init();
51};
52
53#define GeneratorObjectMembers(class, Member)
54 Member(class, Pointer, ExecutionContext *, context)
55 Member(class, NoMark, GeneratorState, state)
56 Member(class, NoMark, JSTypesStackFrame, cppFrame)
57 Member(class, Pointer, ArrayObject *, values)
58 Member(class, Pointer, ArrayObject *, jsFrame)
59
61 DECLARE_MARKOBJECTS(GeneratorObject)
62};
63
64}
65
67{
69
70 static ReturnedValue virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *);
71 static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc);
72};
73
75{
78
79 static inline constexpr quint8 IsTailCallable = false;
80
81 static Heap::FunctionObject *create(ExecutionContext *scope, Function *function);
82 static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc);
83};
84
86{
89
90 static inline constexpr quint8 IsTailCallable = false;
91
92 static Heap::FunctionObject *create(ExecutionContext *scope, Function *function, Object *homeObject, String *name);
93 static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc);
94};
95
97{
98 void init(ExecutionEngine *engine, Object *ctor);
99
100 static ReturnedValue method_next(const FunctionObject *, const Value *thisObject, const Value *argv, int argc);
101 static ReturnedValue method_return(const FunctionObject *, const Value *thisObject, const Value *argv, int argc);
102 static ReturnedValue method_throw(const FunctionObject *, const Value *thisObject, const Value *argv, int argc);
103};
104
105
107 V4_OBJECT2(GeneratorObject, Object)
109 V4_INTERNALCLASS(GeneratorObject)
110 V4_PROTOTYPE(generatorPrototype)
111
113};
114
115}
116
117QT_END_NAMESPACE
118
119#endif // QV4GENERATORFUNCTION_P_H
DECLARE_HEAP_OBJECT(StrictArgumentsObject, Object)
Definition qjsvalue.h:23
#define CHECK_STACK_LIMITS(v4)
DEFINE_OBJECT_VTABLE(MemberGeneratorFunction)
DEFINE_OBJECT_VTABLE(GeneratorObject)
DEFINE_OBJECT_VTABLE(GeneratorFunctionCtor)
DEFINE_OBJECT_VTABLE(GeneratorFunction)
#define Q_MANAGED_TYPE(type)
#define V4_INTERNALCLASS(c)
static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc)
static Heap::FunctionObject * create(ExecutionContext *scope, Function *function)
static ReturnedValue method_next(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_return(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
void init(ExecutionEngine *engine, Object *ctor)
static ReturnedValue method_throw(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
void init(QV4::ExecutionContext *scope, Function *function, QV4::String *name=nullptr)
void init(ExecutionEngine *engine)
void init(QV4::ExecutionContext *scope, Function *function, QV4::String *name=nullptr)
static Heap::FunctionObject * create(ExecutionContext *scope, Function *function, Object *homeObject, String *name)
static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc)