| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4stackframe.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | using namespace QV4; | - | ||||||
| 3 | - | |||||||
| 4 | QString CppStackFrame::source() const | - | ||||||
| 5 | { | - | ||||||
| 6 | return executed 4508422 times by 40 tests: v4Function ? v4Function->sourceFile() : QString();return v4Function ? v4Function->sourceFile() : QString();Executed by:
executed 4508422 times by 40 tests: return v4Function ? v4Function->sourceFile() : QString();Executed by:
| 4508422 | ||||||
| 7 | } | - | ||||||
| 8 | - | |||||||
| 9 | QString CppStackFrame::function() const | - | ||||||
| 10 | { | - | ||||||
| 11 | return executed 4617805 times by 38 tests: v4Function ? v4Function->name()->toQString() : QString();return v4Function ? v4Function->name()->toQString() : QString();Executed by:
executed 4617805 times by 38 tests: return v4Function ? v4Function->name()->toQString() : QString();Executed by:
| 4617805 | ||||||
| 12 | } | - | ||||||
| 13 | - | |||||||
| 14 | int CppStackFrame::lineNumber() const | - | ||||||
| 15 | { | - | ||||||
| 16 | if (!v4Function
| 98-4576878 | ||||||
| 17 | return executed 98 times by 2 tests: -1;return -1;Executed by:
executed 98 times by 2 tests: return -1;Executed by:
| 98 | ||||||
| 18 | - | |||||||
| 19 | auto findLine = [](const CompiledData::CodeOffsetToLine &entry, uint offset) { | - | ||||||
| 20 | return executed 18677605 times by 40 tests: entry.codeOffset < offset;return entry.codeOffset < offset;Executed by:
executed 18677605 times by 40 tests: return entry.codeOffset < offset;Executed by:
| 18677605 | ||||||
| 21 | }; | - | ||||||
| 22 | - | |||||||
| 23 | const QV4::CompiledData::Function *cf = v4Function->compiledFunction; | - | ||||||
| 24 | uint offset = instructionPointer; | - | ||||||
| 25 | const CompiledData::CodeOffsetToLine *lineNumbers = cf->lineNumberTable(); | - | ||||||
| 26 | uint nLineNumbers = cf->nLineNumbers; | - | ||||||
| 27 | const CompiledData::CodeOffsetToLine *line = std::lower_bound(lineNumbers, lineNumbers + nLineNumbers, offset, findLine) - 1; | - | ||||||
| 28 | return executed 4658858 times by 40 tests: line->line;return line->line;Executed by:
executed 4658858 times by 40 tests: return line->line;Executed by:
| 4658858 | ||||||
| 29 | } | - | ||||||
| 30 | - | |||||||
| 31 | ReturnedValue CppStackFrame::thisObject() const { | - | ||||||
| 32 | return executed 1055360 times by 8 tests: jsFrame->thisObject.asReturnedValue();return jsFrame->thisObject.asReturnedValue();Executed by:
executed 1055360 times by 8 tests: return jsFrame->thisObject.asReturnedValue();Executed by:
| 1055360 | ||||||
| 33 | } | - | ||||||
| Switch to Source code | Preprocessed file |