Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | namespace QQmlJS { | - |
7 | | - |
8 | static inline int toDigit(char c) | - |
9 | { | - |
10 | if ((TRUE | never evaluated | FALSE | never evaluated |
c >= '0')TRUE | never evaluated | FALSE | never evaluated |
&& (TRUE | never evaluated | FALSE | never evaluated |
c <= '9')TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
11 | return never executed: return c - '0'; c - '0';never executed: return c - '0'; | 0 |
12 | else if ((TRUE | never evaluated | FALSE | never evaluated |
c >= 'a')TRUE | never evaluated | FALSE | never evaluated |
&& (TRUE | never evaluated | FALSE | never evaluated |
c <= 'z')TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
13 | return never executed: return 10 + c - 'a'; 10 + c - 'a';never executed: return 10 + c - 'a'; | 0 |
14 | else if ((TRUE | never evaluated | FALSE | never evaluated |
c >= 'A')TRUE | never evaluated | FALSE | never evaluated |
&& (TRUE | never evaluated | FALSE | never evaluated |
c <= 'Z')TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
15 | return never executed: return 10 + c - 'A'; 10 + c - 'A';never executed: return 10 + c - 'A'; | 0 |
16 | return never executed: return -1; -1;never executed: return -1; | 0 |
17 | } | - |
18 | | - |
19 | double integerFromString(const char *buf, int size, int radix) | - |
20 | { | - |
21 | if (size == 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
22 | return never executed: return qt_qnan(); qt_qnan();never executed: return qt_qnan(); | 0 |
23 | | - |
24 | double sign = 1.0; | - |
25 | int i = 0; | - |
26 | if (buf[0] == '+'TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
27 | ++i; | - |
28 | } never executed: end of block else if (buf[0] == '-'TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
29 | sign = -1.0; | - |
30 | ++i; | - |
31 | } never executed: end of block | 0 |
32 | | - |
33 | if (((TRUE | never evaluated | FALSE | never evaluated |
size-i) >= 2)TRUE | never evaluated | FALSE | never evaluated |
&& (TRUE | never evaluated | FALSE | never evaluated |
buf[i] == '0')TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
34 | if (((TRUE | never evaluated | FALSE | never evaluated |
buf[i+1] == 'x')TRUE | never evaluated | FALSE | never evaluated |
|| (TRUE | never evaluated | FALSE | never evaluated |
buf[i+1] == 'X')TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
35 | && (TRUE | never evaluated | FALSE | never evaluated |
radix < 34)TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
36 | if ((TRUE | never evaluated | FALSE | never evaluated |
radix != 0)TRUE | never evaluated | FALSE | never evaluated |
&& (TRUE | never evaluated | FALSE | never evaluated |
radix != 16)TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
37 | return never executed: return 0; 0;never executed: return 0; | 0 |
38 | radix = 16; | - |
39 | i += 2; | - |
40 | } never executed: end of block else { | 0 |
41 | if (radix == 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
42 | radix = 8; | - |
43 | ++i; | - |
44 | } never executed: end of block | 0 |
45 | } never executed: end of block | 0 |
46 | } else if (radix == 0TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
47 | radix = 10; | - |
48 | } never executed: end of block | 0 |
49 | | - |
50 | int j = i; | - |
51 | for ( ; i < sizeTRUE | never evaluated | FALSE | never evaluated |
; ++i) { | 0 |
52 | int d = toDigit(buf[i]); | - |
53 | if ((TRUE | never evaluated | FALSE | never evaluated |
d == -1)TRUE | never evaluated | FALSE | never evaluated |
|| (TRUE | never evaluated | FALSE | never evaluated |
d >= radix)TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
54 | break; never executed: break; | 0 |
55 | } never executed: end of block | 0 |
56 | double result; | - |
57 | if (j == iTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
58 | if (!qstrcmp(buf, "Infinity")TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
59 | result = qInf(); never executed: result = qInf(); | 0 |
60 | else | - |
61 | result = qt_qnan(); never executed: result = qt_qnan(); | 0 |
62 | } else { | - |
63 | result = 0; | - |
64 | double multiplier = 1; | - |
65 | for (--i ; i >= jTRUE | never evaluated | FALSE | never evaluated |
; --i, multiplier *= radix) | 0 |
66 | result += toDigit(buf[i]) * multiplier; never executed: result += toDigit(buf[i]) * multiplier; | 0 |
67 | } never executed: end of block | 0 |
68 | result *= sign; | - |
69 | return never executed: return result; result;never executed: return result; | 0 |
70 | } | - |
71 | | - |
72 | Engine::Engine() | - |
73 | : _lexer(nullptr), _directives(nullptr) | - |
74 | { }executed 2978571 times by 148 tests: end of block 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_qmlmin
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlconsole
- tst_qqmlcontext
- tst_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginecleanup
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- ...
| 2978571 |
75 | | - |
76 | Engine::~Engine() | - |
77 | { } | - |
78 | | - |
79 | void Engine::setCode(const QString &code) | - |
80 | { _code = code; }executed 2979904 times by 148 tests: end of block 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_qmlmin
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlconsole
- tst_qqmlcontext
- tst_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginecleanup
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- ...
| 2979904 |
81 | | - |
82 | void Engine::addComment(int pos, int len, int line, int col) | - |
83 | { if (len > 0TRUE | evaluated 2066624 times by 93 testsEvaluated by:- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_parserstress
- tst_qjsengine
- tst_qmlmin
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlconsole
- tst_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginecleanup
- tst_qqmlimport
- tst_qqmlinstantiator
- tst_qqmllistmodel
- tst_qqmllocale
- tst_qqmlmoduleplugin
- tst_qqmlnotifier
- tst_qqmlparser
- tst_qqmlproperty
- tst_qqmlqt
- tst_qqmlsettings
- ...
| FALSE | evaluated 16410 times by 7 testsEvaluated by:- tst_ecmascripttests
- tst_examples
- tst_parserstress
- tst_qjsengine
- tst_qmlmin
- tst_qqmlecmascript
- tst_qqmlparser
|
) _comments.append(QQmlJS::AST::SourceLocation(pos, len, line, col));executed 2067346 times by 93 tests: _comments.append(QQmlJS::AST::SourceLocation(pos, len, line, col)); Executed by:- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_parserstress
- tst_qjsengine
- tst_qmlmin
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlconsole
- tst_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginecleanup
- tst_qqmlimport
- tst_qqmlinstantiator
- tst_qqmllistmodel
- tst_qqmllocale
- tst_qqmlmoduleplugin
- tst_qqmlnotifier
- tst_qqmlparser
- tst_qqmlproperty
- tst_qqmlqt
- tst_qqmlsettings
- ...
}executed 2086837 times by 93 tests: end of block Executed by:- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_parserstress
- tst_qjsengine
- tst_qmlmin
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlconsole
- tst_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginecleanup
- tst_qqmlimport
- tst_qqmlinstantiator
- tst_qqmllistmodel
- tst_qqmllocale
- tst_qqmlmoduleplugin
- tst_qqmlnotifier
- tst_qqmlparser
- tst_qqmlproperty
- tst_qqmlqt
- tst_qqmlsettings
- ...
| 16410-2086837 |
84 | | - |
85 | QList<QQmlJS::AST::SourceLocation> Engine::comments() const | - |
86 | { return never executed: return _comments; _comments;never executed: return _comments; } | 0 |
87 | | - |
88 | Lexer *Engine::lexer() const | - |
89 | { returnexecuted 2938488 times by 147 tests: return _lexer; 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginecleanup
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlfileselector
- ...
_lexer;executed 2938488 times by 147 tests: return _lexer; 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginecleanup
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlfileselector
- ...
} | 2938488 |
90 | | - |
91 | void Engine::setLexer(Lexer *lexer) | - |
92 | { _lexer = lexer; }executed 2978109 times by 148 tests: end of block 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_qmlmin
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconnections
- tst_qqmlconsole
- tst_qqmlcontext
- tst_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginecleanup
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- ...
| 2978109 |
93 | | - |
94 | Directives *Engine::directives() const | - |
95 | { returnexecuted 1768203 times by 26 tests: return _directives; Executed by:- tst_ecmascripttests
- tst_examples
- tst_qjsengine
- tst_qjsonbinding
- tst_qjsvalue
- tst_qjsvalueiterator
- tst_qmlcachegen
- tst_qqmlcontext
- tst_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlincubator
- tst_qqmllistmodelworkerscript
- tst_qqmlmetatype
- tst_qqmlparser
- tst_qqmlqt
- tst_qqmlsqldatabase
- tst_qqmltranslation
- tst_qqmlvaluetypes
- tst_qqmlxmlhttprequest
- tst_qquickanimationcontroller
- tst_qquicklayouts
- tst_qquickworkerscript
- tst_quicktestmainwithsetup
- tst_qv4assembler
- tst_qv4debugger
- ...
_directives;executed 1768203 times by 26 tests: return _directives; Executed by:- tst_ecmascripttests
- tst_examples
- tst_qjsengine
- tst_qjsonbinding
- tst_qjsvalue
- tst_qjsvalueiterator
- tst_qmlcachegen
- tst_qqmlcontext
- tst_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlincubator
- tst_qqmllistmodelworkerscript
- tst_qqmlmetatype
- tst_qqmlparser
- tst_qqmlqt
- tst_qqmlsqldatabase
- tst_qqmltranslation
- tst_qqmlvaluetypes
- tst_qqmlxmlhttprequest
- tst_qquickanimationcontroller
- tst_qquicklayouts
- tst_qquickworkerscript
- tst_quicktestmainwithsetup
- tst_qv4assembler
- tst_qv4debugger
- ...
} | 1768203 |
96 | | - |
97 | void Engine::setDirectives(Directives *directives) | - |
98 | { _directives = directives; }executed 116 times by 12 tests: end of block Executed by:- tst_examples
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlincubator
- tst_qqmlqt
- tst_qqmlsqldatabase
- tst_qqmltranslation
- tst_qqmlvaluetypes
- tst_qquickanimationcontroller
- tst_qquicklayouts
- tst_quicktestmainwithsetup
- tst_testfiltering
| 116 |
99 | | - |
100 | MemoryPool *Engine::pool() | - |
101 | { returnexecuted 3143856 times by 147 tests: return &_pool; 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginecleanup
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlfileselector
- ...
&_pool;executed 3143856 times by 147 tests: return &_pool; 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_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginecleanup
- tst_qqmlenginedebugservice
- tst_qqmlexpression
- tst_qqmlfileselector
- ...
} | 3143856 |
102 | | - |
103 | QStringRef Engine::newStringRef(const QString &text) | - |
104 | { | - |
105 | const int pos = _extraCode.length(); | - |
106 | _extraCode += text; | - |
107 | returnexecuted 1180168 times by 89 tests: return _extraCode.midRef(pos, text.length()); Executed by:- tst_bindingdependencyapi
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_parserstress
- tst_qjsengine
- tst_qjsonbinding
- tst_qjsvalue
- tst_qmlcachegen
- tst_qmlmin
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconsole
- tst_qqmlcontext
- tst_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- ...
_extraCode.midRef(pos, text.length());executed 1180168 times by 89 tests: return _extraCode.midRef(pos, text.length()); Executed by:- tst_bindingdependencyapi
- tst_ecmascripttests
- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_parserstress
- tst_qjsengine
- tst_qjsonbinding
- tst_qjsvalue
- tst_qmlcachegen
- tst_qmlmin
- tst_qqmlapplicationengine
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlconsole
- tst_qqmlcontext
- tst_qqmldebugjs
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlincubator
- tst_qqmlinfo
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- ...
| 1180168 |
108 | } | - |
109 | | - |
110 | QStringRef Engine::newStringRef(const QChar *chars, int size) | - |
111 | { return never executed: return newStringRef(QString(chars, size)); newStringRef(QString(chars, size));never executed: return newStringRef(QString(chars, size)); } | 0 |
112 | | - |
113 | } | - |
114 | | - |
115 | | - |
| | |