Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qv4lookup.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 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
4#include <private/qv4functionobject_p.h>
5#include <private/qv4identifiertable_p.h>
6#include <private/qv4lookup_p.h>
7#include <private/qv4qobjectwrapper_p.h>
8#include <private/qv4runtime_p.h>
9#include <private/qv4stackframe_p.h>
10
12
13using namespace QV4;
14
15
16void Lookup::resolveProtoGetter(PropertyKey name, const Heap::Object *proto)
17{
18 while (proto) {
19 auto index = proto->internalClass->findValueOrGetter(name);
20 if (index.isValid()) {
22 protoLookup.data = proto->propertyData(index.index);
23 if (attrs.isData()) {
25 } else {
27 }
28 return;
29 }
30 proto = proto->prototype();
31 }
32 // ### put in a getterNotFound!
34}
35
37{
38 return object->resolveLookupGetter(engine, this);
39}
40
42{
43 // Otherwise we cannot trust the protoIds
44 Q_ASSERT(engine->isInitialized);
45
46 primitiveLookup.type = object.type();
47 switch (primitiveLookup.type) {
49 case Value::Null_Type: {
50 Scope scope(engine);
51 ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);
52 const QString message = QStringLiteral("Cannot read property '%1' of %2").arg(name->toQString())
53 .arg(QLatin1String(primitiveLookup.type == Value::Undefined_Type ? "undefined" : "null"));
54 return engine->throwTypeError(message);
55 }
57 primitiveLookup.proto = engine->booleanPrototype()->d();
58 break;
60 // ### Should move this over to the Object path, as strings also have an internalClass
61 Q_ASSERT(object.isStringOrSymbol());
62 primitiveLookup.proto = static_cast<const Managed &>(object).internalClass()->prototype;
64 Scope scope(engine);
65 ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);
66 if (object.isString() && name->equals(engine->id_length())) {
67 // special case, as the property is on the object itself
69 return stringLengthGetter(this, engine, object);
70 }
71 break;
72 }
74 default: // Number
75 primitiveLookup.proto = engine->numberPrototype()->d();
76 }
77
78 PropertyKey name = engine->identifierTable->asPropertyKey(engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);
79 protoLookup.protoId = primitiveLookup.proto->internalClass->protoId;
81
82 if (getter == getterProto)
84 else if (getter == getterProtoAccessor)
86 return getter(this, engine, object);
87}
88
90{
91 // Otherwise we cannot trust the protoIds
92 Q_ASSERT(engine->isInitialized);
93
95 PropertyKey name = engine->identifierTable->asPropertyKey(engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);
96 protoLookup.protoId = o->internalClass()->protoId;
98
99 if (getter == getterProto)
101 else if (getter == getterProtoAccessor)
103 else {
105 Scope scope(engine);
106 ScopedString n(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[nameIndex]);
107 return engine->throwReferenceError(n);
108 }
109 return globalGetter(this, engine);
110}
111
113{
114 if (const Object *o = object.as<Object>())
115 return l->resolveGetter(engine, o);
116 return l->resolvePrimitiveGetter(engine, object);
117}
118
119static inline void setupObjectLookupTwoClasses(Lookup *l, const Lookup &first, const Lookup &second)
120{
121 Heap::InternalClass *ic1 = first.objectLookup.ic;
122 const uint offset1 = first.objectLookup.offset;
123 Heap::InternalClass *ic2 = second.objectLookup.ic;
124 const uint offset2 = second.objectLookup.offset;
125
126 l->objectLookupTwoClasses.ic = ic1;
128 l->objectLookupTwoClasses.offset = offset1;
129 l->objectLookupTwoClasses.offset2 = offset2;
130}
131
132static inline void setupProtoLookupTwoClasses(Lookup *l, const Lookup &first, const Lookup &second)
133{
134 const quintptr protoId1 = first.protoLookup.protoId;
135 const Value *data1 = first.protoLookup.data;
136 const quintptr protoId2 = second.protoLookup.protoId;
137 const Value *data2 = second.protoLookup.data;
138
139 l->protoLookupTwoClasses.protoId = protoId1;
140 l->protoLookupTwoClasses.protoId2 = protoId2;
141 l->protoLookupTwoClasses.data = data1;
142 l->protoLookupTwoClasses.data2 = data2;
143}
144
146{
147 if (const Object *o = object.as<Object>()) {
148
149 // Do the resolution on a second lookup, then merge.
150 Lookup second;
151 memset(&second, 0, sizeof(Lookup));
152 second.nameIndex = l->nameIndex;
153 second.forCall = l->forCall;
154 second.getter = getterGeneric;
155 const ReturnedValue result = second.resolveGetter(engine, o);
156
157 if (l->getter == getter0Inline
158 && (second.getter == getter0Inline || second.getter == getter0MemberData)) {
159 setupObjectLookupTwoClasses(l, *l, second);
160 l->getter = (second.getter == getter0Inline)
163 return result;
164 }
165
166 if (l->getter == getter0MemberData
167 && (second.getter == getter0Inline || second.getter == getter0MemberData)) {
168 setupObjectLookupTwoClasses(l, second, *l);
169 l->getter = (second.getter == getter0Inline)
172 return result;
173 }
174
175
176 if (l->getter == getterProto && second.getter == getterProto) {
177 setupProtoLookupTwoClasses(l, *l, second);
179 return result;
180 }
181
182 if (l->getter == getterProtoAccessor && second.getter == getterProtoAccessor) {
183 setupProtoLookupTwoClasses(l, *l, second);
185 return result;
186 }
187
188 // If any of the above options were true, the propertyCache was inactive.
189 second.releasePropertyCache();
190 }
191
193 return getterFallback(l, engine, object);
194}
195
197{
198 QV4::Scope scope(engine);
199 QV4::ScopedObject o(scope, object.toObject(scope.engine));
200 if (!o)
201 return Encode::undefined();
202 ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[l->nameIndex]);
203 return o->get(name);
204}
205
207 Lookup *l, ExecutionEngine *engine, const Value &object)
208{
210 // Certain compilers, e.g. MSVC, will "helpfully" deduplicate methods that are completely
211 // equal. As a result, the pointers are the same, which wreaks havoc on the logic that
212 // decides how to retrieve the property.
213 qFatal("Your C++ compiler is broken.");
214 }
215
216 // This getter just marks the presence of a fallback lookup with variant conversion.
217 // It only does anything with it when running AOT-compiled code.
218 return getterFallback(l, engine, object);
219}
220
222{
223 // we can safely cast to a QV4::Object here. If object is actually a string,
224 // the internal class won't match
225 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
226 if (o) {
227 if (l->objectLookup.ic == o->internalClass)
228 return o->memberData->values.data()[l->objectLookup.offset].asReturnedValue();
229 }
230 return getterTwoClasses(l, engine, object);
231}
232
234{
235 // we can safely cast to a QV4::Object here. If object is actually a string,
236 // the internal class won't match
237 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
238 if (o) {
239 if (l->objectLookup.ic == o->internalClass)
240 return o->inlinePropertyDataWithOffset(l->objectLookup.offset)->asReturnedValue();
241 }
242 return getterTwoClasses(l, engine, object);
243}
244
246{
247 // Otherwise we cannot trust the protoIds
248 Q_ASSERT(engine->isInitialized);
249
250 // we can safely cast to a QV4::Object here. If object is actually a string,
251 // the internal class won't match
252 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
253 if (o) {
254 if (l->protoLookup.protoId == o->internalClass->protoId)
255 return l->protoLookup.data->asReturnedValue();
256 }
257 return getterTwoClasses(l, engine, object);
258}
259
261{
262 // we can safely cast to a QV4::Object here. If object is actually a string,
263 // the internal class won't match
264 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
265 if (o) {
266 if (l->objectLookupTwoClasses.ic == o->internalClass)
267 return o->inlinePropertyDataWithOffset(l->objectLookupTwoClasses.offset)->asReturnedValue();
268 if (l->objectLookupTwoClasses.ic2 == o->internalClass)
269 return o->inlinePropertyDataWithOffset(l->objectLookupTwoClasses.offset2)->asReturnedValue();
270 }
272 return getterFallback(l, engine, object);
273}
274
276{
277 // we can safely cast to a QV4::Object here. If object is actually a string,
278 // the internal class won't match
279 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
280 if (o) {
281 if (l->objectLookupTwoClasses.ic == o->internalClass)
282 return o->inlinePropertyDataWithOffset(l->objectLookupTwoClasses.offset)->asReturnedValue();
283 if (l->objectLookupTwoClasses.ic2 == o->internalClass)
284 return o->memberData->values.data()[l->objectLookupTwoClasses.offset2].asReturnedValue();
285 }
287 return getterFallback(l, engine, object);
288}
289
291{
292 // we can safely cast to a QV4::Object here. If object is actually a string,
293 // the internal class won't match
294 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
295 if (o) {
296 if (l->objectLookupTwoClasses.ic == o->internalClass)
297 return o->memberData->values.data()[l->objectLookupTwoClasses.offset].asReturnedValue();
298 if (l->objectLookupTwoClasses.ic2 == o->internalClass)
299 return o->memberData->values.data()[l->objectLookupTwoClasses.offset2].asReturnedValue();
300 }
302 return getterFallback(l, engine, object);
303}
304
306{
307 // Otherwise we cannot trust the protoIds
308 Q_ASSERT(engine->isInitialized);
309
310 // we can safely cast to a QV4::Object here. If object is actually a string,
311 // the internal class won't match
312 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
313 if (o) {
314 if (l->protoLookupTwoClasses.protoId == o->internalClass->protoId)
316 if (l->protoLookupTwoClasses.protoId2 == o->internalClass->protoId)
318 return getterFallback(l, engine, object);
319 }
321 return getterFallback(l, engine, object);
322}
323
325{
326 // we can safely cast to a QV4::Object here. If object is actually a string,
327 // the internal class won't match
328 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
329 if (o) {
330 if (l->objectLookup.ic == o->internalClass) {
331 const Value *getter = o->propertyData(l->objectLookup.offset);
332 if (!getter->isFunctionObject()) // ### catch at resolve time
333 return Encode::undefined();
334
335 return checkedResult(engine, static_cast<const FunctionObject *>(getter)->call(
336 &object, nullptr, 0));
337 }
338 }
340 return getterFallback(l, engine, object);
341}
342
344{
345 // Otherwise we cannot trust the protoIds
346 Q_ASSERT(engine->isInitialized);
347
348 // we can safely cast to a QV4::Object here. If object is actually a string,
349 // the internal class won't match
350 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
351 if (o && l->protoLookup.protoId == o->internalClass->protoId) {
352 const Value *getter = l->protoLookup.data;
353 if (!getter->isFunctionObject()) // ### catch at resolve time
354 return Encode::undefined();
355
356 return checkedResult(engine, static_cast<const FunctionObject *>(getter)->call(
357 &object, nullptr, 0));
358 }
359 return getterTwoClasses(l, engine, object);
360}
361
363{
364 // Otherwise we cannot trust the protoIds
365 Q_ASSERT(engine->isInitialized);
366
367 // we can safely cast to a QV4::Object here. If object is actually a string,
368 // the internal class won't match
369 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
370 if (o) {
371 const Value *getter = nullptr;
372 if (l->protoLookupTwoClasses.protoId == o->internalClass->protoId)
374 else if (l->protoLookupTwoClasses.protoId2 == o->internalClass->protoId)
376 if (getter) {
377 if (!getter->isFunctionObject()) // ### catch at resolve time
378 return Encode::undefined();
379
380 return checkedResult(engine, static_cast<const FunctionObject *>(getter)->call(
381 &object, nullptr, 0));
382 }
383 }
385 return getterFallback(l, engine, object);
386}
387
389{
390 Object *o = object.objectValue();
391 if (o) {
392 Heap::Object *ho = o->d();
393 if (ho->arrayData && ho->arrayData->type == Heap::ArrayData::Simple) {
395 if (l->indexedLookup.index < s->values.size)
396 if (!s->data(l->indexedLookup.index).isEmpty())
398 }
399 return o->get(l->indexedLookup.index);
400 }
402 return getterFallback(l, engine, object);
403}
404
406{
407 const auto revertLookup = [lookup, engine, &object]() {
409 lookup->qobjectLookup.propertyCache = nullptr;
411 return Lookup::getterGeneric(lookup, engine, object);
412 };
413
414 const QObjectWrapper::Flags flags = lookup->forCall
417
418 return QObjectWrapper::lookupPropertyGetterImpl(lookup, engine, object, flags, revertLookup);
419}
420
422 Lookup *lookup, ExecutionEngine *engine, const Value &object)
423{
425 // Certain compilers, e.g. MSVC, will "helpfully" deduplicate methods that are completely
426 // equal. As a result, the pointers are the same, which wreaks havoc on the logic that
427 // decides how to retrieve the property.
428 qFatal("Your C++ compiler is broken.");
429 }
430
431 // This getter marks the presence of a qobjectlookup with variant conversion.
432 // It only does anything with it when running AOT-compiled code.
433 return getterQObject(lookup, engine, object);
434}
435
437{
438 const auto revertLookup = [lookup, engine, &object]() {
440 lookup->qobjectMethodLookup.propertyCache = nullptr;
442 return Lookup::getterGeneric(lookup, engine, object);
443 };
444
445 const QObjectWrapper::Flags flags = lookup->forCall
448
449 return QObjectWrapper::lookupMethodGetterImpl(lookup, engine, object, flags, revertLookup);
450}
451
453{
454 // Otherwise we cannot trust the protoIds
455 Q_ASSERT(engine->isInitialized);
456
457 if (object.type() == l->primitiveLookup.type && !object.isObject()) {
458 Heap::Object *o = l->primitiveLookup.proto;
459 if (l->primitiveLookup.protoId == o->internalClass->protoId)
461 }
463 return getterGeneric(l, engine, object);
464}
465
467{
468 // Otherwise we cannot trust the protoIds
469 Q_ASSERT(engine->isInitialized);
470
471 if (object.type() == l->primitiveLookup.type && !object.isObject()) {
472 Heap::Object *o = l->primitiveLookup.proto;
473 if (l->primitiveLookup.protoId == o->internalClass->protoId) {
474 const Value *getter = l->primitiveLookup.data;
475 if (!getter->isFunctionObject()) // ### catch at resolve time
476 return Encode::undefined();
477
478 return checkedResult(engine, static_cast<const FunctionObject *>(getter)->call(
479 &object, nullptr, 0));
480 }
481 }
483 return getterGeneric(l, engine, object);
484}
485
487{
488 if (const String *s = object.as<String>())
489 return Encode(s->d()->length());
490
492 return getterGeneric(l, engine, object);
493}
494
496{
497 return l->resolveGlobalGetter(engine);
498}
499
501{
502 // Otherwise we cannot trust the protoIds
503 Q_ASSERT(engine->isInitialized);
504
505 Heap::Object *o = engine->globalObject->d();
506 if (l->protoLookup.protoId == o->internalClass->protoId)
507 return l->protoLookup.data->asReturnedValue();
509 return globalGetterGeneric(l, engine);
510}
511
513{
514 // Otherwise we cannot trust the protoIds
515 Q_ASSERT(engine->isInitialized);
516
517 Heap::Object *o = engine->globalObject->d();
518 if (l->protoLookup.protoId == o->internalClass->protoId) {
519 const Value *getter = l->protoLookup.data;
520 if (!getter->isFunctionObject()) // ### catch at resolve time
521 return Encode::undefined();
522
523 return checkedResult(engine, static_cast<const FunctionObject *>(getter)->call(
524 engine->globalObject, nullptr, 0));
525 }
527 return globalGetterGeneric(l, engine);
528}
529
531{
532 return object->resolveLookupSetter(engine, this, value);
533}
534
536{
537 if (object.isObject())
538 return l->resolveSetter(engine, static_cast<Object *>(&object), value);
539
540 if (engine->currentStackFrame->v4Function->isStrict())
541 return false;
542
543 Scope scope(engine);
545 if (!o) // type error
546 return false;
547 ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[l->nameIndex]);
548 return o->put(name, value);
549}
550
552{
553 // A precondition of this method is that l->objectLookup is the active variant of the union.
555
556 if (object.isObject()) {
557
558 // As l->objectLookup is active, we can stash some members here, before resolving.
560 const uint index = l->objectLookup.index;
561
562 if (!l->resolveSetter(engine, static_cast<Object *>(&object), value)) {
564 return false;
565 }
566
573 return true;
574 }
575
577 }
578
580 return setterFallback(l, engine, object, value);
581}
582
584{
585 QV4::Scope scope(engine);
586 QV4::ScopedObject o(scope, object.toObject(scope.engine));
587 if (!o)
588 return false;
589
590 ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[l->nameIndex]);
591 return o->put(name, value);
592}
593
595 Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
596{
597 // This setter just marks the presence of a fallback lookup with QVariant conversion.
598 // It only does anything with it when running AOT-compiled code.
599 return setterFallback(l, engine, object, value);
600}
601
603{
604 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
605 if (o && o->internalClass == l->objectLookup.ic) {
606 o->memberData->values.set(engine, l->objectLookup.offset, value);
607 return true;
608 }
609
610 return setterTwoClasses(l, engine, object, value);
611}
612
614{
615 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
616 if (o && o->internalClass == l->objectLookup.ic) {
617 o->setInlinePropertyWithOffset(engine, l->objectLookup.offset, value);
618 return true;
619 }
620
621 return setterTwoClasses(l, engine, object, value);
622}
623
625{
626 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
627 if (o) {
628 if (o->internalClass == l->objectLookupTwoClasses.ic) {
629 o->setProperty(engine, l->objectLookupTwoClasses.offset, value);
630 return true;
631 }
632 if (o->internalClass == l->objectLookupTwoClasses.ic2) {
633 o->setProperty(engine, l->objectLookupTwoClasses.offset2, value);
634 return true;
635 }
636 }
637
639 return setterFallback(l, engine, object, value);
640}
641
643{
644 // Otherwise we cannot trust the protoIds
645 Q_ASSERT(engine->isInitialized);
646
647 Object *o = static_cast<Object *>(object.managed());
648 if (o && o->internalClass()->protoId == l->insertionLookup.protoId) {
649 o->setInternalClass(l->insertionLookup.newClass);
650 o->d()->setProperty(engine, l->insertionLookup.offset, value);
651 return true;
652 }
653
655 return setterFallback(l, engine, object, value);
656}
657
659{
660 // This setter just marks the presence of a qobjectlookup. It only does anything with it when
661 // running AOT-compiled code, though.
662 return QV4::Lookup::setterFallback(l, engine, object, v);
663}
664
666 Lookup *l, ExecutionEngine *engine, Value &object, const Value &v)
667{
668 // This setter marks the presence of a qobjectlookup with QVariant conversion.
669 // It only does anything with it when running AOT-compiled code.
670 return QV4::Lookup::setterFallback(l, engine, object, v);
671}
672
673
675{
676 Q_ASSERT(object.isObject() && static_cast<Object &>(object).isArrayObject());
677 bool ok;
678 uint len = value.asArrayLength(&ok);
679 if (!ok) {
680 engine->throwRangeError(value);
681 return false;
682 }
683 ok = static_cast<Object &>(object).setArrayLength(len);
684 if (!ok)
685 return false;
686 return true;
687}
688
QJSValue globalObject() const
Returns this engine's Global Object.
void release() const
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
Combined button and popup list for selecting options.
\qmltype Particle \inqmlmodule QtQuick.Particles
quint64 ReturnedValue
ReturnedValue checkedResult(QV4::ExecutionEngine *v4, ReturnedValue result)
static struct AttrInfo attrs[]
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define qFatal
Definition qlogging.h:164
GLsizei const GLfloat * v
[13]
GLuint index
[2]
GLuint object
[3]
GLbitfield flags
GLuint GLsizei const GLchar * message
GLuint name
GLint first
GLfloat n
GLenum GLsizei len
GLuint64EXT * result
[6]
GLdouble s
[6]
Definition qopenglext.h:235
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
QLatin1StringView QLatin1String
Definition qstringfwd.h:31
#define QStringLiteral(str)
size_t quintptr
Definition qtypes.h:72
unsigned int uint
Definition qtypes.h:29
static void setupObjectLookupTwoClasses(Lookup *l, const Lookup &first, const Lookup &second)
static void setupProtoLookupTwoClasses(Lookup *l, const Lookup &first, const Lookup &second)
QJSEngine engine
[0]
const Value * arrayData() const
static constexpr ReturnedValue undefined()
const Value & data(uint index) const
ReturnedValue(* globalGetter)(Lookup *l, ExecutionEngine *engine)
Definition qv4lookup_p.h:37
ReturnedValue resolvePrimitiveGetter(ExecutionEngine *engine, const Value &object)
Definition qv4lookup.cpp:41
struct QV4::Lookup::@576::@592 objectLookup
static ReturnedValue getter0MemberDatagetter0MemberData(Lookup *l, ExecutionEngine *engine, const Value &object)
void resolveProtoGetter(PropertyKey name, const Heap::Object *proto)
Definition qv4lookup.cpp:16
struct QV4::Lookup::@576::@601 qobjectLookup
static ReturnedValue primitiveGetterProto(Lookup *l, ExecutionEngine *engine, const Value &object)
static ReturnedValue getter0Inlinegetter0Inline(Lookup *l, ExecutionEngine *engine, const Value &object)
static ReturnedValue stringLengthGetter(Lookup *l, ExecutionEngine *engine, const Value &object)
ReturnedValue resolveGlobalGetter(ExecutionEngine *engine)
Definition qv4lookup.cpp:89
static bool setter0Inline(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
static ReturnedValue globalGetterProtoAccessor(Lookup *l, ExecutionEngine *engine)
static ReturnedValue getterQObject(Lookup *l, ExecutionEngine *engine, const Value &object)
Heap::InternalClass * ic2
Definition qv4lookup_p.h:63
quintptr type
Definition qv4lookup_p.h:78
static ReturnedValue getterQObjectAsVariant(Lookup *l, ExecutionEngine *engine, const Value &object)
quintptr protoId2
Definition qv4lookup_p.h:69
static ReturnedValue getterProtoAccessor(Lookup *l, ExecutionEngine *engine, const Value &object)
static bool setterQObjectAsVariant(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
struct QV4::Lookup::@576::@596 protoLookupTwoClasses
static bool setterQObject(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
ReturnedValue(* getter)(Lookup *l, ExecutionEngine *engine, const Value &object)
Definition qv4lookup_p.h:36
static ReturnedValue getter0Inlinegetter0MemberData(Lookup *l, ExecutionEngine *engine, const Value &object)
static bool setterInsert(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
struct QV4::Lookup::@576::@600 indexedLookup
static bool setter0MemberData(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
Heap::Object * proto
Definition qv4lookup_p.h:76
struct QV4::Lookup::@576::@595 objectLookupTwoClasses
ReturnedValue resolveGetter(ExecutionEngine *engine, const Object *object)
Definition qv4lookup.cpp:36
static ReturnedValue getterGeneric(Lookup *l, ExecutionEngine *engine, const Value &object)
static bool setterGeneric(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
struct QV4::Lookup::@576::@593 protoLookup
const Value * data2
Definition qv4lookup_p.h:71
static ReturnedValue globalGetterGeneric(Lookup *l, ExecutionEngine *engine)
Heap::InternalClass * newClass
Definition qv4lookup_p.h:81
static ReturnedValue getterTwoClasses(Lookup *l, ExecutionEngine *engine, const Value &object)
static bool arrayLengthSetter(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
static bool setterFallbackAsVariant(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
bool(* setter)(Lookup *l, ExecutionEngine *engine, Value &object, const Value &v)
Definition qv4lookup_p.h:39
static bool setter0setter0(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
bool resolveSetter(ExecutionEngine *engine, Object *object, const Value &value)
static ReturnedValue getterAccessor(Lookup *l, ExecutionEngine *engine, const Value &object)
static ReturnedValue getterFallback(Lookup *l, ExecutionEngine *engine, const Value &object)
static ReturnedValue getterFallbackAsVariant(Lookup *l, ExecutionEngine *engine, const Value &object)
struct QV4::Lookup::@576::@599 insertionLookup
void releasePropertyCache()
static ReturnedValue getterQObjectMethod(Lookup *l, ExecutionEngine *engine, const Value &object)
quintptr protoId
Definition qv4lookup_p.h:57
static ReturnedValue getter0Inline(Lookup *l, ExecutionEngine *engine, const Value &object)
static ReturnedValue getterProtoTwoClasses(Lookup *l, ExecutionEngine *engine, const Value &object)
static ReturnedValue primitiveGetterAccessor(Lookup *l, ExecutionEngine *engine, const Value &object)
static ReturnedValue getterProto(Lookup *l, ExecutionEngine *engine, const Value &object)
static bool setterFallback(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
static ReturnedValue globalGetterProto(Lookup *l, ExecutionEngine *engine)
static Q_NEVER_INLINE bool setterTwoClasses(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
struct QV4::Lookup::@576::@597 primitiveLookup
static ReturnedValue getter0MemberData(Lookup *l, ExecutionEngine *engine, const Value &object)
Heap::InternalClass * ic
Definition qv4lookup_p.h:51
const Value * data
Definition qv4lookup_p.h:59
struct QV4::Lookup::@576::@602 qobjectMethodLookup
const QQmlPropertyCache * propertyCache
Definition qv4lookup_p.h:95
static ReturnedValue getterIndexed(Lookup *l, ExecutionEngine *engine, const Value &object)
static ReturnedValue getterProtoAccessorTwoClasses(Lookup *l, ExecutionEngine *engine, const Value &object)
static ReturnedValue lookupPropertyGetterImpl(Lookup *l, ExecutionEngine *engine, const Value &object, Flags flags, ReversalFunctor revert)
static ReturnedValue lookupMethodGetterImpl(Lookup *l, ExecutionEngine *engine, const Value &object, Flags flags, ReversalFunctor revert)
static Heap::Object * convertToObject(ExecutionEngine *engine, const Value &value)
ExecutionEngine * engine
constexpr ReturnedValue asReturnedValue() const