OpenCoverage

qv4argumentsobject_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4argumentsobject_p.h
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtQml module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39#ifndef QV4ARGUMENTSOBJECTS_H-
40#define QV4ARGUMENTSOBJECTS_H-
41-
42//-
43// W A R N I N G-
44// --------------
45//-
46// This file is not part of the Qt API. It exists purely as an-
47// implementation detail. This header file may change from version to-
48// version without notice, or even be removed.-
49//-
50// We mean it.-
51//-
52-
53#include "qv4object_p.h"-
54#include "qv4functionobject_p.h"-
55-
56QT_BEGIN_NAMESPACE-
57-
58namespace QV4 {-
59-
60namespace Heap {-
61-
62#define ArgumentsGetterFunctionMembers(class, Member) \-
63 Member(class, NoMark, uint, index)-
64-
65DECLARE_HEAP_OBJECT(ArgumentsGetterFunction, FunctionObject) {-
66 DECLARE_MARKOBJECTS(ArgumentsGetterFunction);
never executed: end of block
0
67 inline void init(QV4::ExecutionContext *scope, uint index);-
68};-
69-
70#define ArgumentsSetterFunctionMembers(class, Member) \-
71 Member(class, NoMark, uint, index)-
72-
73DECLARE_HEAP_OBJECT(ArgumentsSetterFunction, FunctionObject) {-
74 DECLARE_MARKOBJECTS(ArgumentsSetterFunction);
never executed: end of block
0
75 inline void init(QV4::ExecutionContext *scope, uint index);-
76};-
77-
78#define ArgumentsObjectMembers(class, Member) \-
79 Member(class, Pointer, CallContext *, context) \-
80 Member(class, Pointer, MemberData *, mappedArguments) \-
81 Member(class, NoMark, bool, fullyCreated) \-
82 Member(class, NoMark, int, nFormals)-
83-
84DECLARE_HEAP_OBJECT(ArgumentsObject, Object) {-
85 DECLARE_MARKOBJECTS(ArgumentsObject);
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquicklayouts
executed 4 times by 1 test: o->context.heapObject()->mark(stack);
Executed by:
  • tst_qquicklayouts
never executed: o->mappedArguments.heapObject()->mark(stack);
o->contextDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklayouts
FALSEnever evaluated
o->mappedArgumentsDescription
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklayouts
0-4
86 enum {-
87 LengthPropertyIndex = 0,-
88 SymbolIteratorPropertyIndex = 1,-
89 CalleePropertyIndex = 2-
90 };-
91 void init(CppStackFrame *frame);-
92};-
93-
94#define StrictArgumentsObjectMembers(class, Member)-
95-
96DECLARE_HEAP_OBJECT(StrictArgumentsObject, Object) {-
97 enum {-
98 LengthPropertyIndex = 0,-
99 SymbolIteratorPropertyIndex = 1,-
100 CalleePropertyIndex = 2-
101 };-
102 void init(CppStackFrame *frame);-
103};-
104-
105}-
106-
107struct ArgumentsGetterFunction: FunctionObject-
108{-
109 V4_OBJECT2(ArgumentsGetterFunction, FunctionObject)
never executed: end of block
never executed: end of block
executed 4694 times by 1 test: return &static_vtbl;
Executed by:
  • tst_ecmascripttests
executed 3223 times by 1 test: return static_cast<QV4::Heap::ArgumentsGetterFunction *>(m());
Executed by:
  • tst_ecmascripttests
executed 1660 times by 1 test: return dptr;
Executed by:
  • tst_ecmascripttests
0-4694
110-
111 uint index() const { return d()->index; }
executed 96 times by 1 test: return d()->index;
Executed by:
  • tst_ecmascripttests
96
112 static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc);-
113};-
114-
115inline void-
116Heap::ArgumentsGetterFunction::init(QV4::ExecutionContext *scope, uint index)-
117{-
118 Heap::FunctionObject::init(scope);-
119 this->index = index;-
120}
executed 1565 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
1565
121-
122struct ArgumentsSetterFunction: FunctionObject-
123{-
124 V4_OBJECT2(ArgumentsSetterFunction, FunctionObject)
never executed: end of block
never executed: end of block
executed 4691 times by 1 test: return &static_vtbl;
Executed by:
  • tst_ecmascripttests
executed 3234 times by 1 test: return static_cast<QV4::Heap::ArgumentsSetterFunction *>(m());
Executed by:
  • tst_ecmascripttests
executed 1669 times by 1 test: return dptr;
Executed by:
  • tst_ecmascripttests
0-4691
125-
126 uint index() const { return d()->index; }
executed 102 times by 1 test: return d()->index;
Executed by:
  • tst_ecmascripttests
102
127 static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc);-
128};-
129-
130inline void-
131Heap::ArgumentsSetterFunction::init(QV4::ExecutionContext *scope, uint index)-
132{-
133 Heap::FunctionObject::init(scope);-
134 this->index = index;-
135}
executed 1567 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
1567
136-
137-
138struct ArgumentsObject: Object {-
139 V4_OBJECT2(ArgumentsObject, Object)
executed 30057 times by 36 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsettings
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickanimationcontroller
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • ...
never executed: end of block
executed 169827 times by 153 tests: return &static_vtbl;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
executed 11555 times by 4 tests: return static_cast<QV4::Heap::ArgumentsObject *>(m());
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
executed 11560 times by 4 tests: return dptr;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
0-169827
140 Q_MANAGED_TYPE(ArgumentsObject)-
141-
142 Heap::CallContext *context() const { return d()->context; }
executed 4090 times by 4 tests: return d()->context;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
4090
143 bool fullyCreated() const { return d()->fullyCreated; }
executed 4952 times by 4 tests: return d()->fullyCreated;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
4952
144-
145 static bool isNonStrictArgumentsObject(Managed *m) {-
146 return m->vtable() == staticVTable();
executed 25667 times by 3 tests: return m->vtable() == staticVTable();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
25667
147 }-
148-
149 static bool virtualDefineOwnProperty(Managed *m, PropertyKey id, const Property *desc, PropertyAttributes attrs);-
150 static ReturnedValue virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty);-
151 static bool virtualPut(Managed *m, PropertyKey id, const Value &value, Value *receiver);-
152 static bool virtualDeleteProperty(Managed *m, PropertyKey id);-
153 static PropertyAttributes virtualGetOwnProperty(Managed *m, PropertyKey id, Property *p);-
154 static qint64 virtualGetLength(const Managed *m);-
155-
156 void fullyCreate();-
157-
158};-
159-
160struct StrictArgumentsObject : Object {-
161 V4_OBJECT2(StrictArgumentsObject, Object)
never executed: end of block
never executed: end of block
executed 110509 times by 153 tests: return &static_vtbl;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
never executed: return static_cast<QV4::Heap::StrictArgumentsObject *>(m());
never executed: return dptr;
0-110509
162 Q_MANAGED_TYPE(ArgumentsObject)-
163};-
164-
165}-
166-
167QT_END_NAMESPACE-
168-
169#endif-
170-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0