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 "qv4managed_p.h"
5#include <private/qv4mm_p.h>
6
7using namespace QV4;
8
9DEFINE_MANAGED_VTABLE(Managed);
10
11DEFINE_MANAGED_VTABLE(InternalClass);
12
13
14QString Managed::className() const
15{
16 const char *s = nullptr;
17 switch (Type(vtable()->type)) {
18 case Type_Invalid:
19 return QString();
20 case Type_String:
21 s = "String";
22 break;
23 case Type_Symbol:
24 s = "Symbol";
25 break;
26 case Type_Object:
27 s = "Object";
28 break;
29 case Type_ArrayObject:
30 s = "Array";
31 break;
32 case Type_FunctionObject:
33 s = "Function";
34 break;
35 case Type_GeneratorObject:
36 s = "Generator";
37 break;
38 case Type_BooleanObject:
39 s = "Boolean";
40 break;
41 case Type_NumberObject:
42 s = "Number";
43 break;
44 case Type_StringObject:
45 s = "String";
46 break;
47 case Type_SymbolObject:
48 s = "Symbol";
49 break;
50 case Type_DateObject:
51 s = "Date";
52 break;
53 case Type_RegExpObject:
54 s = "RegExp";
55 break;
56 case Type_ErrorObject:
57 s = "Error";
58 break;
59 case Type_ArgumentsObject:
60 s = "Arguments";
61 break;
62 case Type_JsonObject:
63 s = "JSON";
64 break;
65 case Type_ProxyObject:
66 s = "ProxyObject";
67 break;
68 case Type_MathObject:
69 s = "Math";
70 break;
71 case Type_UrlObject:
72 s = "URL";
73 break;
74 case Type_UrlSearchParamsObject:
75 s = "URLSearchParams";
76 break;
77
78 case Type_ExecutionContext:
79 s = "__ExecutionContext";
80 break;
81 case Type_MapIteratorObject:
82 s = "Map Iterator";
83 break;
84 case Type_SetIteratorObject:
85 s = "Set Iterator";
86 break;
87 case Type_ArrayIteratorObject:
88 s = "Array Iterator";
89 break;
90 case Type_StringIteratorObject:
91 s = "String Iterator";
92 break;
93 case Type_ForInIterator:
94 s = "__ForIn Iterator";
95 break;
96 case Type_InternalClass:
97 s = "__InternalClass";
98 break;
99 case Type_RegExp:
100 s = "__RegExp";
101 break;
102
103 case Type_V4Sequence:
104 s = "V4Sequence";
105 break;
106 case Type_QmlListProperty:
107 s = "QML List";
108 break;
109 }
110 return QString::fromLatin1(ba: s);
111}
112
113bool Managed::virtualIsEqualTo(Managed *, Managed *)
114{
115 return false;
116}
117
118
119OwnPropertyKeyIterator::~OwnPropertyKeyIterator()
120{
121}
122

source code of qtdeclarative/src/qml/jsruntime/qv4managed.cpp