Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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.set(engine, 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.set(engine, 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.set(engine, 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 auto engine = ic1->engine;
126
127 l->objectLookupTwoClasses.ic.set(engine, ic1);
128 l->objectLookupTwoClasses.ic2.set(engine, ic2);
129 l->objectLookupTwoClasses.offset = offset1;
130 l->objectLookupTwoClasses.offset2 = offset2;
131}
132
133static inline void setupProtoLookupTwoClasses(Lookup *l, const Lookup &first, const Lookup &second)
134{
135 const quintptr protoId1 = first.protoLookup.protoId;
136 const Value *data1 = first.protoLookup.data;
137 const quintptr protoId2 = second.protoLookup.protoId;
138 const Value *data2 = second.protoLookup.data;
139
140 l->protoLookupTwoClasses.protoId = protoId1;
141 l->protoLookupTwoClasses.protoId2 = protoId2;
142 l->protoLookupTwoClasses.data = data1;
143 l->protoLookupTwoClasses.data2 = data2;
144}
145
147{
148 if (const Object *o = object.as<Object>()) {
149
150 // Do the resolution on a second lookup, then merge.
151 Lookup second;
152 memset(&second, 0, sizeof(Lookup));
153 second.nameIndex = l->nameIndex;
154 second.forCall = l->forCall;
155 second.getter = getterGeneric;
156 const ReturnedValue result = second.resolveGetter(engine, o);
157
158 if (l->getter == getter0Inline
159 && (second.getter == getter0Inline || second.getter == getter0MemberData)) {
160 setupObjectLookupTwoClasses(l, *l, second);
161 l->getter = (second.getter == getter0Inline)
164 return result;
165 }
166
167 if (l->getter == getter0MemberData
168 && (second.getter == getter0Inline || second.getter == getter0MemberData)) {
169 setupObjectLookupTwoClasses(l, second, *l);
170 l->getter = (second.getter == getter0Inline)
173 return result;
174 }
175
176
177 if (l->getter == getterProto && second.getter == getterProto) {
178 setupProtoLookupTwoClasses(l, *l, second);
180 return result;
181 }
182
183 if (l->getter == getterProtoAccessor && second.getter == getterProtoAccessor) {
184 setupProtoLookupTwoClasses(l, *l, second);
186 return result;
187 }
188
189 // If any of the above options were true, the propertyCache was inactive.
190 second.releasePropertyCache();
191 }
192
194 return getterFallback(l, engine, object);
195}
196
198{
199 QV4::Scope scope(engine);
200 QV4::ScopedObject o(scope, object.toObject(scope.engine));
201 if (!o)
202 return Encode::undefined();
203 ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[l->nameIndex]);
204 return o->get(name);
205}
206
208 Lookup *l, ExecutionEngine *engine, const Value &object)
209{
211 // Certain compilers, e.g. MSVC, will "helpfully" deduplicate methods that are completely
212 // equal. As a result, the pointers are the same, which wreaks havoc on the logic that
213 // decides how to retrieve the property.
214 qFatal("Your C++ compiler is broken.");
215 }
216
217 // This getter just marks the presence of a fallback lookup with variant conversion.
218 // It only does anything with it when running AOT-compiled code.
219 return getterFallback(l, engine, object);
220}
221
223{
224 // we can safely cast to a QV4::Object here. If object is actually a string,
225 // the internal class won't match
226 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
227 if (o) {
228 if (l->objectLookup.ic == o->internalClass)
229 return o->memberData->values.data()[l->objectLookup.offset].asReturnedValue();
230 }
231 return getterTwoClasses(l, engine, object);
232}
233
235{
236 // we can safely cast to a QV4::Object here. If object is actually a string,
237 // the internal class won't match
238 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
239 if (o) {
240 if (l->objectLookup.ic == o->internalClass)
241 return o->inlinePropertyDataWithOffset(l->objectLookup.offset)->asReturnedValue();
242 }
243 return getterTwoClasses(l, engine, object);
244}
245
247{
248 // Otherwise we cannot trust the protoIds
249 Q_ASSERT(engine->isInitialized);
250
251 // we can safely cast to a QV4::Object here. If object is actually a string,
252 // the internal class won't match
253 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
254 if (o) {
255 if (l->protoLookup.protoId == o->internalClass->protoId)
256 return l->protoLookup.data->asReturnedValue();
257 }
258 return getterTwoClasses(l, engine, object);
259}
260
262{
263 // we can safely cast to a QV4::Object here. If object is actually a string,
264 // the internal class won't match
265 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
266 if (o) {
267 if (l->objectLookupTwoClasses.ic == o->internalClass)
268 return o->inlinePropertyDataWithOffset(l->objectLookupTwoClasses.offset)->asReturnedValue();
269 if (l->objectLookupTwoClasses.ic2 == o->internalClass)
270 return o->inlinePropertyDataWithOffset(l->objectLookupTwoClasses.offset2)->asReturnedValue();
271 }
273 return getterFallback(l, engine, object);
274}
275
277{
278 // we can safely cast to a QV4::Object here. If object is actually a string,
279 // the internal class won't match
280 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
281 if (o) {
282 if (l->objectLookupTwoClasses.ic == o->internalClass)
283 return o->inlinePropertyDataWithOffset(l->objectLookupTwoClasses.offset)->asReturnedValue();
284 if (l->objectLookupTwoClasses.ic2 == o->internalClass)
285 return o->memberData->values.data()[l->objectLookupTwoClasses.offset2].asReturnedValue();
286 }
288 return getterFallback(l, engine, object);
289}
290
292{
293 // we can safely cast to a QV4::Object here. If object is actually a string,
294 // the internal class won't match
295 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
296 if (o) {
297 if (l->objectLookupTwoClasses.ic == o->internalClass)
298 return o->memberData->values.data()[l->objectLookupTwoClasses.offset].asReturnedValue();
299 if (l->objectLookupTwoClasses.ic2 == o->internalClass)
300 return o->memberData->values.data()[l->objectLookupTwoClasses.offset2].asReturnedValue();
301 }
303 return getterFallback(l, engine, object);
304}
305
307{
308 // Otherwise we cannot trust the protoIds
309 Q_ASSERT(engine->isInitialized);
310
311 // we can safely cast to a QV4::Object here. If object is actually a string,
312 // the internal class won't match
313 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
314 if (o) {
315 if (l->protoLookupTwoClasses.protoId == o->internalClass->protoId)
316 return l->protoLookupTwoClasses.data->asReturnedValue();
317 if (l->protoLookupTwoClasses.protoId2 == o->internalClass->protoId)
318 return l->protoLookupTwoClasses.data2->asReturnedValue();
319 return getterFallback(l, engine, object);
320 }
322 return getterFallback(l, engine, object);
323}
324
326{
327 // we can safely cast to a QV4::Object here. If object is actually a string,
328 // the internal class won't match
329 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
330 if (o) {
331 if (l->objectLookup.ic == o->internalClass) {
332 const Value *getter = o->propertyData(l->objectLookup.offset);
333 if (!getter->isFunctionObject()) // ### catch at resolve time
334 return Encode::undefined();
335
336 return checkedResult(engine, static_cast<const FunctionObject *>(getter)->call(
337 &object, nullptr, 0));
338 }
339 }
341 return getterFallback(l, engine, object);
342}
343
345{
346 // Otherwise we cannot trust the protoIds
347 Q_ASSERT(engine->isInitialized);
348
349 // we can safely cast to a QV4::Object here. If object is actually a string,
350 // the internal class won't match
351 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
352 if (o && l->protoLookup.protoId == o->internalClass->protoId) {
353 const Value *getter = l->protoLookup.data;
354 if (!getter->isFunctionObject()) // ### catch at resolve time
355 return Encode::undefined();
356
357 return checkedResult(engine, static_cast<const FunctionObject *>(getter)->call(
358 &object, nullptr, 0));
359 }
360 return getterTwoClasses(l, engine, object);
361}
362
364{
365 // Otherwise we cannot trust the protoIds
366 Q_ASSERT(engine->isInitialized);
367
368 // we can safely cast to a QV4::Object here. If object is actually a string,
369 // the internal class won't match
370 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
371 if (o) {
372 const Value *getter = nullptr;
373 if (l->protoLookupTwoClasses.protoId == o->internalClass->protoId)
375 else if (l->protoLookupTwoClasses.protoId2 == o->internalClass->protoId)
376 getter = l->protoLookupTwoClasses.data2;
377 if (getter) {
378 if (!getter->isFunctionObject()) // ### catch at resolve time
379 return Encode::undefined();
380
381 return checkedResult(engine, static_cast<const FunctionObject *>(getter)->call(
382 &object, nullptr, 0));
383 }
384 }
386 return getterFallback(l, engine, object);
387}
388
390{
391 Object *o = object.objectValue();
392 if (o) {
393 Heap::Object *ho = o->d();
394 if (ho->arrayData && ho->arrayData->type == Heap::ArrayData::Simple) {
396 if (l->indexedLookup.index < s->values.size)
397 if (!s->data(l->indexedLookup.index).isEmpty())
398 return s->data(l->indexedLookup.index).asReturnedValue();
399 }
400 return o->get(l->indexedLookup.index);
401 }
403 return getterFallback(l, engine, object);
404}
405
407{
408 const auto revertLookup = [lookup, engine, &object]() {
409 lookup->qobjectLookup.propertyCache->release();
410 lookup->qobjectLookup.propertyCache = nullptr;
412 return Lookup::getterGeneric(lookup, engine, object);
413 };
414
415 const QObjectWrapper::Flags flags = lookup->forCall
418
419 return QObjectWrapper::lookupPropertyGetterImpl(lookup, engine, object, flags, revertLookup);
420}
421
423 Lookup *lookup, ExecutionEngine *engine, const Value &object)
424{
426 // Certain compilers, e.g. MSVC, will "helpfully" deduplicate methods that are completely
427 // equal. As a result, the pointers are the same, which wreaks havoc on the logic that
428 // decides how to retrieve the property.
429 qFatal("Your C++ compiler is broken.");
430 }
431
432 // This getter marks the presence of a qobjectlookup with variant conversion.
433 // It only does anything with it when running AOT-compiled code.
434 return getterQObject(lookup, engine, object);
435}
436
438{
439 const auto revertLookup = [lookup, engine, &object]() {
440 lookup->qobjectMethodLookup.propertyCache->release();
441 lookup->qobjectMethodLookup.propertyCache = nullptr;
443 return Lookup::getterGeneric(lookup, engine, object);
444 };
445
446 const QObjectWrapper::Flags flags = lookup->forCall
449
450 return QObjectWrapper::lookupMethodGetterImpl(lookup, engine, object, flags, revertLookup);
451}
452
454{
455 // Otherwise we cannot trust the protoIds
456 Q_ASSERT(engine->isInitialized);
457
458 if (object.type() == l->primitiveLookup.type && !object.isObject()) {
459 Heap::Object *o = l->primitiveLookup.proto;
460 if (l->primitiveLookup.protoId == o->internalClass->protoId)
461 return l->primitiveLookup.data->asReturnedValue();
462 }
464 return getterGeneric(l, engine, object);
465}
466
468{
469 // Otherwise we cannot trust the protoIds
470 Q_ASSERT(engine->isInitialized);
471
472 if (object.type() == l->primitiveLookup.type && !object.isObject()) {
473 Heap::Object *o = l->primitiveLookup.proto;
474 if (l->primitiveLookup.protoId == o->internalClass->protoId) {
475 const Value *getter = l->primitiveLookup.data;
476 if (!getter->isFunctionObject()) // ### catch at resolve time
477 return Encode::undefined();
478
479 return checkedResult(engine, static_cast<const FunctionObject *>(getter)->call(
480 &object, nullptr, 0));
481 }
482 }
484 return getterGeneric(l, engine, object);
485}
486
488{
489 if (const String *s = object.as<String>())
490 return Encode(s->d()->length());
491
493 return getterGeneric(l, engine, object);
494}
495
500
502{
503 // Otherwise we cannot trust the protoIds
504 Q_ASSERT(engine->isInitialized);
505
506 Heap::Object *o = engine->globalObject->d();
507 if (l->protoLookup.protoId == o->internalClass->protoId)
508 return l->protoLookup.data->asReturnedValue();
510 return globalGetterGeneric(l, engine);
511}
512
514{
515 // Otherwise we cannot trust the protoIds
516 Q_ASSERT(engine->isInitialized);
517
518 Heap::Object *o = engine->globalObject->d();
519 if (l->protoLookup.protoId == o->internalClass->protoId) {
520 const Value *getter = l->protoLookup.data;
521 if (!getter->isFunctionObject()) // ### catch at resolve time
522 return Encode::undefined();
523
524 return checkedResult(engine, static_cast<const FunctionObject *>(getter)->call(
525 engine->globalObject, nullptr, 0));
526 }
528 return globalGetterGeneric(l, engine);
529}
530
532{
533 return object->resolveLookupSetter(engine, this, value);
534}
535
537{
538 if (object.isObject())
539 return l->resolveSetter(engine, static_cast<Object *>(&object), value);
540
541 if (engine->currentStackFrame->v4Function->isStrict())
542 return false;
543
544 Scope scope(engine);
546 if (!o) // type error
547 return false;
548 ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[l->nameIndex]);
549 return o->put(name, value);
550}
551
553{
554 // A precondition of this method is that l->objectLookup is the active variant of the union.
556
557 if (object.isObject()) {
558
559 // As l->objectLookup is active, we can stash some members here, before resolving.
561 const uint index = l->objectLookup.index;
562
563 if (!l->resolveSetter(engine, static_cast<Object *>(&object), value)) {
565 return false;
566 }
567
569 auto engine = ic->engine;
570 l->objectLookupTwoClasses.ic.set(engine, ic);
571 l->objectLookupTwoClasses.ic2.set(engine, ic);
572 l->objectLookupTwoClasses.offset = index;
573 l->objectLookupTwoClasses.offset2 = index;
575 return true;
576 }
577
579 }
580
582 return setterFallback(l, engine, object, value);
583}
584
586{
587 QV4::Scope scope(engine);
588 QV4::ScopedObject o(scope, object.toObject(scope.engine));
589 if (!o)
590 return false;
591
592 ScopedString name(scope, engine->currentStackFrame->v4Function->compilationUnit->runtimeStrings[l->nameIndex]);
593 return o->put(name, value);
594}
595
597 Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
598{
600 // Certain compilers, e.g. MSVC, will "helpfully" deduplicate methods that are completely
601 // equal. As a result, the pointers are the same, which wreaks havoc on the logic that
602 // decides how to retrieve the property.
603 qFatal("Your C++ compiler is broken.");
604 }
605
606 // This setter just marks the presence of a fallback lookup with QVariant conversion.
607 // It only does anything with it when running AOT-compiled code.
608 return setterFallback(l, engine, object, value);
609}
610
612{
613 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
614 if (o && o->internalClass == l->objectLookup.ic) {
615 o->memberData->values.set(engine, l->objectLookup.offset, value);
616 return true;
617 }
618
619 return setterTwoClasses(l, engine, object, value);
620}
621
623{
624 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
625 if (o && o->internalClass == l->objectLookup.ic) {
626 o->setInlinePropertyWithOffset(engine, l->objectLookup.offset, value);
627 return true;
628 }
629
630 return setterTwoClasses(l, engine, object, value);
631}
632
634{
635 Heap::Object *o = static_cast<Heap::Object *>(object.heapObject());
636 if (o) {
637 if (o->internalClass == l->objectLookupTwoClasses.ic) {
638 o->setProperty(engine, l->objectLookupTwoClasses.offset, value);
639 return true;
640 }
641 if (o->internalClass == l->objectLookupTwoClasses.ic2) {
642 o->setProperty(engine, l->objectLookupTwoClasses.offset2, value);
643 return true;
644 }
645 }
646
648 return setterFallback(l, engine, object, value);
649}
650
652{
653 // Otherwise we cannot trust the protoIds
654 Q_ASSERT(engine->isInitialized);
655
656 Object *o = static_cast<Object *>(object.managed());
657 if (o && o->internalClass()->protoId == l->insertionLookup.protoId) {
658 o->setInternalClass(l->insertionLookup.newClass);
659 o->d()->setProperty(engine, l->insertionLookup.offset, value);
660 return true;
661 }
662
664 return setterFallback(l, engine, object, value);
665}
666
668{
669 // This setter just marks the presence of a qobjectlookup. It only does anything with it when
670 // running AOT-compiled code, though.
671 return setterFallback(l, engine, object, v);
672}
673
675 Lookup *l, ExecutionEngine *engine, Value &object, const Value &v)
676{
678 // Certain compilers, e.g. MSVC, will "helpfully" deduplicate methods that are completely
679 // equal. As a result, the pointers are the same, which wreaks havoc on the logic that
680 // decides how to retrieve the property.
681 qFatal("Your C++ compiler is broken.");
682 }
683
684 // This setter marks the presence of a qobjectlookup with QVariant conversion.
685 // It only does anything with it when running AOT-compiled code.
686 return setterQObject(l, engine, object, v);
687}
688
689
691{
692 Q_ASSERT(object.isObject() && static_cast<Object &>(object).isArrayObject());
693 bool ok;
694 uint len = value.asArrayLength(&ok);
695 if (!ok) {
696 engine->throwRangeError(value);
697 return false;
698 }
699 ok = static_cast<Object &>(object).setArrayLength(len);
700 if (!ok)
701 return false;
702 return true;
703}
704
QJSValue globalObject() const
Returns this engine's Global Object.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
quint64 ReturnedValue
ReturnedValue checkedResult(QV4::ExecutionEngine *v4, ReturnedValue result)
Scoped< String > ScopedString
static struct AttrInfo attrs[]
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define qFatal
Definition qlogging.h:168
GLsizei const GLfloat * v
[13]
GLuint index
[2]
GLuint object
[3]
GLbitfield flags
GLuint GLsizei const GLchar * message
GLuint name
GLint first
GLfloat n
GLdouble s
[6]
Definition qopenglext.h:235
GLuint64EXT * result
[6]
GLenum GLsizei len
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
QLatin1StringView QLatin1String
Definition qstringfwd.h:31
#define QStringLiteral(str)
size_t quintptr
Definition qtypes.h:167
unsigned int uint
Definition qtypes.h:34
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:41
struct QV4::Lookup::@583::@591 protoLookup
ReturnedValue resolvePrimitiveGetter(ExecutionEngine *engine, const Value &object)
Definition qv4lookup.cpp:41
static ReturnedValue getter0MemberDatagetter0MemberData(Lookup *l, ExecutionEngine *engine, const Value &object)
void resolveProtoGetter(PropertyKey name, const Heap::Object *proto)
Definition qv4lookup.cpp:16
static ReturnedValue primitiveGetterProto(Lookup *l, ExecutionEngine *engine, const Value &object)
static ReturnedValue getter0Inlinegetter0Inline(Lookup *l, ExecutionEngine *engine, const Value &object)
struct QV4::Lookup::@583::@596 insertionLookup
static ReturnedValue stringLengthGetter(Lookup *l, ExecutionEngine *engine, const Value &object)
ReturnedValue resolveGlobalGetter(ExecutionEngine *engine)
Definition qv4lookup.cpp:89
struct QV4::Lookup::@583::@593 protoLookupTwoClasses
static bool setter0Inline(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
static ReturnedValue globalGetterProtoAccessor(Lookup *l, ExecutionEngine *engine)
struct QV4::Lookup::@583::@595 primitiveLookup
static ReturnedValue getterQObject(Lookup *l, ExecutionEngine *engine, const Value &object)
quintptr type
Definition qv4lookup_p.h:82
static ReturnedValue getterQObjectAsVariant(Lookup *l, ExecutionEngine *engine, const Value &object)
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::@583::@590 objectLookup
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:40
struct QV4::Lookup::@583::@592 objectLookupTwoClasses
static ReturnedValue getter0Inlinegetter0MemberData(Lookup *l, ExecutionEngine *engine, const Value &object)
static bool setterInsert(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
static bool setter0MemberData(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
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::@583::@599 qobjectMethodLookup
HeapObjectWrapper< Heap::InternalClass, 0 > ic
Definition qv4lookup_p.h:55
static ReturnedValue globalGetterGeneric(Lookup *l, ExecutionEngine *engine)
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)
struct QV4::Lookup::@583::@598 qobjectLookup
bool(* setter)(Lookup *l, ExecutionEngine *engine, Value &object, const Value &v)
Definition qv4lookup_p.h:43
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)
void releasePropertyCache()
static ReturnedValue getterQObjectMethod(Lookup *l, ExecutionEngine *engine, const Value &object)
static ReturnedValue getter0Inline(Lookup *l, ExecutionEngine *engine, const Value &object)
struct QV4::Lookup::@583::@597 indexedLookup
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)
HeapObjectWrapper< Heap::Object, 3 > proto
Definition qv4lookup_p.h:80
static Q_NEVER_INLINE bool setterTwoClasses(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value)
static ReturnedValue getter0MemberData(Lookup *l, ExecutionEngine *engine, const Value &object)
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