OpenCoverage

qv4lookup_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4lookup_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3namespace QV4 {-
4-
5struct Lookup {-
6 union {-
7 ReturnedValue (*getter)(Lookup *l, ExecutionEngine *engine, const Value &object);-
8 ReturnedValue (*globalGetter)(Lookup *l, ExecutionEngine *engine);-
9 bool (*setter)(Lookup *l, ExecutionEngine *engine, Value &object, const Value &v);-
10 };-
11 union {-
12 struct {-
13 Heap::Base *h1;-
14 Heap::Base *h2;-
15 quintptr unused;-
16 quintptr unused2;-
17 } markDef;-
18 struct {-
19 Heap::InternalClass *ic;-
20 quintptr _unused;-
21 int offset;-
22 } objectLookup;-
23 struct {-
24 quintptr protoId;-
25 quintptr _unused;-
26 const Value *data;-
27 } protoLookup;-
28 struct {-
29 Heap::InternalClass *ic;-
30 Heap::InternalClass *ic2;-
31 int offset;-
32 int offset2;-
33 } objectLookupTwoClasses;-
34 struct {-
35 quintptr protoId;-
36 quintptr protoId2;-
37 const Value *data;-
38 const Value *data2;-
39 } protoLookupTwoClasses;-
40 struct {-
41-
42 quintptr protoId;-
43 Heap::Object *proto;-
44 const Value *data;-
45 quintptr type;-
46 } primitiveLookup;-
47 struct {-
48 Heap::InternalClass *newClass;-
49 quintptr protoId;-
50 int offset;-
51 } insertionLookup;-
52 struct {-
53 quintptr _unused;-
54 quintptr _unused2;-
55 uint index;-
56 } indexedLookup;-
57 };-
58 uint nameIndex;-
59-
60 ReturnedValue resolveGetter(ExecutionEngine *engine, const Object *object);-
61 ReturnedValue resolvePrimitiveGetter(ExecutionEngine *engine, const Value &object);-
62 ReturnedValue resolveGlobalGetter(ExecutionEngine *engine);-
63 void resolveProtoGetter(PropertyKey name, const Heap::Object *proto);-
64-
65 static ReturnedValue getterGeneric(Lookup *l, ExecutionEngine *engine, const Value &object);-
66 static ReturnedValue getterTwoClasses(Lookup *l, ExecutionEngine *engine, const Value &object);-
67 static ReturnedValue getterFallback(Lookup *l, ExecutionEngine *engine, const Value &object);-
68-
69 static ReturnedValue getter0MemberData(Lookup *l, ExecutionEngine *engine, const Value &object);-
70 static ReturnedValue getter0Inline(Lookup *l, ExecutionEngine *engine, const Value &object);-
71 static ReturnedValue getterProto(Lookup *l, ExecutionEngine *engine, const Value &object);-
72 static ReturnedValue getter0Inlinegetter0Inline(Lookup *l, ExecutionEngine *engine, const Value &object);-
73 static ReturnedValue getter0Inlinegetter0MemberData(Lookup *l, ExecutionEngine *engine, const Value &object);-
74 static ReturnedValue getter0MemberDatagetter0MemberData(Lookup *l, ExecutionEngine *engine, const Value &object);-
75 static ReturnedValue getterProtoTwoClasses(Lookup *l, ExecutionEngine *engine, const Value &object);-
76 static ReturnedValue getterAccessor(Lookup *l, ExecutionEngine *engine, const Value &object);-
77 static ReturnedValue getterProtoAccessor(Lookup *l, ExecutionEngine *engine, const Value &object);-
78 static ReturnedValue getterProtoAccessorTwoClasses(Lookup *l, ExecutionEngine *engine, const Value &object);-
79 static ReturnedValue getterIndexed(Lookup *l, ExecutionEngine *engine, const Value &object);-
80-
81 static ReturnedValue primitiveGetterProto(Lookup *l, ExecutionEngine *engine, const Value &object);-
82 static ReturnedValue primitiveGetterAccessor(Lookup *l, ExecutionEngine *engine, const Value &object);-
83 static ReturnedValue stringLengthGetter(Lookup *l, ExecutionEngine *engine, const Value &object);-
84-
85 static ReturnedValue globalGetterGeneric(Lookup *l, ExecutionEngine *engine);-
86 static ReturnedValue globalGetterProto(Lookup *l, ExecutionEngine *engine);-
87 static ReturnedValue globalGetterProtoAccessor(Lookup *l, ExecutionEngine *engine);-
88-
89 bool resolveSetter(ExecutionEngine *engine, Object *object, const Value &value);-
90 static bool setterGeneric(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value);-
91 static bool setterTwoClasses(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value);-
92 static bool setterFallback(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value);-
93 static bool setter0(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value);-
94 static bool setter0Inline(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value);-
95 static bool setter0setter0(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value);-
96 static bool setterInsert(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value);-
97 static bool arrayLengthSetter(Lookup *l, ExecutionEngine *engine, Value &object, const Value &value);-
98-
99 void markObjects(MarkStack *stack) {-
100 if (markDef.h1
markDef.h1Description
TRUEevaluated 329030 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 406304 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& !(reinterpret_cast<quintptr>(markDef.h1) & 1)
!(reinterpret_...rkDef.h1) & 1)Description
TRUEevaluated 73155 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 255884 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
73155-406304
101 markDef.h1->mark(stack);
executed 73155 times by 1 test: markDef.h1->mark(stack);
Executed by:
  • tst_ecmascripttests
73155
102 if (markDef.h2
markDef.h2Description
TRUEevaluated 49216 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 686079 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& !(reinterpret_cast<quintptr>(markDef.h2) & 1)
!(reinterpret_...rkDef.h2) & 1)Description
TRUEevaluated 8116 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 41100 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8116-686079
103 markDef.h2->mark(stack);
executed 8116 times by 1 test: markDef.h2->mark(stack);
Executed by:
  • tst_ecmascripttests
8116
104 }
executed 735288 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
735288
105-
106 void clear() {-
107 memset(&markDef, 0, sizeof(markDef));-
108 }
never executed: end of block
0
109};-
110-
111static_assert(bool(std::is_standard_layout<Lookup>::value), "std::is_standard_layout<Lookup>::value");-
112-
113-
114static_assert(bool(-
115__builtin_offsetof (-
116Lookup-
117, -
118getter-
119) -
120== 0), "offsetof(Lookup, getter) == 0");-
121-
122}-
123-
124-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0