37 obj->setProtoFromNewTarget(newTarget);
38 return obj->asReturnedValue();
52 proto->setPrototypeOf(
scope.engine->generatorPrototype());
69 Heap::GeneratorObject *
gp =
g->d();
75 for (
int i = 0;
i < argc;
i++)
76 gp->values->arrayData->setArrayData(
engine,
i, argv[
i]);
78 gp->cppFrame.init(
function,
gp->values->arrayData->values.values, argc);
79 gp->cppFrame.setupJSFrame(
gp->jsFrame->arrayData->values.values, *gf, gf->
scope(),
89 return g->asReturnedValue();
95 Heap::FunctionObject::init();
129 Heap::GeneratorObject *
gp =
g->d();
144 Heap::GeneratorObject *
gp =
g->d();
166 Heap::GeneratorObject *
gp =
g->d();
180 Heap::GeneratorObject *
gp =
d();
182 gp->cppFrame.setParentFrame(
engine->currentStackFrame);
183 engine->currentStackFrame = &
gp->cppFrame;
186 const char *code =
gp->cppFrame.yield();
187 gp->cppFrame.setYield(
nullptr);
188 gp->cppFrame.jsFrame->accumulator =
arg;
189 gp->cppFrame.setYieldIsIterator(
false);
194 engine->currentStackFrame =
gp->cppFrame.parentFrame();
196 bool done = (
gp->cppFrame.yield() ==
nullptr);
200 if (
gp->cppFrame.yieldIsIterator())
201 return result->asReturnedValue();
211 g->d()->homeObject.set(
scope.engine, homeObject->d());
213 proto->setPrototypeOf(
scope.engine->generatorPrototype());
ManagedType::Data * allocManaged(std::size_t size, Heap::InternalClass *ic)
static QV4::ReturnedValue interpret(JSTypesStackFrame *frame, ExecutionEngine *engine, const char *codeEntry)
\qmltype Particle \inqmlmodule QtQuick.Particles
Scoped< Object > ScopedObject
@ Attr_ReadOnly_ButConfigurable
GLsizei const GLfloat * v
[13]
#define QStringLiteral(str)
#define DEFINE_OBJECT_VTABLE(classname)
static constexpr ReturnedValue undefined()
Heap::InternalClass * classes[NClasses]
MemoryManager * memoryManager
Heap::String * newString(const QString &s=QString())
Object * iteratorPrototype() const
String * id_length() const
ReturnedValue throwError(const Value &value)
String * id_prototype() const
Heap::Object * newObject()
Symbol * symbol_toStringTag() const
Heap::String * newIdentifier(const QString &text)
ExecutionContext * scriptContext() const
Object * functionPrototype() const
Heap::ArrayObject * newArrayObject(int count=0)
ReturnedValue throwTypeError()
Heap::InternalClass * newInternalClass(const VTable *vtable, Object *prototype)
Function * function() const
Heap::ExecutionContext * scope() const
static Heap::FunctionObject * create(ExecutionContext *scope, Function *function)
ReturnedValue resume(ExecutionEngine *engine, const Value &arg) const
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)
static ReturnedValue method_throw(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
void init(QV4::ExecutionContext *scope)
static ReturnedValue createIterResultObject(ExecutionEngine *engine, const Value &value, bool done)
uint requiredJSStackFrameSize() const
ExecutionEngine * engine() const
static Heap::FunctionObject * create(ExecutionContext *scope, Function *function, Object *homeObject, String *name)
void defineDefaultProperty(StringOrSymbol *name, const Value &value, PropertyAttributes attributes=Attr_Data|Attr_NotEnumerable)
void defineReadonlyConfigurableProperty(const QString &name, const Value &value)
bool setPrototypeOf(const Object *p)
void defineReadonlyProperty(const QString &name, const Value &value)
ReturnedValue get(StringOrSymbol *name, bool *hasProperty=nullptr, const Value *receiver=nullptr) const
static constexpr VTable::CallAsConstructor virtualCallAsConstructor
static constexpr VTable::Call virtualCall
static constexpr Value fromInt32(int i)
static constexpr Value undefinedValue()
static constexpr Value emptyValue()