OpenCoverage

YarrParser.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/3rdparty/masm/yarr/YarrParser.h
Switch to Source codePreprocessed file
LineSourceCount
1namespace JSC { namespace Yarr {-
2-
3-
4-
5enum BuiltInCharacterClassID {-
6 DigitClassID,-
7 SpaceClassID,-
8 WordClassID,-
9 NewlineClassID,-
10};-
11-
12-
13template<class Delegate, typename CharType>-
14class Parser {-
15private:-
16 template<class FriendDelegate>-
17 friend const char* parse(FriendDelegate&, const String& pattern, unsigned backReferenceLimit);-
18-
19 enum ErrorCode {-
20 NoError,-
21 PatternTooLarge,-
22 QuantifierOutOfOrder,-
23 QuantifierWithoutAtom,-
24 QuantifierTooLarge,-
25 MissingParentheses,-
26 ParenthesesUnmatched,-
27 ParenthesesTypeInvalid,-
28 CharacterClassUnmatched,-
29 CharacterClassOutOfOrder,-
30 EscapeUnterminated,-
31 NumberOfErrorCodes-
32 };-
33 class CharacterClassParserDelegate {-
34 public:-
35 CharacterClassParserDelegate(Delegate& delegate, ErrorCode& err)-
36 : m_delegate(delegate)-
37 , m_err(err)-
38 , m_state(Empty)-
39 , m_character(0)-
40 {-
41 }
executed 3557 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
3557
42-
43-
44-
45-
46-
47-
48 void begin(bool invert)-
49 {-
50 m_delegate.atomCharacterClassBegin(invert);-
51 }
executed 3558 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
3558
52 void atomPatternCharacter(UChar ch, bool hyphenIsRange = false)-
53 {-
54 switch (m_state) {-
55 case
executed 32 times by 1 test: case AfterCharacterClass:
Executed by:
  • tst_ecmascripttests
AfterCharacterClass:
executed 32 times by 1 test: case AfterCharacterClass:
Executed by:
  • tst_ecmascripttests
32
56-
57-
58-
59-
60-
61-
62-
63 if (hyphenIsRange
hyphenIsRangeDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& ch == '-'
ch == '-'Description
TRUEnever evaluated
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
0-28
64 m_delegate.atomCharacterClassAtom('-');-
65 m_state = AfterCharacterClassHyphen;-
66 return;
never executed: return;
0
67 }-
68 (void)0;-
69-
70 case
executed 2847 times by 6 tests: case Empty:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
Empty:
executed 2847 times by 6 tests: case Empty:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
code before this statement executed 32 times by 1 test: case Empty:
Executed by:
  • tst_ecmascripttests
32-2847
71 m_character = ch;-
72 m_state = CachedCharacter;-
73 return;
executed 2880 times by 6 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
2880
74-
75 case
executed 3808 times by 6 tests: case CachedCharacter:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
CachedCharacter:
executed 3808 times by 6 tests: case CachedCharacter:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
3808
76 if (hyphenIsRange
hyphenIsRangeDescription
TRUEevaluated 3180 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
FALSEevaluated 628 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& ch == '-'
ch == '-'Description
TRUEevaluated 1681 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
FALSEevaluated 1498 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
)
628-3180
77 m_state = CachedCharacterHyphen;
executed 1682 times by 5 tests: m_state = CachedCharacterHyphen;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
1682
78 else {-
79 m_delegate.atomCharacterClassAtom(m_character);-
80 m_character = ch;-
81 }
executed 2126 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
2126
82 return;
executed 3806 times by 6 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
3806
83-
84 case
executed 1535 times by 5 tests: case CachedCharacterHyphen:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
CachedCharacterHyphen:
executed 1535 times by 5 tests: case CachedCharacterHyphen:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
1535
85 if (ch < m_character
ch < m_characterDescription
TRUEevaluated 176 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1359 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
) {
176-1359
86 m_err = CharacterClassOutOfOrder;-
87 return;
executed 176 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
176
88 }-
89 m_delegate.atomCharacterClassRange(m_character, ch);-
90 m_state = Empty;-
91 return;
executed 1359 times by 5 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
1359
92 case
never executed: case AfterCharacterClassHyphen:
AfterCharacterClassHyphen:
never executed: case AfterCharacterClassHyphen:
0
93 m_delegate.atomCharacterClassAtom(ch);-
94 m_state = Empty;-
95 return;
never executed: return;
0
96 }-
97 }
never executed: end of block
0
98-
99-
100-
101-
102-
103-
104 void atomBuiltInCharacterClass(BuiltInCharacterClassID classID, bool invert)-
105 {-
106 switch (m_state) {-
107 case
never executed: case CachedCharacter:
CachedCharacter:
never executed: case CachedCharacter:
0
108-
109 m_delegate.atomCharacterClassAtom(m_character);-
110 (void)0;-
111-
112 case
executed 1407 times by 1 test: case Empty:
Executed by:
  • tst_ecmascripttests
code before this statement never executed: case Empty:
executed 1407 times by 1 test: case Empty:
Executed by:
  • tst_ecmascripttests
Empty:
code before this statement never executed: case Empty:
executed 1407 times by 1 test: case Empty:
Executed by:
  • tst_ecmascripttests
0-1407
113 case
executed 1248 times by 1 test: case AfterCharacterClass:
Executed by:
  • tst_ecmascripttests
AfterCharacterClass:
executed 1248 times by 1 test: case AfterCharacterClass:
Executed by:
  • tst_ecmascripttests
1248
114 m_state = AfterCharacterClass;-
115 m_delegate.atomCharacterClassBuiltIn(classID, invert);-
116 return;
executed 2656 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
2656
117 case
never executed: case CachedCharacterHyphen:
CachedCharacterHyphen:
never executed: case CachedCharacterHyphen:
0
118 m_delegate.atomCharacterClassAtom(m_character);-
119 m_delegate.atomCharacterClassAtom('-');-
120-
121 case
never executed: case AfterCharacterClassHyphen:
AfterCharacterClassHyphen:
never executed: case AfterCharacterClassHyphen:
code before this statement never executed: case AfterCharacterClassHyphen:
0
122 m_delegate.atomCharacterClassBuiltIn(classID, invert);-
123 m_state = Empty;-
124 return;
never executed: return;
0
125 }-
126 }
never executed: end of block
0
127-
128-
129-
130-
131-
132-
133 void end()-
134 {-
135 if (m_state == CachedCharacter
m_state == CachedCharacterDescription
TRUEevaluated 1202 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 2182 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
)
1202-2182
136 m_delegate.atomCharacterClassAtom(m_character);
executed 1202 times by 3 tests: m_delegate.atomCharacterClassAtom(m_character);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
1202
137 else if (m_state == CachedCharacterHyphen
m_state == Cac...haracterHyphenDescription
TRUEevaluated 146 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicktextinput
FALSEevaluated 2036 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
) {
146-2036
138 m_delegate.atomCharacterClassAtom(m_character);-
139 m_delegate.atomCharacterClassAtom('-');-
140 }
executed 146 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qquicktextinput
146
141 m_delegate.atomCharacterClassEnd();-
142 }
executed 3384 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
3384
143-
144-
145-
146 void assertionWordBoundary(bool) { do { qmlWTFReportAssertionFailure(__FILE__, 216, __PRETTY_FUNCTION__, 0); (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap()); } while (0); }
never executed: end of block
0
147 void atomBackReference(unsigned) { do { qmlWTFReportAssertionFailure(__FILE__, 217, __PRETTY_FUNCTION__, 0); (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap()); } while (0); }
never executed: end of block
0
148-
149 private:-
150 Delegate& m_delegate;-
151 ErrorCode& m_err;-
152 enum CharacterClassConstructionState {-
153 Empty,-
154 CachedCharacter,-
155 CachedCharacterHyphen,-
156 AfterCharacterClass,-
157 AfterCharacterClassHyphen,-
158 } m_state;-
159 UChar m_character;-
160 };-
161-
162 Parser(Delegate& delegate, const String& pattern, unsigned backReferenceLimit)-
163 : m_delegate(delegate)-
164 , m_backReferenceLimit(backReferenceLimit)-
165 , m_err(NoError)-
166 , m_data(pattern.getCharacters<CharType>())-
167 , m_size(pattern.length())-
168 , m_index(0)-
169 , m_parenthesesNestingDepth(0)-
170 {-
171 }
executed 1149133 times by 153 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_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1149133
172 template<bool inCharacterClass, class EscapeDelegate>-
173 bool parseEscape(EscapeDelegate& delegate)-
174 {-
175 (!(!m_err) ? (qmlWTFReportAssertionFailure(__FILE__, 266, __PRETTY_FUNCTION__, "!m_err"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
176 (!(peek() == '\\') ? (qmlWTFReportAssertionFailure(__FILE__, 267, __PRETTY_FUNCTION__, "peek() == '\\\\'"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
177 consume();-
178-
179 if (atEndOfPattern()
atEndOfPattern()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 532695 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
) {
4-532695
180 m_err = EscapeUnterminated;-
181 return
executed 4 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
false;
executed 4 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
4
182 }-
183-
184 switch (peek()) {-
185-
186 case
executed 1076 times by 1 test: case 'b':
Executed by:
  • tst_ecmascripttests
'b':
executed 1076 times by 1 test: case 'b':
Executed by:
  • tst_ecmascripttests
1076
187 consume();-
188 if (inCharacterClass
inCharacterClassDescription
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1052 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
24-1052
189 delegate.
executed 24 times by 1 test: delegate.atomPatternCharacter('\b');
Executed by:
  • tst_ecmascripttests
atomPatternCharacter('\b');
executed 24 times by 1 test: delegate.atomPatternCharacter('\b');
Executed by:
  • tst_ecmascripttests
24
190 else {-
191 delegate.assertionWordBoundary(false);-
192 return
executed 1052 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
false;
executed 1052 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
1052
193 }-
194 break;
executed 24 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
24
195 case
executed 87 times by 1 test: case 'B':
Executed by:
  • tst_ecmascripttests
'B':
executed 87 times by 1 test: case 'B':
Executed by:
  • tst_ecmascripttests
87
196 consume();-
197 if (inCharacterClass
inCharacterClassDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 83 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
4-83
198 delegate.
executed 4 times by 1 test: delegate.atomPatternCharacter('B');
Executed by:
  • tst_ecmascripttests
atomPatternCharacter('B');
executed 4 times by 1 test: delegate.atomPatternCharacter('B');
Executed by:
  • tst_ecmascripttests
4
199 else {-
200 delegate.assertionWordBoundary(true);-
201 return
executed 84 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
false;
executed 84 times by 1 test: return false;
Executed by:
  • tst_ecmascripttests
84
202 }-
203 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
4
204-
205-
206 case
executed 370 times by 3 tests: case 'd':
Executed by:
  • tst_ecmascripttests
  • tst_qquicktextinput
  • tst_qquickworkerscript
'd':
executed 370 times by 3 tests: case 'd':
Executed by:
  • tst_ecmascripttests
  • tst_qquicktextinput
  • tst_qquickworkerscript
370
207 consume();-
208 delegate.atomBuiltInCharacterClass(DigitClassID, false);-
209 break;
executed 369 times by 3 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qquicktextinput
  • tst_qquickworkerscript
369
210 case
executed 1390 times by 3 tests: case 's':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
's':
executed 1390 times by 3 tests: case 's':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
1390
211 consume();-
212 delegate.atomBuiltInCharacterClass(SpaceClassID, false);-
213 break;
executed 1390 times by 3 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
1390
214 case
executed 104 times by 1 test: case 'w':
Executed by:
  • tst_ecmascripttests
'w':
executed 104 times by 1 test: case 'w':
Executed by:
  • tst_ecmascripttests
104
215 consume();-
216 delegate.atomBuiltInCharacterClass(WordClassID, false);-
217 break;
executed 104 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
104
218 case
executed 36 times by 1 test: case 'D':
Executed by:
  • tst_ecmascripttests
'D':
executed 36 times by 1 test: case 'D':
Executed by:
  • tst_ecmascripttests
36
219 consume();-
220 delegate.atomBuiltInCharacterClass(DigitClassID, true);-
221 break;
executed 36 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
36
222 case
executed 1304 times by 1 test: case 'S':
Executed by:
  • tst_ecmascripttests
'S':
executed 1304 times by 1 test: case 'S':
Executed by:
  • tst_ecmascripttests
1304
223 consume();-
224 delegate.atomBuiltInCharacterClass(SpaceClassID, true);-
225 break;
executed 1304 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
1304
226 case
executed 36 times by 1 test: case 'W':
Executed by:
  • tst_ecmascripttests
'W':
executed 36 times by 1 test: case 'W':
Executed by:
  • tst_ecmascripttests
36
227 consume();-
228 delegate.atomBuiltInCharacterClass(WordClassID, true);-
229 break;
executed 36 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
36
230-
231-
232 case
executed 116 times by 1 test: case '1':
Executed by:
  • tst_ecmascripttests
'1':
executed 116 times by 1 test: case '1':
Executed by:
  • tst_ecmascripttests
116
233 case
executed 48 times by 1 test: case '2':
Executed by:
  • tst_ecmascripttests
'2':
executed 48 times by 1 test: case '2':
Executed by:
  • tst_ecmascripttests
48
234 case
executed 24 times by 1 test: case '3':
Executed by:
  • tst_ecmascripttests
'3':
executed 24 times by 1 test: case '3':
Executed by:
  • tst_ecmascripttests
24
235 case
executed 24 times by 1 test: case '4':
Executed by:
  • tst_ecmascripttests
'4':
executed 24 times by 1 test: case '4':
Executed by:
  • tst_ecmascripttests
24
236 case
executed 28 times by 1 test: case '5':
Executed by:
  • tst_ecmascripttests
'5':
executed 28 times by 1 test: case '5':
Executed by:
  • tst_ecmascripttests
28
237 case
executed 24 times by 1 test: case '6':
Executed by:
  • tst_ecmascripttests
'6':
executed 24 times by 1 test: case '6':
Executed by:
  • tst_ecmascripttests
24
238 case
executed 24 times by 1 test: case '7':
Executed by:
  • tst_ecmascripttests
'7':
executed 24 times by 1 test: case '7':
Executed by:
  • tst_ecmascripttests
24
239 case
executed 24 times by 1 test: case '8':
Executed by:
  • tst_ecmascripttests
'8':
executed 24 times by 1 test: case '8':
Executed by:
  • tst_ecmascripttests
24
240 case
executed 24 times by 1 test: case '9':
Executed by:
  • tst_ecmascripttests
'9':
executed 24 times by 1 test: case '9':
Executed by:
  • tst_ecmascripttests
{
24
241-
242-
243 if (!inCharacterClass
!inCharacterClassDescription
TRUEevaluated 332 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
4-332
244 ParseState state = saveState();-
245-
246 unsigned backReference = consumeNumber();-
247 if (backReference <= m_backReferenceLimit
backReference ...ReferenceLimitDescription
TRUEevaluated 260 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 72 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
72-260
248 delegate.atomBackReference(backReference);-
249 break;
executed 260 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
260
250 }-
251-
252 restoreState(state);-
253 }
executed 72 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
72
254-
255-
256 if (peek() >= '8'
peek() >= '8'Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 60 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
16-60
257 delegate.atomPatternCharacter('\\');-
258 break;
executed 16 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
16
259 }-
260 }-
261 (void)0;-
262-
263-
264 case
executed 16 times by 1 test: case '0':
Executed by:
  • tst_ecmascripttests
'0':
executed 16 times by 1 test: case '0':
Executed by:
  • tst_ecmascripttests
code before this statement executed 60 times by 1 test: case '0':
Executed by:
  • tst_ecmascripttests
16-60
265 delegate.atomPatternCharacter(consumeOctal());-
266 break;
executed 76 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
76
267-
268-
269 case
executed 24 times by 1 test: case 'f':
Executed by:
  • tst_ecmascripttests
'f':
executed 24 times by 1 test: case 'f':
Executed by:
  • tst_ecmascripttests
24
270 consume();-
271 delegate.atomPatternCharacter('\f');-
272 break;
executed 24 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
24
273 case
executed 232 times by 1 test: case 'n':
Executed by:
  • tst_ecmascripttests
'n':
executed 232 times by 1 test: case 'n':
Executed by:
  • tst_ecmascripttests
232
274 consume();-
275 delegate.atomPatternCharacter('\n');-
276 break;
executed 232 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
232
277 case
executed 220 times by 1 test: case 'r':
Executed by:
  • tst_ecmascripttests
'r':
executed 220 times by 1 test: case 'r':
Executed by:
  • tst_ecmascripttests
220
278 consume();-
279 delegate.atomPatternCharacter('\r');-
280 break;
executed 220 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
220
281 case
executed 236 times by 1 test: case 't':
Executed by:
  • tst_ecmascripttests
't':
executed 236 times by 1 test: case 't':
Executed by:
  • tst_ecmascripttests
236
282 consume();-
283 delegate.atomPatternCharacter('\t');-
284 break;
executed 236 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
236
285 case
executed 24 times by 1 test: case 'v':
Executed by:
  • tst_ecmascripttests
'v':
executed 24 times by 1 test: case 'v':
Executed by:
  • tst_ecmascripttests
24
286 consume();-
287 delegate.atomPatternCharacter('\v');-
288 break;
executed 24 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
24
289-
290-
291 case
executed 220 times by 1 test: case 'c':
Executed by:
  • tst_ecmascripttests
'c':
executed 220 times by 1 test: case 'c':
Executed by:
  • tst_ecmascripttests
{
220
292 ParseState state = saveState();-
293 consume();-
294 if (!atEndOfPattern()
!atEndOfPattern()Description
TRUEevaluated 212 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
8-212
295 int control = consume();-
296-
297-
298 if (inCharacterClass
inCharacterClassDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 208 times by 1 test
Evaluated by:
  • tst_ecmascripttests
? WTF::isASCIIAlphanumeric(control)
WTF::isASCIIAl...meric(control)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
|| (
(control == '_')Description
TRUEnever evaluated
FALSEnever evaluated
control == '_')
(control == '_')Description
TRUEnever evaluated
FALSEnever evaluated
: WTF::isASCIIAlpha(control)
inCharacterCla...Alpha(control)Description
TRUEevaluated 212 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
) {
0-212
299 delegate.atomPatternCharacter(control & 0x1f);-
300 break;
executed 212 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
212
301 }-
302 }
never executed: end of block
0
303 restoreState(state);-
304 delegate.atomPatternCharacter('\\');-
305 break;
executed 8 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
8
306 }-
307-
308-
309 case
executed 788 times by 1 test: case 'x':
Executed by:
  • tst_ecmascripttests
'x':
executed 788 times by 1 test: case 'x':
Executed by:
  • tst_ecmascripttests
{
788
310 consume();-
311 int x = tryConsumeHex(2);-
312 if (x == -1
x == -1Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 780 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-780
313 delegate.
executed 8 times by 1 test: delegate.atomPatternCharacter('x');
Executed by:
  • tst_ecmascripttests
atomPatternCharacter('x');
executed 8 times by 1 test: delegate.atomPatternCharacter('x');
Executed by:
  • tst_ecmascripttests
8
314 else-
315 delegate.
executed 780 times by 1 test: delegate.atomPatternCharacter(x);
Executed by:
  • tst_ecmascripttests
atomPatternCharacter(x);
executed 780 times by 1 test: delegate.atomPatternCharacter(x);
Executed by:
  • tst_ecmascripttests
780
316 break;
executed 788 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
788
317 }-
318-
319-
320 case
executed 539 times by 1 test: case 'u':
Executed by:
  • tst_ecmascripttests
'u':
executed 539 times by 1 test: case 'u':
Executed by:
  • tst_ecmascripttests
{
539
321 consume();-
322 int u = tryConsumeHex(4);-
323 if (u == -1
u == -1Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 531 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
8-531
324 delegate.
executed 8 times by 1 test: delegate.atomPatternCharacter('u');
Executed by:
  • tst_ecmascripttests
atomPatternCharacter('u');
executed 8 times by 1 test: delegate.atomPatternCharacter('u');
Executed by:
  • tst_ecmascripttests
8
325 else-
326 delegate.
executed 531 times by 1 test: delegate.atomPatternCharacter(u);
Executed by:
  • tst_ecmascripttests
atomPatternCharacter(u);
executed 531 times by 1 test: delegate.atomPatternCharacter(u);
Executed by:
  • tst_ecmascripttests
531
327 break;
executed 540 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
540
328 }-
329-
330-
331 default
executed 525653 times by 3 tests: default:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
:
executed 525653 times by 3 tests: default:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
525653
332 delegate.atomPatternCharacter(consume());-
333 }
executed 525668 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
525668
334-
335 return
executed 531567 times by 5 tests: return true;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
true;
executed 531567 times by 5 tests: return true;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
531567
336 }-
337-
338-
339-
340-
341-
342-
343 bool parseAtomEscape()-
344 {-
345 return
executed 528636 times by 5 tests: return parseEscape<false>(m_delegate);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
parseEscape<false>(m_delegate);
executed 528636 times by 5 tests: return parseEscape<false>(m_delegate);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
528636
346 }-
347 void parseCharacterClassEscape(CharacterClassParserDelegate& delegate)-
348 {-
349 parseEscape<true>(delegate);-
350 }
executed 4068 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
4068
351 void parseCharacterClass()-
352 {-
353 (!(!m_err) ? (qmlWTFReportAssertionFailure(__FILE__, 452, __PRETTY_FUNCTION__, "!m_err"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
354 (!(peek() == '[') ? (qmlWTFReportAssertionFailure(__FILE__, 453, __PRETTY_FUNCTION__, "peek() == '['"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
355 consume();-
356-
357 CharacterClassParserDelegate characterClassConstructor(m_delegate, m_err);-
358-
359 characterClassConstructor.begin(tryConsume('^'));-
360-
361 while (!atEndOfPattern()
!atEndOfPattern()Description
TRUEevaluated 14263 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
FALSEnever evaluated
) {
0-14263
362 switch (peek()) {-
363 case
executed 3384 times by 6 tests: case ']':
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
']':
executed 3384 times by 6 tests: case ']':
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
3384
364 consume();-
365 characterClassConstructor.end();-
366 return;
executed 3384 times by 6 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
3384
367-
368 case
executed 4068 times by 1 test: case '\\':
Executed by:
  • tst_ecmascripttests
'\\':
executed 4068 times by 1 test: case '\\':
Executed by:
  • tst_ecmascripttests
4068
369 parseCharacterClassEscape(characterClassConstructor);-
370 break;
executed 4068 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
4068
371-
372 default
executed 6809 times by 6 tests: default:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
:
executed 6809 times by 6 tests: default:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
6809
373 characterClassConstructor.atomPatternCharacter(consume(), true);-
374 }
executed 6810 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
6810
375-
376 if (m_err
m_errDescription
TRUEevaluated 176 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 10703 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
)
176-10703
377 return;
executed 176 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
176
378 }
executed 10705 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
10705
379-
380 m_err = CharacterClassUnmatched;-
381 }
never executed: end of block
0
382-
383-
384-
385-
386-
387-
388 void parseParenthesesBegin()-
389 {-
390 (!(!m_err) ? (qmlWTFReportAssertionFailure(__FILE__, 489, __PRETTY_FUNCTION__, "!m_err"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
391 (!(peek() == '(') ? (qmlWTFReportAssertionFailure(__FILE__, 490, __PRETTY_FUNCTION__, "peek() == '('"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
392 consume();-
393-
394 if (tryConsume('?')
tryConsume('?')Description
TRUEevaluated 1027 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2548 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
) {
1027-2548
395 if (atEndOfPattern()
atEndOfPattern()Description
TRUEnever evaluated
FALSEevaluated 1027 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
0-1027
396 m_err = ParenthesesTypeInvalid;-
397 return;
never executed: return;
0
398 }-
399-
400 switch (consume()) {-
401 case
executed 951 times by 1 test: case ':':
Executed by:
  • tst_ecmascripttests
':':
executed 951 times by 1 test: case ':':
Executed by:
  • tst_ecmascripttests
951
402 m_delegate.atomParenthesesSubpatternBegin(false);-
403 break;
executed 952 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
952
404-
405 case
executed 32 times by 1 test: case '=':
Executed by:
  • tst_ecmascripttests
'=':
executed 32 times by 1 test: case '=':
Executed by:
  • tst_ecmascripttests
32
406 m_delegate.atomParentheticalAssertionBegin();-
407 break;
executed 32 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
32
408-
409 case
executed 44 times by 1 test: case '!':
Executed by:
  • tst_ecmascripttests
'!':
executed 44 times by 1 test: case '!':
Executed by:
  • tst_ecmascripttests
44
410 m_delegate.atomParentheticalAssertionBegin(true);-
411 break;
executed 44 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
44
412-
413 default
never executed: default:
:
never executed: default:
0
414 m_err = ParenthesesTypeInvalid;-
415 }
never executed: end of block
0
416 } else-
417 m_delegate.atomParenthesesSubpatternBegin();
executed 2548 times by 3 tests: m_delegate.atomParenthesesSubpatternBegin();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
2548
418-
419 ++m_parenthesesNestingDepth;-
420 }
executed 3577 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
3577
421-
422-
423-
424-
425-
426-
427 void parseParenthesesEnd()-
428 {-
429 (!(!m_err) ? (qmlWTFReportAssertionFailure(__FILE__, 528, __PRETTY_FUNCTION__, "!m_err"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
430 (!(peek() == ')') ? (qmlWTFReportAssertionFailure(__FILE__, 529, __PRETTY_FUNCTION__, "peek() == ')'"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
431 consume();-
432-
433 if (m_parenthesesNestingDepth > 0
m_parenthesesNestingDepth > 0Description
TRUEevaluated 3577 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEnever evaluated
)
0-3577
434 m_delegate.atomParenthesesEnd();
executed 3577 times by 3 tests: m_delegate.atomParenthesesEnd();
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
3577
435 else-
436 m_err = ParenthesesUnmatched;
never executed: m_err = ParenthesesUnmatched;
0
437-
438 --m_parenthesesNestingDepth;-
439 }
executed 3575 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
3575
440-
441-
442-
443-
444-
445-
446 void parseQuantifier(bool lastTokenWasAnAtom, unsigned min, unsigned max)-
447 {-
448 (!(!m_err) ? (qmlWTFReportAssertionFailure(__FILE__, 547, __PRETTY_FUNCTION__, "!m_err"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
449 (!(min <= max) ? (qmlWTFReportAssertionFailure(__FILE__, 548, __PRETTY_FUNCTION__, "min <= max"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
450-
451 if (min ==
min == (0x7fffffff * 2U + 1U)Description
TRUEnever evaluated
FALSEevaluated 4209 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
0-4209
452 (0x7fffffff * 2U + 1U)
min == (0x7fffffff * 2U + 1U)Description
TRUEnever evaluated
FALSEevaluated 4209 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
0-4209
453 ) {-
454 m_err = QuantifierTooLarge;-
455 return;
never executed: return;
0
456 }-
457-
458 if (lastTokenWasAnAtom
lastTokenWasAnAtomDescription
TRUEevaluated 4144 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEevaluated 66 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
66-4144
459 m_delegate.quantifyAtom(min, max, !tryConsume('?'));
executed 4143 times by 8 tests: m_delegate.quantifyAtom(min, max, !tryConsume('?'));
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
4143
460 else-
461 m_err = QuantifierWithoutAtom;
executed 66 times by 1 test: m_err = QuantifierWithoutAtom;
Executed by:
  • tst_ecmascripttests
66
462 }-
463 void parseTokens()-
464 {-
465 bool lastTokenWasAnAtom = false;-
466-
467 while (!atEndOfPattern()
!atEndOfPattern()Description
TRUEevaluated 2386463 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEevaluated 1150925 times by 153 tests
Evaluated 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_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
) {
1150925-2386463
468 switch (peek()) {-
469 case
executed 1163 times by 4 tests: case '|':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
'|':
executed 1163 times by 4 tests: case '|':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
1163
470 consume();-
471 m_delegate.disjunction();-
472 lastTokenWasAnAtom = false;-
473 break;
executed 1164 times by 4 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
1164
474-
475 case
executed 3574 times by 3 tests: case '(':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
'(':
executed 3574 times by 3 tests: case '(':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
3574
476 parseParenthesesBegin();-
477 lastTokenWasAnAtom = false;-
478 break;
executed 3577 times by 3 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
3577
479-
480 case
executed 3578 times by 3 tests: case ')':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
')':
executed 3578 times by 3 tests: case ')':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
3578
481 parseParenthesesEnd();-
482 lastTokenWasAnAtom = true;-
483 break;
executed 3575 times by 3 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
3575
484-
485 case
executed 180 times by 5 tests: case '^':
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
'^':
executed 180 times by 5 tests: case '^':
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
180
486 consume();-
487 m_delegate.assertionBOL();-
488 lastTokenWasAnAtom = false;-
489 break;
executed 181 times by 5 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
181
490-
491 case
executed 178 times by 5 tests: case '$':
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
'$':
executed 178 times by 5 tests: case '$':
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
178
492 consume();-
493 m_delegate.assertionEOL();-
494 lastTokenWasAnAtom = false;-
495 break;
executed 178 times by 5 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
178
496-
497 case
executed 627 times by 3 tests: case '.':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
'.':
executed 627 times by 3 tests: case '.':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
627
498 consume();-
499 m_delegate.atomBuiltInCharacterClass(NewlineClassID, true);-
500 lastTokenWasAnAtom = true;-
501 break;
executed 626 times by 3 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
626
502-
503 case
executed 3556 times by 6 tests: case '[':
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
'[':
executed 3556 times by 6 tests: case '[':
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
3556
504 parseCharacterClass();-
505 lastTokenWasAnAtom = true;-
506 break;
executed 3559 times by 6 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
3559
507-
508 case
executed 528641 times by 5 tests: case '\\':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
'\\':
executed 528641 times by 5 tests: case '\\':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
528641
509 lastTokenWasAnAtom = parseAtomEscape();-
510 break;
executed 528635 times by 5 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
528635
511-
512 case
executed 2086 times by 3 tests: case '*':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
'*':
executed 2086 times by 3 tests: case '*':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
2086
513 consume();-
514 parseQuantifier(lastTokenWasAnAtom, 0, quantifyInfinite);-
515 lastTokenWasAnAtom = false;-
516 break;
executed 2087 times by 3 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
2087
517-
518 case
executed 958 times by 6 tests: case '+':
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
'+':
executed 958 times by 6 tests: case '+':
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
958
519 consume();-
520 parseQuantifier(lastTokenWasAnAtom, 1, quantifyInfinite);-
521 lastTokenWasAnAtom = false;-
522 break;
executed 957 times by 6 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
957
523-
524 case
executed 718 times by 4 tests: case '?':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
  • tst_qquickworkerscript
'?':
executed 718 times by 4 tests: case '?':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
  • tst_qquickworkerscript
718
525 consume();-
526 parseQuantifier(lastTokenWasAnAtom, 0, 1);-
527 lastTokenWasAnAtom = false;-
528 break;
executed 718 times by 4 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
  • tst_qquickworkerscript
718
529-
530 case
executed 450 times by 3 tests: case '{':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
'{':
executed 450 times by 3 tests: case '{':
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
{
450
531 ParseState state = saveState();-
532-
533 consume();-
534 if (peekIsDigit()
peekIsDigit()Description
TRUEevaluated 450 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEnever evaluated
) {
0-450
535 unsigned min = consumeNumber();-
536 unsigned max = min;-
537-
538 if (tryConsume(',')
tryConsume(',')Description
TRUEevaluated 154 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 298 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
)
154-298
539 max = peekIsDigit()
peekIsDigit()Description
TRUEevaluated 105 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 48 times by 1 test
Evaluated by:
  • tst_ecmascripttests
? consumeNumber() : quantifyInfinite;
executed 154 times by 3 tests: max = peekIsDigit() ? consumeNumber() : quantifyInfinite;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
48-154
540-
541 if (tryConsume('}')
tryConsume('}')Description
TRUEevaluated 450 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qjsengine
) {
2-450
542 if (min <= max
min <= maxDescription
TRUEevaluated 446 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
4-446
543 parseQuantifier(lastTokenWasAnAtom, min, max);
executed 446 times by 3 tests: parseQuantifier(lastTokenWasAnAtom, min, max);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
446
544 else-
545 m_err = QuantifierOutOfOrder;
executed 4 times by 1 test: m_err = QuantifierOutOfOrder;
Executed by:
  • tst_ecmascripttests
4
546 lastTokenWasAnAtom = false;-
547 break;
executed 450 times by 3 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
450
548 }-
549 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qjsengine
2
550-
551 restoreState(state);-
552 }-
553 (void)0;-
554-
555 default
executed 1842410 times by 6 tests: default:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
:
executed 1842410 times by 6 tests: default:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
code before this statement executed 2 times by 1 test: default:
Executed by:
  • tst_qjsengine
2-1842410
556 m_delegate.atomPatternCharacter(consume());-
557 lastTokenWasAnAtom = true;-
558 }
executed 1843164 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
1843164
559-
560 if (m_err
m_errDescription
TRUEevaluated 252 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2388738 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
)
252-2388738
561 return;
executed 252 times by 1 test: return;
Executed by:
  • tst_ecmascripttests
252
562 }
executed 2389130 times by 9 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
2389130
563-
564 if (m_parenthesesNestingDepth > 0
m_parenthesesNestingDepth > 0Description
TRUEnever evaluated
FALSEevaluated 1150894 times by 153 tests
Evaluated 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_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
)
0-1150894
565 m_err = MissingParentheses;
never executed: m_err = MissingParentheses;
0
566 }
executed 1150738 times by 153 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_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1150738
567-
568-
569-
570-
571-
572-
573-
574 const char* parse()-
575 {-
576 if (m_size > MAX_PATTERN_SIZE
m_size > MAX_PATTERN_SIZEDescription
TRUEnever evaluated
FALSEevaluated 1148700 times by 153 tests
Evaluated 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_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
)
0-1148700
577 m_err = PatternTooLarge;
never executed: m_err = PatternTooLarge;
0
578 else-
579 parseTokens();
executed 1148062 times by 153 tests: parseTokens();
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_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1148062
580 (!(atEndOfPattern() || m_err) ? (qmlWTFReportAssertionFailure(__FILE__, 687, __PRETTY_FUNCTION__, "atEndOfPattern() || m_err"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
581-
582-
583 static const char* errorMessages[NumberOfErrorCodes] = {-
584 0,-
585 "Invalid regular expression: " "regular expression too large",-
586 "Invalid regular expression: " "numbers out of order in {} quantifier",-
587 "Invalid regular expression: " "nothing to repeat",-
588 "Invalid regular expression: " "number too large in {} quantifier",-
589 "Invalid regular expression: " "missing )",-
590 "Invalid regular expression: " "unmatched parentheses",-
591 "Invalid regular expression: " "unrecognized character after (?",-
592 "Invalid regular expression: " "missing terminating ] for character class",-
593 "Invalid regular expression: " "range out of order in character class",-
594 "Invalid regular expression: " "\\ at end of pattern"-
595 };-
596-
597 return
executed 1151300 times by 153 tests: return errorMessages[m_err];
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_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
errorMessages[m_err];
executed 1151300 times by 153 tests: return errorMessages[m_err];
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_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1151300
598 }-
599-
600-
601-
602 typedef unsigned ParseState;-
603-
604 ParseState saveState()-
605 {-
606 return
executed 2331 times by 3 tests: return m_index;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
m_index;
executed 2331 times by 3 tests: return m_index;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
2331
607 }-
608-
609 void restoreState(ParseState state)-
610 {-
611 m_index = state;-
612 }
executed 98 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
98
613-
614 bool atEndOfPattern()-
615 {-
616 (!(m_index <= m_size) ? (qmlWTFReportAssertionFailure(__FILE__, 723, __PRETTY_FUNCTION__, "m_index <= m_size"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
617 return
executed 5254373 times by 153 tests: return m_index == m_size;
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_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
m_index == m_size;
executed 5254373 times by 153 tests: return m_index == m_size;
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_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
5254373
618 }-
619-
620 int peek()-
621 {-
622 (!(m_index < m_size) ? (qmlWTFReportAssertionFailure(__FILE__, 729, __PRETTY_FUNCTION__, "m_index < m_size"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
623 return
executed 3484021 times by 9 tests: return m_data[m_index];
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
m_data[m_index];
executed 3484021 times by 9 tests: return m_data[m_index];
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
3484021
624 }-
625-
626 bool peekIsDigit()-
627 {-
628 return
executed 2519 times by 3 tests: return !atEndOfPattern() && WTF::isASCIIDigit(peek());
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
!atEndOfPattern() && WTF::isASCIIDigit(peek());
executed 2519 times by 3 tests: return !atEndOfPattern() && WTF::isASCIIDigit(peek());
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
2519
629 }-
630-
631 unsigned peekDigit()-
632 {-
633 (!(peekIsDigit()) ? (qmlWTFReportAssertionFailure(__FILE__, 740, __PRETTY_FUNCTION__, "peekIsDigit()"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
634 return
executed 28 times by 1 test: return peek() - '0';
Executed by:
  • tst_ecmascripttests
peek() - '0';
executed 28 times by 1 test: return peek() - '0';
Executed by:
  • tst_ecmascripttests
28
635 }-
636-
637 int consume()-
638 {-
639 (!(m_index < m_size) ? (qmlWTFReportAssertionFailure(__FILE__, 746, __PRETTY_FUNCTION__, "m_index < m_size"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
640 return
executed 2942087 times by 9 tests: return m_data[m_index++];
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
m_data[m_index++];
executed 2942087 times by 9 tests: return m_data[m_index++];
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
2942087
641 }-
642-
643 unsigned consumeDigit()-
644 {-
645 (!(peekIsDigit()) ? (qmlWTFReportAssertionFailure(__FILE__, 752, __PRETTY_FUNCTION__, "peekIsDigit()"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
646 return
executed 969 times by 3 tests: return consume() - '0';
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
consume() - '0';
executed 969 times by 3 tests: return consume() - '0';
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
969
647 }-
648-
649 unsigned consumeNumber()-
650 {-
651 unsigned n = consumeDigit();-
652-
653 for (unsigned newValue; peekIsDigit()
peekIsDigit()Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 888 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
&& ((
((newValue = n...Digit()) >= n)Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
newValue = n * 10 + peekDigit()) >= n)
((newValue = n...Digit()) >= n)Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
; ) {
0-888
654 n = newValue;-
655 consume();-
656 }
executed 28 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
28
657 return
executed 890 times by 3 tests: return n;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
n;
executed 890 times by 3 tests: return n;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
890
658 }-
659-
660 unsigned consumeOctal()-
661 {-
662 (!(WTF::isASCIIOctalDigit(peek())) ? (qmlWTFReportAssertionFailure(__FILE__, 769, __PRETTY_FUNCTION__, "WTF::isASCIIOctalDigit(peek())"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
663-
664 unsigned n = consumeDigit();-
665 while (n < 32
n < 32Description
TRUEevaluated 80 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
&& !atEndOfPattern()
!atEndOfPattern()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 68 times by 1 test
Evaluated by:
  • tst_ecmascripttests
&& WTF::isASCIIOctalDigit(peek())
WTF::isASCIIOctalDigit(peek())Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
0-80
666 n = n * 8 + consumeDigit();
executed 4 times by 1 test: n = n * 8 + consumeDigit();
Executed by:
  • tst_ecmascripttests
4
667 return
executed 76 times by 1 test: return n;
Executed by:
  • tst_ecmascripttests
n;
executed 76 times by 1 test: return n;
Executed by:
  • tst_ecmascripttests
76
668 }-
669-
670 bool tryConsume(UChar ch)-
671 {-
672 if (atEndOfPattern()
atEndOfPattern()Description
TRUEevaluated 537 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
FALSEevaluated 11637 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
|| (
(m_data[m_index] != ch)Description
TRUEevaluated 9069 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEevaluated 2569 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
m_data[m_index] != ch)
(m_data[m_index] != ch)Description
TRUEevaluated 9069 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEevaluated 2569 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
)
537-11637
673 return
executed 9607 times by 9 tests: return false;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
false;
executed 9607 times by 9 tests: return false;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
9607
674 ++m_index;-
675 return
executed 2569 times by 3 tests: return true;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
true;
executed 2569 times by 3 tests: return true;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
2569
676 }-
677-
678 int tryConsumeHex(int count)-
679 {-
680 ParseState state = saveState();-
681-
682 int n = 0;-
683 while (count--
count--Description
TRUEevaluated 3701 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1312 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
1312-3701
684 if (atEndOfPattern()
atEndOfPattern()Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3685 times by 1 test
Evaluated by:
  • tst_ecmascripttests
|| !WTF::isASCIIHexDigit(peek())
!WTF::isASCIIHexDigit(peek())Description
TRUEnever evaluated
FALSEevaluated 3688 times by 1 test
Evaluated by:
  • tst_ecmascripttests
) {
0-3688
685 restoreState(state);-
686 return
executed 16 times by 1 test: return -1;
Executed by:
  • tst_ecmascripttests
-1;
executed 16 times by 1 test: return -1;
Executed by:
  • tst_ecmascripttests
16
687 }-
688 n = (n << 4) | WTF::toASCIIHexValue(consume());-
689 }
executed 3686 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
3686
690 return
executed 1312 times by 1 test: return n;
Executed by:
  • tst_ecmascripttests
n;
executed 1312 times by 1 test: return n;
Executed by:
  • tst_ecmascripttests
1312
691 }-
692-
693 Delegate& m_delegate;-
694 unsigned m_backReferenceLimit;-
695 ErrorCode m_err;-
696 const CharType* m_data;-
697 unsigned m_size;-
698 unsigned m_index;-
699 unsigned m_parenthesesNestingDepth;-
700-
701-
702 static const unsigned MAX_PATTERN_SIZE = 1024 * 1024;-
703};-
704template<class Delegate>-
705const char* parse(Delegate& delegate, const String& pattern, unsigned backReferenceLimit = quantifyInfinite)-
706{-
707 if (pattern.is8Bit()
pattern.is8Bit()Description
TRUEnever evaluated
FALSEevaluated 1148413 times by 153 tests
Evaluated 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_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
)
0-1148413
708 return
never executed: return Parser<Delegate, LChar>(delegate, pattern, backReferenceLimit).parse();
Parser<Delegate, LChar>(delegate, pattern, backReferenceLimit).parse();
never executed: return Parser<Delegate, LChar>(delegate, pattern, backReferenceLimit).parse();
0
709 return
executed 1148419 times by 153 tests: return Parser<Delegate, UChar>(delegate, pattern, backReferenceLimit).parse();
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_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
Parser<Delegate, UChar>(delegate, pattern, backReferenceLimit).parse();
executed 1148419 times by 153 tests: return Parser<Delegate, UChar>(delegate, pattern, backReferenceLimit).parse();
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_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1148419
710}-
711-
712} }-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0