Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4setobject.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | using namespace QV4; | - | ||||||||||||
3 | - | |||||||||||||
4 | const QV4::VTable SetCtor::static_vtbl = { (std::is_same<SetCtor::SuperClass, Object>::value) ? nullptr : &SetCtor::SuperClass::static_vtbl, (sizeof(SetCtor::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(SetCtor::Data) + (SetCtor::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(SetCtor::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), SetCtor::IsExecutionContext, SetCtor::IsString, SetCtor::IsObject, SetCtor::IsFunctionObject, SetCtor::IsErrorObject, SetCtor::IsArrayData, SetCtor::IsStringOrSymbol, SetCtor::MyType, { 0, 0, 0, 0 }, "SetCtor", SetCtor::virtualDestroy, SetCtor::Data::markObjects, SetCtor::virtualIsEqualTo, SetCtor::virtualGet, SetCtor::virtualPut, SetCtor::virtualDeleteProperty, SetCtor::virtualHasProperty, SetCtor::virtualGetOwnProperty, SetCtor::virtualDefineOwnProperty, SetCtor::virtualIsExtensible, SetCtor::virtualPreventExtensions, SetCtor::virtualGetPrototypeOf, SetCtor::virtualSetPrototypeOf, SetCtor::virtualGetLength, SetCtor::virtualAdvanceIterator, SetCtor::virtualInstanceOf, SetCtor::virtualCall, SetCtor::virtualCallAsConstructor, }; | - | ||||||||||||
5 | const QV4::VTable SetObject::static_vtbl = { (std::is_same<SetObject::SuperClass, Object>::value) ? nullptr : &SetObject::SuperClass::static_vtbl, (sizeof(SetObject::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(SetObject::Data) + (SetObject::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(SetObject::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), SetObject::IsExecutionContext, SetObject::IsString, SetObject::IsObject, SetObject::IsFunctionObject, SetObject::IsErrorObject, SetObject::IsArrayData, SetObject::IsStringOrSymbol, SetObject::MyType, { 0, 0, 0, 0 }, "SetObject", SetObject::virtualDestroy, SetObject::Data::markObjects, SetObject::virtualIsEqualTo, SetObject::virtualGet, SetObject::virtualPut, SetObject::virtualDeleteProperty, SetObject::virtualHasProperty, SetObject::virtualGetOwnProperty, SetObject::virtualDefineOwnProperty, SetObject::virtualIsExtensible, SetObject::virtualPreventExtensions, SetObject::virtualGetPrototypeOf, SetObject::virtualSetPrototypeOf, SetObject::virtualGetLength, SetObject::virtualAdvanceIterator, SetObject::virtualInstanceOf, SetObject::virtualCall, SetObject::virtualCallAsConstructor, }; | - | ||||||||||||
6 | - | |||||||||||||
7 | void Heap::SetCtor::init(QV4::ExecutionContext *scope) | - | ||||||||||||
8 | { | - | ||||||||||||
9 | Heap::FunctionObject::init(scope, ([]() noexcept -> QString { enum { Size = sizeof(u"" "Set")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Set" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98162 times by 153 tests: qstring_literal_temp;return qstring_literal_temp; Executed by:
executed 98162 times by 153 tests: }()));return qstring_literal_temp; Executed by:
| 98162 | ||||||||||||
10 | } executed 98439 times by 153 tests: end of block Executed by:
| 98439 | ||||||||||||
11 | - | |||||||||||||
12 | ReturnedValue SetCtor::virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *) | - | ||||||||||||
13 | { | - | ||||||||||||
14 | Scope scope(f); | - | ||||||||||||
15 | Scoped<SetObject> a(scope, scope.engine->memoryManager->allocate<SetObject>()); | - | ||||||||||||
16 | - | |||||||||||||
17 | if (argc > 0
| 160-535 | ||||||||||||
18 | ScopedValue iterable(scope, argv[0]); | - | ||||||||||||
19 | if (!iterable->isUndefined()
| 4-155 | ||||||||||||
20 | ScopedFunctionObject adder(scope, a->get(ScopedString(scope, scope.engine->newString(QString::fromLatin1("add"))))); | - | ||||||||||||
21 | if (!adder
| 8-145 | ||||||||||||
22 | return executed 8 times by 1 test: scope.engine->throwTypeError();return scope.engine->throwTypeError(); Executed by:
executed 8 times by 1 test: return scope.engine->throwTypeError(); Executed by:
| 8 | ||||||||||||
23 | ScopedObject iter(scope, Runtime::method_getIterator(scope.engine, iterable, true)); | - | ||||||||||||
24 | do { if (scope.hasException()
never executed: QV4::Encode::undefined();return QV4::Encode::undefined(); never executed: } } while (false);return QV4::Encode::undefined(); | 0-148 | ||||||||||||
25 | if (!iter
| 0-146 | ||||||||||||
26 | return never executed: a.asReturnedValue();return a.asReturnedValue(); never executed: return a.asReturnedValue(); | 0 | ||||||||||||
27 | - | |||||||||||||
28 | Value *nextValue = scope.alloc(1); | - | ||||||||||||
29 | ScopedValue done(scope); | - | ||||||||||||
30 | for(;;) { | - | ||||||||||||
31 | done = Runtime::method_iteratorNext(scope.engine, iter, nextValue); | - | ||||||||||||
32 | do { if (scope.hasException()
executed 8 times by 1 test: QV4::Encode::undefined();return QV4::Encode::undefined(); Executed by:
executed 8 times by 1 test: } } while (false);return QV4::Encode::undefined(); Executed by:
| 8-374 | ||||||||||||
33 | if (done->toBoolean()
| 136-238 | ||||||||||||
34 | return executed 136 times by 1 test: a.asReturnedValue();return a.asReturnedValue(); Executed by:
executed 136 times by 1 test: return a.asReturnedValue(); Executed by:
| 136 | ||||||||||||
35 | - | |||||||||||||
36 | adder->call(a, nextValue, 1); | - | ||||||||||||
37 | if (scope.engine->hasException
| 4-234 | ||||||||||||
38 | ScopedValue falsey(scope, Encode(false)); | - | ||||||||||||
39 | return executed 4 times by 1 test: Runtime::method_iteratorClose(scope.engine, iter, falsey);return Runtime::method_iteratorClose(scope.engine, iter, falsey); Executed by:
executed 4 times by 1 test: return Runtime::method_iteratorClose(scope.engine, iter, falsey); Executed by:
| 4 | ||||||||||||
40 | } | - | ||||||||||||
41 | } executed 234 times by 1 test: end of block Executed by:
| 234 | ||||||||||||
42 | } never executed: end of block | 0 | ||||||||||||
43 | } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||||||||
44 | - | |||||||||||||
45 | return executed 543 times by 1 test: a.asReturnedValue();return a.asReturnedValue(); Executed by:
executed 543 times by 1 test: return a.asReturnedValue(); Executed by:
| 543 | ||||||||||||
46 | } | - | ||||||||||||
47 | - | |||||||||||||
48 | ReturnedValue SetCtor::virtualCall(const FunctionObject *f, const Value *, const Value *, int) | - | ||||||||||||
49 | { | - | ||||||||||||
50 | Scope scope(f); | - | ||||||||||||
51 | return executed 8 times by 1 test: scope.engine->throwTypeError(QString::fromLatin1("Set requires new"));return scope.engine->throwTypeError(QString::fromLatin1("Set requires new")); Executed by:
executed 8 times by 1 test: return scope.engine->throwTypeError(QString::fromLatin1("Set requires new")); Executed by:
| 8 | ||||||||||||
52 | } | - | ||||||||||||
53 | - | |||||||||||||
54 | void SetPrototype::init(ExecutionEngine *engine, Object *ctor) | - | ||||||||||||
55 | { | - | ||||||||||||
56 | Scope scope(engine); | - | ||||||||||||
57 | ScopedObject o(scope); | - | ||||||||||||
58 | ctor->defineReadonlyConfigurableProperty(engine->id_length(), Primitive::fromInt32(0)); | - | ||||||||||||
59 | ctor->defineReadonlyProperty(engine->id_prototype(), (o = this)); | - | ||||||||||||
60 | ctor->addSymbolSpecies(); | - | ||||||||||||
61 | defineDefaultProperty(engine->id_constructor(), (o = ctor)); | - | ||||||||||||
62 | - | |||||||||||||
63 | defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "add")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "add" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98653 times by 153 tests: qstring_literal_temp;return qstring_literal_temp; Executed by:
executed 98653 times by 153 tests: }()), method_add, 1);return qstring_literal_temp; Executed by:
| 98653 | ||||||||||||
64 | defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "clear")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "clear" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98928 times by 153 tests: qstring_literal_temp;return qstring_literal_temp; Executed by:
executed 98928 times by 153 tests: }()), method_clear, 0);return qstring_literal_temp; Executed by:
| 98928 | ||||||||||||
65 | defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "delete")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "delete" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98951 times by 153 tests: qstring_literal_temp;return qstring_literal_temp; Executed by:
executed 98951 times by 153 tests: }()), method_delete, 1);return qstring_literal_temp; Executed by:
| 98951 | ||||||||||||
66 | defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "entries")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "entries" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98572 times by 153 tests: qstring_literal_temp;return qstring_literal_temp; Executed by:
executed 98572 times by 153 tests: }()), method_entries, 0);return qstring_literal_temp; Executed by:
| 98572 | ||||||||||||
67 | defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "forEach")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "forEach" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98823 times by 153 tests: qstring_literal_temp;return qstring_literal_temp; Executed by:
executed 98823 times by 153 tests: }()), method_forEach, 1);return qstring_literal_temp; Executed by:
| 98823 | ||||||||||||
68 | defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "has")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "has" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98988 times by 153 tests: qstring_literal_temp;return qstring_literal_temp; Executed by:
executed 98988 times by 153 tests: }()), method_has, 1);return qstring_literal_temp; Executed by:
| 98988 | ||||||||||||
69 | defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "size")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "size" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98953 times by 153 tests: qstring_literal_temp;return qstring_literal_temp; Executed by:
executed 98953 times by 153 tests: }()), method_get_size, nullptr);return qstring_literal_temp; Executed by:
| 98953 | ||||||||||||
70 | - | |||||||||||||
71 | - | |||||||||||||
72 | ScopedString valString(scope, scope.engine->newIdentifier(([]() noexcept -> QString { enum { Size = sizeof(u"" "values")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "values" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98848 times by 153 tests: qstring_literal_temp;return qstring_literal_temp; Executed by:
executed 98848 times by 153 tests: }())));return qstring_literal_temp; Executed by:
| 98848 | ||||||||||||
73 | ScopedFunctionObject valuesFn(scope, FunctionObject::createBuiltinFunction(engine, valString, SetPrototype::method_values, 0)); | - | ||||||||||||
74 | defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "keys")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "keys" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98738 times by 153 tests: qstring_literal_temp;return qstring_literal_temp; Executed by:
executed 98738 times by 153 tests: }()), valuesFn);return qstring_literal_temp; Executed by:
| 98738 | ||||||||||||
75 | defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "values")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "values" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98582 times by 153 tests: qstring_literal_temp;return qstring_literal_temp; Executed by:
executed 98582 times by 153 tests: }()), valuesFn);return qstring_literal_temp; Executed by:
| 98582 | ||||||||||||
76 | - | |||||||||||||
77 | defineDefaultProperty(engine->symbol_iterator(), valuesFn); | - | ||||||||||||
78 | - | |||||||||||||
79 | ScopedString val(scope, engine->newString(QLatin1String("Set"))); | - | ||||||||||||
80 | defineReadonlyConfigurableProperty(engine->symbol_toStringTag(), val); | - | ||||||||||||
81 | } executed 99003 times by 153 tests: end of block Executed by:
| 99003 | ||||||||||||
82 | - | |||||||||||||
83 | void Heap::SetObject::init() | - | ||||||||||||
84 | { | - | ||||||||||||
85 | Object::init(); | - | ||||||||||||
86 | esTable = new ESTable(); | - | ||||||||||||
87 | } executed 695 times by 1 test: end of block Executed by:
| 695 | ||||||||||||
88 | - | |||||||||||||
89 | void Heap::SetObject::destroy() | - | ||||||||||||
90 | { | - | ||||||||||||
91 | delete esTable; | - | ||||||||||||
92 | esTable = 0; | - | ||||||||||||
93 | } executed 704 times by 1 test: end of block Executed by:
| 704 | ||||||||||||
94 | - | |||||||||||||
95 | void Heap::SetObject::markObjects(Heap::Base *that, MarkStack *markStack) | - | ||||||||||||
96 | { | - | ||||||||||||
97 | SetObject *s = static_cast<SetObject *>(that); | - | ||||||||||||
98 | s->esTable->markObjects(markStack); | - | ||||||||||||
99 | Object::markObjects(that, markStack); | - | ||||||||||||
100 | } never executed: end of block | 0 | ||||||||||||
101 | - | |||||||||||||
102 | ReturnedValue SetPrototype::method_add(const FunctionObject *b, const Value *thisObject, const Value *argv, int) | - | ||||||||||||
103 | { | - | ||||||||||||
104 | Scope scope(b); | - | ||||||||||||
105 | Scoped<SetObject> that(scope, thisObject); | - | ||||||||||||
106 | if (!that
| 80-527 | ||||||||||||
107 | return executed 80 times by 1 test: scope.engine->throwTypeError();return scope.engine->throwTypeError(); Executed by:
executed 80 times by 1 test: return scope.engine->throwTypeError(); Executed by:
| 80 | ||||||||||||
108 | - | |||||||||||||
109 | that->d()->esTable->set(argv[0], Primitive::undefinedValue()); | - | ||||||||||||
110 | return executed 529 times by 1 test: that.asReturnedValue();return that.asReturnedValue(); Executed by:
executed 529 times by 1 test: return that.asReturnedValue(); Executed by:
| 529 | ||||||||||||
111 | } | - | ||||||||||||
112 | - | |||||||||||||
113 | ReturnedValue SetPrototype::method_clear(const FunctionObject *b, const Value *thisObject, const Value *, int) | - | ||||||||||||
114 | { | - | ||||||||||||
115 | Scope scope(b); | - | ||||||||||||
116 | Scoped<SetObject> that(scope, thisObject); | - | ||||||||||||
117 | if (!that
| 16-79 | ||||||||||||
118 | return executed 79 times by 1 test: scope.engine->throwTypeError();return scope.engine->throwTypeError(); Executed by:
executed 79 times by 1 test: return scope.engine->throwTypeError(); Executed by:
| 79 | ||||||||||||
119 | - | |||||||||||||
120 | that->d()->esTable->clear(); | - | ||||||||||||
121 | return executed 16 times by 1 test: Encode::undefined();return Encode::undefined(); Executed by:
executed 16 times by 1 test: return Encode::undefined(); Executed by:
| 16 | ||||||||||||
122 | } | - | ||||||||||||
123 | - | |||||||||||||
124 | ReturnedValue SetPrototype::method_delete(const FunctionObject *b, const Value *thisObject, const Value *argv, int) | - | ||||||||||||
125 | { | - | ||||||||||||
126 | Scope scope(b); | - | ||||||||||||
127 | Scoped<SetObject> that(scope, thisObject); | - | ||||||||||||
128 | if (!that
| 55-80 | ||||||||||||
129 | return executed 80 times by 1 test: scope.engine->throwTypeError();return scope.engine->throwTypeError(); Executed by:
executed 80 times by 1 test: return scope.engine->throwTypeError(); Executed by:
| 80 | ||||||||||||
130 | - | |||||||||||||
131 | return executed 55 times by 1 test: Encode(that->d()->esTable->remove(argv[0]));return Encode(that->d()->esTable->remove(argv[0])); Executed by:
executed 55 times by 1 test: return Encode(that->d()->esTable->remove(argv[0])); Executed by:
| 55 | ||||||||||||
132 | } | - | ||||||||||||
133 | - | |||||||||||||
134 | ReturnedValue SetPrototype::method_entries(const FunctionObject *b, const Value *thisObject, const Value *, int) | - | ||||||||||||
135 | { | - | ||||||||||||
136 | Scope scope(b); | - | ||||||||||||
137 | Scoped<SetObject> that(scope, thisObject); | - | ||||||||||||
138 | if (!that
| 20-80 | ||||||||||||
139 | return executed 80 times by 1 test: scope.engine->throwTypeError();return scope.engine->throwTypeError(); Executed by:
executed 80 times by 1 test: return scope.engine->throwTypeError(); Executed by:
| 80 | ||||||||||||
140 | - | |||||||||||||
141 | Scoped<SetIteratorObject> ao(scope, scope.engine->newSetIteratorObject(that)); | - | ||||||||||||
142 | ao->d()->iterationKind = IteratorKind::KeyValueIteratorKind; | - | ||||||||||||
143 | return executed 20 times by 1 test: ao->asReturnedValue();return ao->asReturnedValue(); Executed by:
executed 20 times by 1 test: return ao->asReturnedValue(); Executed by:
| 20 | ||||||||||||
144 | } | - | ||||||||||||
145 | - | |||||||||||||
146 | ReturnedValue SetPrototype::method_forEach(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc) | - | ||||||||||||
147 | { | - | ||||||||||||
148 | Scope scope(b); | - | ||||||||||||
149 | Scoped<SetObject> that(scope, thisObject); | - | ||||||||||||
150 | if (!that
| 72-80 | ||||||||||||
151 | return executed 80 times by 1 test: scope.engine->throwTypeError();return scope.engine->throwTypeError(); Executed by:
executed 80 times by 1 test: return scope.engine->throwTypeError(); Executed by:
| 80 | ||||||||||||
152 | - | |||||||||||||
153 | ScopedFunctionObject callbackfn(scope, argv[0]); | - | ||||||||||||
154 | if (!callbackfn
| 24-48 | ||||||||||||
155 | return executed 24 times by 1 test: scope.engine->throwTypeError();return scope.engine->throwTypeError(); Executed by:
executed 24 times by 1 test: return scope.engine->throwTypeError(); Executed by:
| 24 | ||||||||||||
156 | - | |||||||||||||
157 | ScopedValue thisArg(scope, Primitive::undefinedValue()); | - | ||||||||||||
158 | if (argc > 1
| 8-40 | ||||||||||||
159 | thisArg = ScopedValue(scope, argv[1]); executed 8 times by 1 test: thisArg = ScopedValue(scope, argv[1]); Executed by:
| 8 | ||||||||||||
160 | - | |||||||||||||
161 | Value *arguments = scope.alloc(3); | - | ||||||||||||
162 | for (uint i = 0; i < that->d()->esTable->size()
| 40-96 | ||||||||||||
163 | that->d()->esTable->iterate(i, &arguments[0], &arguments[1]); | - | ||||||||||||
164 | arguments[1] = arguments[0]; | - | ||||||||||||
165 | - | |||||||||||||
166 | arguments[2] = that; | - | ||||||||||||
167 | callbackfn->call(thisArg, arguments, 3); | - | ||||||||||||
168 | do { if (scope.hasException()
executed 8 times by 1 test: QV4::Encode::undefined();return QV4::Encode::undefined(); Executed by:
executed 8 times by 1 test: } } while (false);return QV4::Encode::undefined(); Executed by:
| 8-88 | ||||||||||||
169 | } executed 88 times by 1 test: end of block Executed by:
| 88 | ||||||||||||
170 | return executed 40 times by 1 test: Encode::undefined();return Encode::undefined(); Executed by:
executed 40 times by 1 test: return Encode::undefined(); Executed by:
| 40 | ||||||||||||
171 | } | - | ||||||||||||
172 | - | |||||||||||||
173 | ReturnedValue SetPrototype::method_has(const FunctionObject *b, const Value *thisObject, const Value *argv, int) | - | ||||||||||||
174 | { | - | ||||||||||||
175 | Scope scope(b); | - | ||||||||||||
176 | Scoped<SetObject> that(scope, thisObject); | - | ||||||||||||
177 | if (!that
| 77-91 | ||||||||||||
178 | return executed 77 times by 1 test: scope.engine->throwTypeError();return scope.engine->throwTypeError(); Executed by:
executed 77 times by 1 test: return scope.engine->throwTypeError(); Executed by:
| 77 | ||||||||||||
179 | - | |||||||||||||
180 | return executed 91 times by 1 test: Encode(that->d()->esTable->has(argv[0]));return Encode(that->d()->esTable->has(argv[0])); Executed by:
executed 91 times by 1 test: return Encode(that->d()->esTable->has(argv[0])); Executed by:
| 91 | ||||||||||||
181 | } | - | ||||||||||||
182 | - | |||||||||||||
183 | ReturnedValue SetPrototype::method_get_size(const FunctionObject *b, const Value *thisObject, const Value *, int) | - | ||||||||||||
184 | { | - | ||||||||||||
185 | Scope scope(b); | - | ||||||||||||
186 | Scoped<SetObject> that(scope, thisObject); | - | ||||||||||||
187 | if (!that
| 0-131 | ||||||||||||
188 | return never executed: scope.engine->throwTypeError();return scope.engine->throwTypeError(); never executed: return scope.engine->throwTypeError(); | 0 | ||||||||||||
189 | - | |||||||||||||
190 | return executed 131 times by 1 test: Encode(that->d()->esTable->size());return Encode(that->d()->esTable->size()); Executed by:
executed 131 times by 1 test: return Encode(that->d()->esTable->size()); Executed by:
| 131 | ||||||||||||
191 | } | - | ||||||||||||
192 | - | |||||||||||||
193 | ReturnedValue SetPrototype::method_values(const FunctionObject *b, const Value *thisObject, const Value *, int) | - | ||||||||||||
194 | { | - | ||||||||||||
195 | Scope scope(b); | - | ||||||||||||
196 | Scoped<SetObject> that(scope, thisObject); | - | ||||||||||||
197 | if (!that
| 80-106 | ||||||||||||
198 | return executed 80 times by 1 test: scope.engine->throwTypeError();return scope.engine->throwTypeError(); Executed by:
executed 80 times by 1 test: return scope.engine->throwTypeError(); Executed by:
| 80 | ||||||||||||
199 | - | |||||||||||||
200 | Scoped<SetIteratorObject> ao(scope, scope.engine->newSetIteratorObject(that)); | - | ||||||||||||
201 | ao->d()->iterationKind = IteratorKind::ValueIteratorKind; | - | ||||||||||||
202 | return executed 107 times by 1 test: ao->asReturnedValue();return ao->asReturnedValue(); Executed by:
executed 107 times by 1 test: return ao->asReturnedValue(); Executed by:
| 107 | ||||||||||||
203 | } | - | ||||||||||||
Switch to Source code | Preprocessed file |