OpenCoverage

YarrPattern.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/3rdparty/masm/yarr/YarrPattern.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3namespace JSC { namespace Yarr {-
4-
5struct PatternDisjunction;-
6-
7struct CharacterRange {-
8 UChar begin;-
9 UChar end;-
10-
11 CharacterRange(UChar begin, UChar end)-
12 : begin(begin)-
13 , end(end)-
14 {-
15 }
executed 20366 times by 8 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
20366
16};-
17-
18struct CharacterClass {-
19 ;-
20public:-
21-
22-
23-
24 CharacterClass()-
25 : m_table(0)-
26 {-
27 }
executed 4532 times by 8 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
4532
28 CharacterClass(const char* table, bool inverted)-
29 : m_table(table)-
30 , m_tableInverted(inverted)-
31 {-
32 }
executed 1064 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
1064
33 Vector<UChar> m_matches;-
34 Vector<CharacterRange> m_ranges;-
35 Vector<UChar> m_matchesUnicode;-
36 Vector<CharacterRange> m_rangesUnicode;-
37-
38 const char* m_table;-
39 bool m_tableInverted;-
40};-
41-
42enum QuantifierType {-
43 QuantifierFixedCount,-
44 QuantifierGreedy,-
45 QuantifierNonGreedy,-
46};-
47-
48struct PatternTerm {-
49 enum Type {-
50 TypeAssertionBOL,-
51 TypeAssertionEOL,-
52 TypeAssertionWordBoundary,-
53 TypePatternCharacter,-
54 TypeCharacterClass,-
55 TypeBackReference,-
56 TypeForwardReference,-
57 TypeParenthesesSubpattern,-
58 TypeParentheticalAssertion,-
59 TypeDotStarEnclosure,-
60 } type;-
61 bool m_capture :1;-
62 bool m_invert :1;-
63 union {-
64 UChar patternCharacter;-
65 CharacterClass* characterClass;-
66 unsigned backReferenceSubpatternId;-
67 struct {-
68 PatternDisjunction* disjunction;-
69 unsigned subpatternId;-
70 unsigned lastSubpatternId;-
71 bool isCopy;-
72 bool isTerminal;-
73 } parentheses;-
74 struct {-
75 bool bolAnchor : 1;-
76 bool eolAnchor : 1;-
77 } anchors;-
78 };-
79 QuantifierType quantityType;-
80 Checked<unsigned> quantityCount;-
81 int inputPosition;-
82 unsigned frameLocation;-
83-
84 PatternTerm(UChar ch)-
85 : type(PatternTerm::TypePatternCharacter)-
86 , m_capture(false)-
87 , m_invert(false)-
88 {-
89 patternCharacter = ch;-
90 quantityType = QuantifierFixedCount;-
91 quantityCount = 1;-
92 }
executed 2370145 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
2370145
93-
94 PatternTerm(CharacterClass* charClass, bool invert)-
95 : type(PatternTerm::TypeCharacterClass)-
96 , m_capture(false)-
97 , m_invert(invert)-
98 {-
99 characterClass = charClass;-
100 quantityType = QuantifierFixedCount;-
101 quantityCount = 1;-
102 }
executed 4594 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
4594
103-
104 PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false)-
105 : type(type)-
106 , m_capture(capture)-
107 , m_invert(invert)-
108 {-
109 parentheses.disjunction = disjunction;-
110 parentheses.subpatternId = subpatternId;-
111 parentheses.isCopy = false;-
112 parentheses.isTerminal = false;-
113 quantityType = QuantifierFixedCount;-
114 quantityCount = 1;-
115 }
executed 3575 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
3575
116-
117 PatternTerm(Type type, bool invert = false)-
118 : type(type)-
119 , m_capture(false)-
120 , m_invert(invert)-
121 {-
122 quantityType = QuantifierFixedCount;-
123 quantityCount = 1;-
124 }
executed 1575 times by 5 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
1575
125-
126 PatternTerm(unsigned spatternId)-
127 : type(TypeBackReference)-
128 , m_capture(false)-
129 , m_invert(false)-
130 {-
131 backReferenceSubpatternId = spatternId;-
132 quantityType = QuantifierFixedCount;-
133 quantityCount = 1;-
134 }
executed 180 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
180
135-
136 PatternTerm(bool bolAnchor, bool eolAnchor)-
137 : type(TypeDotStarEnclosure)-
138 , m_capture(false)-
139 , m_invert(false)-
140 {-
141 anchors.bolAnchor = bolAnchor;-
142 anchors.eolAnchor = eolAnchor;-
143 quantityType = QuantifierFixedCount;-
144 quantityCount = 1;-
145 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
8
146-
147 static PatternTerm ForwardReference()-
148 {-
149 return
executed 80 times by 1 test: return PatternTerm(TypeForwardReference);
Executed by:
  • tst_ecmascripttests
PatternTerm(TypeForwardReference);
executed 80 times by 1 test: return PatternTerm(TypeForwardReference);
Executed by:
  • tst_ecmascripttests
80
150 }-
151-
152 static PatternTerm BOL()-
153 {-
154 return
executed 180 times by 5 tests: return PatternTerm(TypeAssertionBOL);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
PatternTerm(TypeAssertionBOL);
executed 180 times by 5 tests: return PatternTerm(TypeAssertionBOL);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
180
155 }-
156-
157 static PatternTerm EOL()-
158 {-
159 return
executed 178 times by 5 tests: return PatternTerm(TypeAssertionEOL);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
PatternTerm(TypeAssertionEOL);
executed 178 times by 5 tests: return PatternTerm(TypeAssertionEOL);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
178
160 }-
161-
162 static PatternTerm WordBoundary(bool invert)-
163 {-
164 return
executed 1135 times by 1 test: return PatternTerm(TypeAssertionWordBoundary, invert);
Executed by:
  • tst_ecmascripttests
PatternTerm(TypeAssertionWordBoundary, invert);
executed 1135 times by 1 test: return PatternTerm(TypeAssertionWordBoundary, invert);
Executed by:
  • tst_ecmascripttests
1135
165 }-
166-
167 bool invert()-
168 {-
169 return
executed 7818 times by 9 tests: return m_invert;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
m_invert;
executed 7818 times by 9 tests: return m_invert;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
7818
170 }-
171-
172 bool capture()-
173 {-
174 return
executed 9880 times by 3 tests: return m_capture;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
m_capture;
executed 9880 times by 3 tests: return m_capture;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
9880
175 }-
176-
177 void quantify(unsigned count, QuantifierType type)-
178 {-
179 quantityCount = count;-
180 quantityType = type;-
181 }
executed 5211 times by 8 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
5211
182};-
183-
184struct PatternAlternative {-
185 ;-
186public:-
187 PatternAlternative(PatternDisjunction* disjunction)-
188 : m_parent(disjunction)-
189 , m_onceThrough(false)-
190 , m_hasFixedSize(false)-
191 , m_startsWithBOL(false)-
192 , m_containsBOL(false)-
193 {-
194 }
executed 1156474 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
  • ...
1156474
195-
196 PatternTerm& lastTerm()-
197 {-
198 (!(m_terms.size()) ? (qmlWTFReportAssertionFailure(__FILE__, 233, __PRETTY_FUNCTION__, "m_terms.size()"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
199 return
executed 9888 times by 8 tests: return m_terms[m_terms.size() - 1];
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
m_terms[m_terms.size() - 1];
executed 9888 times by 8 tests: return m_terms[m_terms.size() - 1];
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
9888
200 }-
201-
202 void removeLastTerm()-
203 {-
204 (!(m_terms.size()) ? (qmlWTFReportAssertionFailure(__FILE__, 239, __PRETTY_FUNCTION__, "m_terms.size()"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0);-
205 m_terms.shrink(m_terms.size() - 1);-
206 }
never executed: end of block
0
207-
208 void setOnceThrough()-
209 {-
210 m_onceThrough = true;-
211 }
executed 132 times by 5 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
132
212-
213 bool onceThrough()-
214 {-
215 return
executed 2299174 times by 153 tests: return m_onceThrough;
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_onceThrough;
executed 2299174 times by 153 tests: return m_onceThrough;
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
  • ...
2299174
216 }-
217-
218 Vector<PatternTerm> m_terms;-
219 PatternDisjunction* m_parent;-
220 unsigned m_minimumSize;-
221 bool m_onceThrough : 1;-
222 bool m_hasFixedSize : 1;-
223 bool m_startsWithBOL : 1;-
224 bool m_containsBOL : 1;-
225};-
226-
227struct PatternDisjunction {-
228 ;-
229public:-
230 PatternDisjunction(PatternAlternative* parent = 0)-
231 : m_parent(parent)-
232 , m_hasFixedSize(false)-
233 {-
234 }
executed 1153678 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
  • ...
1153678
235-
236 PatternAlternative* addNewAlternative()-
237 {-
238 PatternAlternative* alternative = new PatternAlternative(this);-
239 m_alternatives.append(adoptPtr(alternative));-
240 return
executed 1154410 times by 153 tests: return alternative;
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
  • ...
alternative;
executed 1154410 times by 153 tests: return alternative;
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
  • ...
1154410
241 }-
242-
243 Vector<OwnPtr<PatternAlternative> > m_alternatives;-
244 PatternAlternative* m_parent;-
245 unsigned m_minimumSize;-
246 unsigned m_callFrameSize;-
247 bool m_hasFixedSize;-
248};-
249-
250-
251-
252-
253-
254CharacterClass* newlineCreate();-
255CharacterClass* digitsCreate();-
256CharacterClass* spacesCreate();-
257CharacterClass* wordcharCreate();-
258CharacterClass* nondigitsCreate();-
259CharacterClass* nonspacesCreate();-
260CharacterClass* nonwordcharCreate();-
261-
262struct TermChain {-
263 TermChain(PatternTerm term)-
264 : term(term)-
265 {}
never executed: end of block
0
266-
267 PatternTerm term;-
268 Vector<TermChain> hotTerms;-
269};-
270-
271struct YarrPattern {-
272 YarrPattern(const String& pattern, bool ignoreCase, bool multiline, const char** error);-
273-
274 void reset()-
275 {-
276 m_numSubpatterns = 0;-
277 m_maxBackReference = 0;-
278-
279 m_containsBackreferences = false;-
280 m_containsBOL = false;-
281-
282 newlineCached = 0;-
283 digitsCached = 0;-
284 spacesCached = 0;-
285 wordcharCached = 0;-
286 nondigitsCached = 0;-
287 nonspacesCached = 0;-
288 nonwordcharCached = 0;-
289-
290 m_disjunctions.clear();-
291 m_userCharacterClasses.clear();-
292 }
executed 72 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
72
293-
294 bool containsIllegalBackReference()-
295 {-
296 return
executed 1150529 times by 153 tests: return m_maxBackReference > m_numSubpatterns;
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_maxBackReference > m_numSubpatterns;
executed 1150529 times by 153 tests: return m_maxBackReference > m_numSubpatterns;
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
  • ...
1150529
297 }-
298-
299 CharacterClass* newlineCharacterClass()-
300 {-
301 if (!newlineCached
!newlineCachedDescription
TRUEevaluated 814 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEevaluated 274 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
)
274-814
302 m_userCharacterClasses.append(adoptPtr(newlineCached = newlineCreate()));
executed 814 times by 5 tests: m_userCharacterClasses.append(adoptPtr(newlineCached = newlineCreate()));
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
814
303 return
executed 1089 times by 5 tests: return newlineCached;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
newlineCached;
executed 1089 times by 5 tests: return newlineCached;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
1089
304 }-
305 CharacterClass* digitsCharacterClass()-
306 {-
307 if (!digitsCached
!digitsCachedDescription
TRUEevaluated 329 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEevaluated 72 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicktextinput
  • tst_qquickworkerscript
)
72-329
308 m_userCharacterClasses.append(adoptPtr(digitsCached = digitsCreate()));
executed 329 times by 3 tests: m_userCharacterClasses.append(adoptPtr(digitsCached = digitsCreate()));
Executed by:
  • tst_ecmascripttests
  • tst_qquicktextinput
  • tst_qquickworkerscript
329
309 return
executed 402 times by 3 tests: return digitsCached;
Executed by:
  • tst_ecmascripttests
  • tst_qquicktextinput
  • tst_qquickworkerscript
digitsCached;
executed 402 times by 3 tests: return digitsCached;
Executed by:
  • tst_ecmascripttests
  • tst_qquicktextinput
  • tst_qquickworkerscript
402
310 }-
311 CharacterClass* spacesCharacterClass()-
312 {-
313 if (!spacesCached
!spacesCachedDescription
TRUEevaluated 307 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
FALSEevaluated 1122 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
)
307-1122
314 m_userCharacterClasses.append(adoptPtr(spacesCached = spacesCreate()));
executed 307 times by 3 tests: m_userCharacterClasses.append(adoptPtr(spacesCached = spacesCreate()));
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
307
315 return
executed 1430 times by 3 tests: return spacesCached;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
spacesCached;
executed 1430 times by 3 tests: return spacesCached;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
1430
316 }-
317 CharacterClass* wordcharCharacterClass()-
318 {-
319 if (!wordcharCached
!wordcharCachedDescription
TRUEevaluated 588 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3138 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
588-3138
320 m_userCharacterClasses.append(adoptPtr(wordcharCached = wordcharCreate()));
executed 588 times by 1 test: m_userCharacterClasses.append(adoptPtr(wordcharCached = wordcharCreate()));
Executed by:
  • tst_ecmascripttests
588
321 return
executed 3726 times by 1 test: return wordcharCached;
Executed by:
  • tst_ecmascripttests
wordcharCached;
executed 3726 times by 1 test: return wordcharCached;
Executed by:
  • tst_ecmascripttests
3726
322 }-
323 CharacterClass* nondigitsCharacterClass()-
324 {-
325 if (!nondigitsCached
!nondigitsCachedDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
)
0-4
326 m_userCharacterClasses.append(adoptPtr(nondigitsCached = nondigitsCreate()));
executed 4 times by 1 test: m_userCharacterClasses.append(adoptPtr(nondigitsCached = nondigitsCreate()));
Executed by:
  • tst_ecmascripttests
4
327 return
executed 4 times by 1 test: return nondigitsCached;
Executed by:
  • tst_ecmascripttests
nondigitsCached;
executed 4 times by 1 test: return nondigitsCached;
Executed by:
  • tst_ecmascripttests
4
328 }-
329 CharacterClass* nonspacesCharacterClass()-
330 {-
331 if (!nonspacesCached
!nonspacesCachedDescription
TRUEevaluated 164 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1100 times by 1 test
Evaluated by:
  • tst_ecmascripttests
)
164-1100
332 m_userCharacterClasses.append(adoptPtr(nonspacesCached = nonspacesCreate()));
executed 164 times by 1 test: m_userCharacterClasses.append(adoptPtr(nonspacesCached = nonspacesCreate()));
Executed by:
  • tst_ecmascripttests
164
333 return
executed 1264 times by 1 test: return nonspacesCached;
Executed by:
  • tst_ecmascripttests
nonspacesCached;
executed 1264 times by 1 test: return nonspacesCached;
Executed by:
  • tst_ecmascripttests
1264
334 }-
335 CharacterClass* nonwordcharCharacterClass()-
336 {-
337 if (!nonwordcharCached
!nonwordcharCachedDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
)
0-4
338 m_userCharacterClasses.append(adoptPtr(nonwordcharCached = nonwordcharCreate()));
executed 4 times by 1 test: m_userCharacterClasses.append(adoptPtr(nonwordcharCached = nonwordcharCreate()));
Executed by:
  • tst_ecmascripttests
4
339 return
executed 4 times by 1 test: return nonwordcharCached;
Executed by:
  • tst_ecmascripttests
nonwordcharCached;
executed 4 times by 1 test: return nonwordcharCached;
Executed by:
  • tst_ecmascripttests
4
340 }-
341-
342 bool m_ignoreCase : 1;-
343 bool m_multiline : 1;-
344 bool m_containsBackreferences : 1;-
345 bool m_containsBOL : 1;-
346 unsigned m_numSubpatterns;-
347 unsigned m_maxBackReference;-
348 PatternDisjunction* m_body;-
349 Vector<OwnPtr<PatternDisjunction>, 4> m_disjunctions;-
350 Vector<OwnPtr<CharacterClass> > m_userCharacterClasses;-
351-
352private:-
353 const char* compile(const String& patternString);-
354-
355 CharacterClass* newlineCached;-
356 CharacterClass* digitsCached;-
357 CharacterClass* spacesCached;-
358 CharacterClass* wordcharCached;-
359 CharacterClass* nondigitsCached;-
360 CharacterClass* nonspacesCached;-
361 CharacterClass* nonwordcharCached;-
362};-
363-
364} }-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0