| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4symbol.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | using namespace QV4; | - | ||||||||||||
| 3 | - | |||||||||||||
| 4 | const QV4::VTable SymbolCtor::static_vtbl = { (std::is_same<SymbolCtor::SuperClass, Object>::value) ? nullptr : &SymbolCtor::SuperClass::static_vtbl, (sizeof(SymbolCtor::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(SymbolCtor::Data) + (SymbolCtor::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(SymbolCtor::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), SymbolCtor::IsExecutionContext, SymbolCtor::IsString, SymbolCtor::IsObject, SymbolCtor::IsFunctionObject, SymbolCtor::IsErrorObject, SymbolCtor::IsArrayData, SymbolCtor::IsStringOrSymbol, SymbolCtor::MyType, { 0, 0, 0, 0 }, "SymbolCtor", SymbolCtor::virtualDestroy, SymbolCtor::Data::markObjects, SymbolCtor::virtualIsEqualTo, SymbolCtor::virtualGet, SymbolCtor::virtualPut, SymbolCtor::virtualDeleteProperty, SymbolCtor::virtualHasProperty, SymbolCtor::virtualGetOwnProperty, SymbolCtor::virtualDefineOwnProperty, SymbolCtor::virtualIsExtensible, SymbolCtor::virtualPreventExtensions, SymbolCtor::virtualGetPrototypeOf, SymbolCtor::virtualSetPrototypeOf, SymbolCtor::virtualGetLength, SymbolCtor::virtualAdvanceIterator, SymbolCtor::virtualInstanceOf, SymbolCtor::virtualCall, SymbolCtor::virtualCallAsConstructor, }; | - | ||||||||||||
| 5 | const QV4::VTable Symbol::static_vtbl = { 0, (sizeof(Symbol::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(Symbol::Data) + (Symbol::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(Symbol::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), Symbol::IsExecutionContext, Symbol::IsString, Symbol::IsObject, Symbol::IsFunctionObject, Symbol::IsErrorObject, Symbol::IsArrayData, Symbol::IsStringOrSymbol, Symbol::MyType, { 0, 0, 0, 0 }, "Symbol", Symbol::virtualDestroy, Symbol::Data::markObjects, Symbol::virtualIsEqualTo, Symbol::virtualGet, Symbol::virtualPut, Symbol::virtualDeleteProperty, Symbol::virtualHasProperty, Symbol::virtualGetOwnProperty, Symbol::virtualDefineOwnProperty, Symbol::virtualIsExtensible, Symbol::virtualPreventExtensions, Symbol::virtualGetPrototypeOf, Symbol::virtualSetPrototypeOf, Symbol::virtualGetLength, Symbol::virtualAdvanceIterator, Symbol::virtualInstanceOf, Symbol::virtualCall, Symbol::virtualCallAsConstructor, }; | - | ||||||||||||
| 6 | const QV4::VTable SymbolObject::static_vtbl = { (std::is_same<SymbolObject::SuperClass, Object>::value) ? nullptr : &SymbolObject::SuperClass::static_vtbl, (sizeof(SymbolObject::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(SymbolObject::Data) + (SymbolObject::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(SymbolObject::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), SymbolObject::IsExecutionContext, SymbolObject::IsString, SymbolObject::IsObject, SymbolObject::IsFunctionObject, SymbolObject::IsErrorObject, SymbolObject::IsArrayData, SymbolObject::IsStringOrSymbol, SymbolObject::MyType, { 0, 0, 0, 0 }, "SymbolObject", SymbolObject::virtualDestroy, SymbolObject::Data::markObjects, SymbolObject::virtualIsEqualTo, SymbolObject::virtualGet, SymbolObject::virtualPut, SymbolObject::virtualDeleteProperty, SymbolObject::virtualHasProperty, SymbolObject::virtualGetOwnProperty, SymbolObject::virtualDefineOwnProperty, SymbolObject::virtualIsExtensible, SymbolObject::virtualPreventExtensions, SymbolObject::virtualGetPrototypeOf, SymbolObject::virtualSetPrototypeOf, SymbolObject::virtualGetLength, SymbolObject::virtualAdvanceIterator, SymbolObject::virtualInstanceOf, SymbolObject::virtualCall, SymbolObject::virtualCallAsConstructor, }; | - | ||||||||||||
| 7 | - | |||||||||||||
| 8 | void Heap::Symbol::init(const QString &s) | - | ||||||||||||
| 9 | { | - | ||||||||||||
| 10 | ((s.at(0) == QLatin1Char('@')) ? static_cast<void>(0) : qt_assert("s.at(0) == QLatin1Char('@')", __FILE__, 52)); | - | ||||||||||||
| 11 | identifier = PropertyKey::fromStringOrSymbol(this); | - | ||||||||||||
| 12 | QString desc(s); | - | ||||||||||||
| 13 | text = desc.data_ptr(); | - | ||||||||||||
| 14 | text->ref.ref(); | - | ||||||||||||
| 15 | } executed 1190330 times by 153 tests: end of blockExecuted by:
| 1190330 | ||||||||||||
| 16 | - | |||||||||||||
| 17 | void Heap::SymbolCtor::init(QV4::ExecutionContext *scope) | - | ||||||||||||
| 18 | { | - | ||||||||||||
| 19 | Heap::FunctionObject::init(scope, ([]() noexcept -> QString { enum { Size = sizeof(u"" "Symbol")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Symbol" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98785 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98785 times by 153 tests: }()));return qstring_literal_temp;Executed by:
| 98785 | ||||||||||||
| 20 | } executed 99166 times by 153 tests: end of blockExecuted by:
| 99166 | ||||||||||||
| 21 | - | |||||||||||||
| 22 | void Heap::SymbolObject::init(const QV4::Symbol *s) | - | ||||||||||||
| 23 | { | - | ||||||||||||
| 24 | Object::init(); | - | ||||||||||||
| 25 | symbol.set(internalClass->engine, s->d()); | - | ||||||||||||
| 26 | } executed 106 times by 1 test: end of blockExecuted by:
| 106 | ||||||||||||
| 27 | - | |||||||||||||
| 28 | ReturnedValue QV4::SymbolCtor::virtualCall(const QV4::FunctionObject *f, const QV4::Value *, const QV4::Value *argv, int argc) | - | ||||||||||||
| 29 | { | - | ||||||||||||
| 30 | Scope scope(f); | - | ||||||||||||
| 31 | QString desc = QChar::fromLatin1('@'); | - | ||||||||||||
| 32 | if (argc
| 8-1824 | ||||||||||||
| 33 | ScopedString s(scope, argv[0].toString(scope.engine)); | - | ||||||||||||
| 34 | if (scope.hasException()
| 12-1805 | ||||||||||||
| 35 | return executed 12 times by 1 test: Encode::undefined();return Encode::undefined();Executed by:
executed 12 times by 1 test: return Encode::undefined();Executed by:
| 12 | ||||||||||||
| 36 | desc += s->toQString(); | - | ||||||||||||
| 37 | } executed 1805 times by 1 test: end of blockExecuted by:
| 1805 | ||||||||||||
| 38 | return executed 2483 times by 1 test: Symbol::create(scope.engine, desc)->asReturnedValue();return Symbol::create(scope.engine, desc)->asReturnedValue();Executed by:
executed 2483 times by 1 test: return Symbol::create(scope.engine, desc)->asReturnedValue();Executed by:
| 2483 | ||||||||||||
| 39 | } | - | ||||||||||||
| 40 | - | |||||||||||||
| 41 | ReturnedValue SymbolCtor::method_for(const FunctionObject *f, const Value *, const Value *argv, int argc) | - | ||||||||||||
| 42 | { | - | ||||||||||||
| 43 | Scope scope(f); | - | ||||||||||||
| 44 | ScopedValue k(scope, argc ? argv[0]: Primitive::undefinedValue()); | - | ||||||||||||
| 45 | ScopedString key(scope, k->toString(scope.engine)); | - | ||||||||||||
| 46 | if (scope.hasException()
| 8-20 | ||||||||||||
| 47 | return executed 8 times by 1 test: Encode::undefined();return Encode::undefined();Executed by:
executed 8 times by 1 test: return Encode::undefined();Executed by:
| 8 | ||||||||||||
| 48 | QString desc = QLatin1Char('@') + key->toQString(); | - | ||||||||||||
| 49 | return executed 20 times by 1 test: scope.engine->identifierTable->insertSymbol(desc)->asReturnedValue();return scope.engine->identifierTable->insertSymbol(desc)->asReturnedValue();Executed by:
executed 20 times by 1 test: return scope.engine->identifierTable->insertSymbol(desc)->asReturnedValue();Executed by:
| 20 | ||||||||||||
| 50 | } | - | ||||||||||||
| 51 | - | |||||||||||||
| 52 | ReturnedValue SymbolCtor::method_keyFor(const FunctionObject *f, const Value *, const Value *argv, int argc) | - | ||||||||||||
| 53 | { | - | ||||||||||||
| 54 | ExecutionEngine *e = f->engine(); | - | ||||||||||||
| 55 | if (!argc
| 0-44 | ||||||||||||
| 56 | return executed 32 times by 1 test: e->throwTypeError(QLatin1String("Symbol.keyFor: Argument is not a symbol."));return e->throwTypeError(QLatin1String("Symbol.keyFor: Argument is not a symbol."));Executed by:
executed 32 times by 1 test: return e->throwTypeError(QLatin1String("Symbol.keyFor: Argument is not a symbol."));Executed by:
| 32 | ||||||||||||
| 57 | const Symbol &arg = static_cast<const Symbol &>(argv[0]); | - | ||||||||||||
| 58 | Heap::Symbol *s = e->identifierTable->symbolForId(arg.propertyKey()); | - | ||||||||||||
| 59 | ((!s || s == arg.d()) ? static_cast<void>(0) : qt_assert("!s || s == arg.d()", __FILE__, 101)); | - | ||||||||||||
| 60 | if (s
| 4-8 | ||||||||||||
| 61 | return executed 4 times by 1 test: e->newString(arg.toQString().mid((1)))->asReturnedValue();return e->newString(arg.toQString().mid((1)))->asReturnedValue();Executed by:
executed 4 times by 1 test: return e->newString(arg.toQString().mid((1)))->asReturnedValue();Executed by:
| 4 | ||||||||||||
| 62 | return executed 8 times by 1 test: Encode::undefined();return Encode::undefined();Executed by:
executed 8 times by 1 test: return Encode::undefined();Executed by:
| 8 | ||||||||||||
| 63 | } | - | ||||||||||||
| 64 | - | |||||||||||||
| 65 | void SymbolPrototype::init(ExecutionEngine *engine, Object *ctor) | - | ||||||||||||
| 66 | { | - | ||||||||||||
| 67 | Scope scope(engine); | - | ||||||||||||
| 68 | ScopedValue v(scope); | - | ||||||||||||
| 69 | ctor->defineReadonlyProperty(engine->id_prototype(), (v = this)); | - | ||||||||||||
| 70 | ctor->defineReadonlyConfigurableProperty(engine->id_length(), Primitive::fromInt32(0)); | - | ||||||||||||
| 71 | - | |||||||||||||
| 72 | ctor->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "for")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "for" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98286 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98286 times by 153 tests: }()), SymbolCtor::method_for, 1);return qstring_literal_temp;Executed by:
| 98286 | ||||||||||||
| 73 | ctor->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "keyFor")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "keyFor" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98890 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98890 times by 153 tests: }()), SymbolCtor::method_keyFor, 1);return qstring_literal_temp;Executed by:
| 98890 | ||||||||||||
| 74 | ctor->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "hasInstance")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "hasInstance" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98756 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98756 times by 153 tests: }()), *engine->symbol_hasInstance());return qstring_literal_temp;Executed by:
| 98756 | ||||||||||||
| 75 | ctor->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "isConcatSpreadable")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "isConcatSpreadable" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98364 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98364 times by 153 tests: }()), *engine->symbol_isConcatSpreadable());return qstring_literal_temp;Executed by:
| 98364 | ||||||||||||
| 76 | ctor->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "iterator")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "iterator" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98839 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98839 times by 153 tests: }()), *engine->symbol_iterator());return qstring_literal_temp;Executed by:
| 98839 | ||||||||||||
| 77 | ctor->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "match")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "match" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98855 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98855 times by 153 tests: }()), *engine->symbol_match());return qstring_literal_temp;Executed by:
| 98855 | ||||||||||||
| 78 | ctor->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "replace")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "replace" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98917 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98917 times by 153 tests: }()), *engine->symbol_replace());return qstring_literal_temp;Executed by:
| 98917 | ||||||||||||
| 79 | ctor->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "search")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "search" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98705 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98705 times by 153 tests: }()), *engine->symbol_search());return qstring_literal_temp;Executed by:
| 98705 | ||||||||||||
| 80 | ctor->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "species")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "species" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98751 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98751 times by 153 tests: }()), *engine->symbol_species());return qstring_literal_temp;Executed by:
| 98751 | ||||||||||||
| 81 | ctor->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "split")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "split" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98772 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98772 times by 153 tests: }()), *engine->symbol_split());return qstring_literal_temp;Executed by:
| 98772 | ||||||||||||
| 82 | ctor->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "toPrimitive")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "toPrimitive" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98875 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98875 times by 153 tests: }()), *engine->symbol_toPrimitive());return qstring_literal_temp;Executed by:
| 98875 | ||||||||||||
| 83 | ctor->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "toStringTag")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "toStringTag" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98340 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98340 times by 153 tests: }()), *engine->symbol_toStringTag());return qstring_literal_temp;Executed by:
| 98340 | ||||||||||||
| 84 | ctor->defineReadonlyProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "unscopables")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "unscopables" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98708 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98708 times by 153 tests: }()), *engine->symbol_unscopables());return qstring_literal_temp;Executed by:
| 98708 | ||||||||||||
| 85 | - | |||||||||||||
| 86 | defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "constructor")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "constructor" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98397 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98397 times by 153 tests: }()), (v = ctor));return qstring_literal_temp;Executed by:
| 98397 | ||||||||||||
| 87 | defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "toString")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "toString" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98908 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98908 times by 153 tests: }()), method_toString);return qstring_literal_temp;Executed by:
| 98908 | ||||||||||||
| 88 | defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "valueOf")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "valueOf" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98992 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98992 times by 153 tests: }()), method_valueOf);return qstring_literal_temp;Executed by:
| 98992 | ||||||||||||
| 89 | defineDefaultProperty(engine->symbol_toPrimitive(), method_symbolToPrimitive, 1, Attr_ReadOnly_ButConfigurable); | - | ||||||||||||
| 90 | - | |||||||||||||
| 91 | v = engine->newString(([]() noexcept -> QString { enum { Size = sizeof(u"" "Symbol")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Symbol" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return executed 98962 times by 153 tests: qstring_literal_temp;return qstring_literal_temp;Executed by:
executed 98962 times by 153 tests: }()));return qstring_literal_temp;Executed by:
| 98962 | ||||||||||||
| 92 | defineReadonlyConfigurableProperty(engine->symbol_toStringTag(), v); | - | ||||||||||||
| 93 | - | |||||||||||||
| 94 | } executed 98893 times by 153 tests: end of blockExecuted by:
| 98893 | ||||||||||||
| 95 | - | |||||||||||||
| 96 | ReturnedValue SymbolPrototype::method_toString(const FunctionObject *f, const Value *thisObject, const Value *, int) | - | ||||||||||||
| 97 | { | - | ||||||||||||
| 98 | Scope scope(f); | - | ||||||||||||
| 99 | Scoped<Symbol> s(scope, thisObject->as<Symbol>()); | - | ||||||||||||
| 100 | if (!s
| 4-18 | ||||||||||||
| 101 | if (const
| 0-4 | ||||||||||||
| 102 | s = o->d()->symbol; executed 4 times by 1 test: s = o->d()->symbol;Executed by:
| 4 | ||||||||||||
| 103 | else | - | ||||||||||||
| 104 | return never executed: scope.engine->throwTypeError();return scope.engine->throwTypeError();never executed: return scope.engine->throwTypeError(); | 0 | ||||||||||||
| 105 | } | - | ||||||||||||
| 106 | return executed 22 times by 1 test: scope.engine->newString(s->descriptiveString())->asReturnedValue();return scope.engine->newString(s->descriptiveString())->asReturnedValue();Executed by:
executed 22 times by 1 test: return scope.engine->newString(s->descriptiveString())->asReturnedValue();Executed by:
| 22 | ||||||||||||
| 107 | } | - | ||||||||||||
| 108 | - | |||||||||||||
| 109 | ReturnedValue SymbolPrototype::method_valueOf(const FunctionObject *f, const Value *thisObject, const Value *, int) | - | ||||||||||||
| 110 | { | - | ||||||||||||
| 111 | Scope scope(f); | - | ||||||||||||
| 112 | Scoped<Symbol> s(scope, thisObject->as<Symbol>()); | - | ||||||||||||
| 113 | if (!s
| 32-38 | ||||||||||||
| 114 | if (const
| 4-28 | ||||||||||||
| 115 | s = o->d()->symbol; executed 4 times by 1 test: s = o->d()->symbol;Executed by:
| 4 | ||||||||||||
| 116 | else | - | ||||||||||||
| 117 | return executed 28 times by 1 test: scope.engine->throwTypeError();return scope.engine->throwTypeError();Executed by:
executed 28 times by 1 test: return scope.engine->throwTypeError();Executed by:
| 28 | ||||||||||||
| 118 | } | - | ||||||||||||
| 119 | return executed 42 times by 1 test: s->asReturnedValue();return s->asReturnedValue();Executed by:
executed 42 times by 1 test: return s->asReturnedValue();Executed by:
| 42 | ||||||||||||
| 120 | } | - | ||||||||||||
| 121 | - | |||||||||||||
| 122 | ReturnedValue SymbolPrototype::method_symbolToPrimitive(const FunctionObject *f, const Value *thisObject, const Value *, int) | - | ||||||||||||
| 123 | { | - | ||||||||||||
| 124 | if (thisObject->isSymbol()
| 0-40 | ||||||||||||
| 125 | return never executed: thisObject->asReturnedValue();return thisObject->asReturnedValue();never executed: return thisObject->asReturnedValue(); | 0 | ||||||||||||
| 126 | if (const
| 16-24 | ||||||||||||
| 127 | return executed 16 times by 1 test: o->d()->symbol->asReturnedValue();return o->d()->symbol->asReturnedValue();Executed by:
executed 16 times by 1 test: return o->d()->symbol->asReturnedValue();Executed by:
| 16 | ||||||||||||
| 128 | return executed 24 times by 1 test: f->engine()->throwTypeError();return f->engine()->throwTypeError();Executed by:
executed 24 times by 1 test: return f->engine()->throwTypeError();Executed by:
| 24 | ||||||||||||
| 129 | } | - | ||||||||||||
| 130 | - | |||||||||||||
| 131 | Heap::Symbol *Symbol::create(ExecutionEngine *e, const QString &s) | - | ||||||||||||
| 132 | { | - | ||||||||||||
| 133 | ((s.at(0) == QLatin1Char('@')) ? static_cast<void>(0) : qt_assert("s.at(0) == QLatin1Char('@')", __FILE__, 175)); | - | ||||||||||||
| 134 | return executed 1190061 times by 153 tests: e->memoryManager->alloc<Symbol>(s);return e->memoryManager->alloc<Symbol>(s);Executed by:
executed 1190061 times by 153 tests: return e->memoryManager->alloc<Symbol>(s);Executed by:
| 1190061 | ||||||||||||
| 135 | } | - | ||||||||||||
| 136 | - | |||||||||||||
| 137 | QString Symbol::descriptiveString() const | - | ||||||||||||
| 138 | { | - | ||||||||||||
| 139 | return executed 526 times by 1 test: QLatin1String("Symbol(") + toQString().midRef(1) + QLatin1String(")");return QLatin1String("Symbol(") + toQString().midRef(1) + QLatin1String(")");Executed by:
executed 526 times by 1 test: return QLatin1String("Symbol(") + toQString().midRef(1) + QLatin1String(")");Executed by:
| 526 | ||||||||||||
| 140 | } | - | ||||||||||||
| Switch to Source code | Preprocessed file |