Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/3rdparty/masm/yarr/YarrJIT.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||||||||
2 | - | |||||||||||||||||||||||||
3 | - | |||||||||||||||||||||||||
4 | - | |||||||||||||||||||||||||
5 | - | |||||||||||||||||||||||||
6 | - | |||||||||||||||||||||||||
7 | using namespace WTF; | - | ||||||||||||||||||||||||
8 | - | |||||||||||||||||||||||||
9 | namespace JSC { namespace Yarr { | - | ||||||||||||||||||||||||
10 | - | |||||||||||||||||||||||||
11 | template<YarrJITCompileMode compileMode> | - | ||||||||||||||||||||||||
12 | class YarrGenerator : private DefaultMacroAssembler { | - | ||||||||||||||||||||||||
13 | friend void jitCompile(JSGlobalData*, YarrCodeBlock& jitObject, const String& pattern, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline); | - | ||||||||||||||||||||||||
14 | static const RegisterID input = X86Registers::edi; | - | ||||||||||||||||||||||||
15 | static const RegisterID index = X86Registers::esi; | - | ||||||||||||||||||||||||
16 | static const RegisterID length = X86Registers::edx; | - | ||||||||||||||||||||||||
17 | static const RegisterID output = X86Registers::ecx; | - | ||||||||||||||||||||||||
18 | static const RegisterID regT0 = X86Registers::eax; | - | ||||||||||||||||||||||||
19 | static const RegisterID regT1 = X86Registers::ebx; | - | ||||||||||||||||||||||||
20 | - | |||||||||||||||||||||||||
21 | static const RegisterID returnRegister = X86Registers::eax; | - | ||||||||||||||||||||||||
22 | static const RegisterID returnRegister2 = X86Registers::edx; | - | ||||||||||||||||||||||||
23 | - | |||||||||||||||||||||||||
24 | - | |||||||||||||||||||||||||
25 | void optimizeAlternative(PatternAlternative* alternative) | - | ||||||||||||||||||||||||
26 | { | - | ||||||||||||||||||||||||
27 | if (!alternative->m_terms.size()
| 98105-1052025 | ||||||||||||||||||||||||
28 | return; executed 98086 times by 153 tests: return; Executed by:
| 98086 | ||||||||||||||||||||||||
29 | - | |||||||||||||||||||||||||
30 | for (unsigned i = 0; i < alternative->m_terms.size() - 1
| 1054988-1321864 | ||||||||||||||||||||||||
31 | PatternTerm& term = alternative->m_terms[i]; | - | ||||||||||||||||||||||||
32 | PatternTerm& nextTerm = alternative->m_terms[i + 1]; | - | ||||||||||||||||||||||||
33 | - | |||||||||||||||||||||||||
34 | if ((
| 2994-1318854 | ||||||||||||||||||||||||
35 | && (
| 1425-1570 | ||||||||||||||||||||||||
36 | && (
| 458-968 | ||||||||||||||||||||||||
37 | && (
| 4-454 | ||||||||||||||||||||||||
38 | PatternTerm termCopy = term; | - | ||||||||||||||||||||||||
39 | alternative->m_terms[i] = nextTerm; | - | ||||||||||||||||||||||||
40 | alternative->m_terms[i + 1] = termCopy; | - | ||||||||||||||||||||||||
41 | } executed 454 times by 2 tests: end of block Executed by:
| 454 | ||||||||||||||||||||||||
42 | } executed 1321828 times by 8 tests: end of block Executed by:
| 1321828 | ||||||||||||||||||||||||
43 | } executed 1054186 times by 9 tests: end of block Executed by:
| 1054186 | ||||||||||||||||||||||||
44 | - | |||||||||||||||||||||||||
45 | void matchCharacterClassRange(RegisterID character, JumpList& failures, JumpList& matchDest, const CharacterRange* ranges, unsigned count, unsigned* matchIndex, const UChar* matches, unsigned matchCount) | - | ||||||||||||||||||||||||
46 | { | - | ||||||||||||||||||||||||
47 | do { | - | ||||||||||||||||||||||||
48 | - | |||||||||||||||||||||||||
49 | int which = count >> 1; | - | ||||||||||||||||||||||||
50 | char lo = ranges[which].begin; | - | ||||||||||||||||||||||||
51 | char hi = ranges[which].end; | - | ||||||||||||||||||||||||
52 | - | |||||||||||||||||||||||||
53 | - | |||||||||||||||||||||||||
54 | - | |||||||||||||||||||||||||
55 | if ((*
| 933-2896 | ||||||||||||||||||||||||
56 | Jump loOrAbove = branch32(GreaterThanOrEqual, character, Imm32((unsigned short)lo)); | - | ||||||||||||||||||||||||
57 | - | |||||||||||||||||||||||||
58 | - | |||||||||||||||||||||||||
59 | if (which
| 44-1423 | ||||||||||||||||||||||||
60 | matchCharacterClassRange(character, failures, matchDest, ranges, which, matchIndex, matches, matchCount); executed 1423 times by 1 test: matchCharacterClassRange(character, failures, matchDest, ranges, which, matchIndex, matches, matchCount); Executed by:
| 1423 | ||||||||||||||||||||||||
61 | - | |||||||||||||||||||||||||
62 | while ((*
| 28-1508 | ||||||||||||||||||||||||
63 | matchDest.append(branch32(Equal, character, Imm32((unsigned short)matches[*matchIndex]))); | - | ||||||||||||||||||||||||
64 | ++*matchIndex; | - | ||||||||||||||||||||||||
65 | } executed 1479 times by 1 test: end of block Executed by:
| 1479 | ||||||||||||||||||||||||
66 | failures.append(jump()); | - | ||||||||||||||||||||||||
67 | - | |||||||||||||||||||||||||
68 | loOrAbove.link(this); | - | ||||||||||||||||||||||||
69 | } executed 1467 times by 1 test: else if (whichend of block Executed by:
| 60-2305 | ||||||||||||||||||||||||
70 | Jump loOrAbove = branch32(GreaterThanOrEqual, character, Imm32((unsigned short)lo)); | - | ||||||||||||||||||||||||
71 | - | |||||||||||||||||||||||||
72 | matchCharacterClassRange(character, failures, matchDest, ranges, which, matchIndex, matches, matchCount); | - | ||||||||||||||||||||||||
73 | failures.append(jump()); | - | ||||||||||||||||||||||||
74 | - | |||||||||||||||||||||||||
75 | loOrAbove.link(this); | - | ||||||||||||||||||||||||
76 | } executed 60 times by 3 tests: elseend of block Executed by:
| 60 | ||||||||||||||||||||||||
77 | failures.append(branch32(LessThan, character, Imm32((unsigned short)lo))); executed 2306 times by 6 tests: failures.append(branch32(LessThan, character, Imm32((unsigned short)lo))); Executed by:
| 2306 | ||||||||||||||||||||||||
78 | - | |||||||||||||||||||||||||
79 | while ((*
| 0-2380 | ||||||||||||||||||||||||
80 | ++* never executed: matchIndex;++*matchIndex; never executed: ++*matchIndex; | 0 | ||||||||||||||||||||||||
81 | - | |||||||||||||||||||||||||
82 | matchDest.append(branch32(LessThanOrEqual, character, Imm32((unsigned short)hi))); | - | ||||||||||||||||||||||||
83 | - | |||||||||||||||||||||||||
84 | - | |||||||||||||||||||||||||
85 | - | |||||||||||||||||||||||||
86 | unsigned next = which + 1; | - | ||||||||||||||||||||||||
87 | ranges += next; | - | ||||||||||||||||||||||||
88 | count -= next; | - | ||||||||||||||||||||||||
89 | } executed 3837 times by 6 tests: while (countend of block Executed by:
| 12-3837 | ||||||||||||||||||||||||
90 | } executed 3824 times by 6 tests: end of block Executed by:
| 3824 | ||||||||||||||||||||||||
91 | - | |||||||||||||||||||||||||
92 | void matchCharacterClass(RegisterID character, JumpList& matchDest, const CharacterClass* charClass) | - | ||||||||||||||||||||||||
93 | { | - | ||||||||||||||||||||||||
94 | if (charClass->m_table
| 3414-3755 | ||||||||||||||||||||||||
95 | ExtendedAddress tableEntry(character, reinterpret_cast<intptr_t>(charClass->m_table)); | - | ||||||||||||||||||||||||
96 | matchDest.append(branchTest8(charClass->m_tableInverted ? Zero : NonZero, tableEntry)); | - | ||||||||||||||||||||||||
97 | return; executed 3757 times by 3 tests: return; Executed by:
| 3757 | ||||||||||||||||||||||||
98 | } | - | ||||||||||||||||||||||||
99 | Jump unicodeFail; | - | ||||||||||||||||||||||||
100 | if (charClass->m_matchesUnicode.size()
| 0-2081 | ||||||||||||||||||||||||
101 | Jump isAscii = branch32(LessThanOrEqual, character, TrustedImm32(0x7f)); | - | ||||||||||||||||||||||||
102 | - | |||||||||||||||||||||||||
103 | if (charClass->m_matchesUnicode.size()
| 0-2086 | ||||||||||||||||||||||||
104 | for (unsigned i = 0; i < charClass->m_matchesUnicode.size()
| 2088-14040 | ||||||||||||||||||||||||
105 | UChar ch = charClass->m_matchesUnicode[i]; | - | ||||||||||||||||||||||||
106 | matchDest.append(branch32(Equal, character, Imm32(ch))); | - | ||||||||||||||||||||||||
107 | } executed 14042 times by 3 tests: end of block Executed by:
| 14042 | ||||||||||||||||||||||||
108 | } executed 2088 times by 3 tests: end of block Executed by:
| 2088 | ||||||||||||||||||||||||
109 | - | |||||||||||||||||||||||||
110 | if (charClass->m_rangesUnicode.size()
| 672-1416 | ||||||||||||||||||||||||
111 | for (unsigned i = 0; i < charClass->m_rangesUnicode.size()
| 1415-12631 | ||||||||||||||||||||||||
112 | UChar lo = charClass->m_rangesUnicode[i].begin; | - | ||||||||||||||||||||||||
113 | UChar hi = charClass->m_rangesUnicode[i].end; | - | ||||||||||||||||||||||||
114 | - | |||||||||||||||||||||||||
115 | Jump below = branch32(LessThan, character, Imm32(lo)); | - | ||||||||||||||||||||||||
116 | matchDest.append(branch32(LessThanOrEqual, character, Imm32(hi))); | - | ||||||||||||||||||||||||
117 | below.link(this); | - | ||||||||||||||||||||||||
118 | } executed 12627 times by 1 test: end of block Executed by:
| 12627 | ||||||||||||||||||||||||
119 | } executed 1415 times by 1 test: end of block Executed by:
| 1415 | ||||||||||||||||||||||||
120 | - | |||||||||||||||||||||||||
121 | unicodeFail = jump(); | - | ||||||||||||||||||||||||
122 | isAscii.link(this); | - | ||||||||||||||||||||||||
123 | } executed 2086 times by 3 tests: end of block Executed by:
| 2086 | ||||||||||||||||||||||||
124 | - | |||||||||||||||||||||||||
125 | if (charClass->m_ranges.size()
| 1089-2338 | ||||||||||||||||||||||||
126 | unsigned matchIndex = 0; | - | ||||||||||||||||||||||||
127 | JumpList failures; | - | ||||||||||||||||||||||||
128 | (!(charClass->m_ranges.size() <= | - | ||||||||||||||||||||||||
129 | (0x7fffffff * 2U + 1U) | - | ||||||||||||||||||||||||
130 | ) ? (qmlWTFReportAssertionFailure(__FILE__, 226, __PRETTY_FUNCTION__, "charClass->m_ranges.size() <= UINT_MAX"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
131 | matchCharacterClassRange(character, failures, matchDest, &charClass->m_ranges[0], | - | ||||||||||||||||||||||||
132 | static_cast<unsigned>(charClass->m_ranges.size()), | - | ||||||||||||||||||||||||
133 | &matchIndex, charClass->m_matches.isEmpty() ? 0 : &charClass->m_matches[0], | - | ||||||||||||||||||||||||
134 | static_cast<unsigned>(charClass->m_matches.size())); | - | ||||||||||||||||||||||||
135 | while (matchIndex < charClass->m_matches.size()
| 16-2341 | ||||||||||||||||||||||||
136 | matchDest.append(branch32(Equal, character, Imm32((unsigned short)charClass->m_matches[matchIndex++]))); executed 16 times by 1 test: matchDest.append(branch32(Equal, character, Imm32((unsigned short)charClass->m_matches[matchIndex++]))); Executed by:
| 16 | ||||||||||||||||||||||||
137 | - | |||||||||||||||||||||||||
138 | failures.link(this); | - | ||||||||||||||||||||||||
139 | } executed 2338 times by 6 tests: else if (charClass->m_matches.size()end of block Executed by:
| 27-2338 | ||||||||||||||||||||||||
140 | - | |||||||||||||||||||||||||
141 | Vector<char> matchesAZaz; | - | ||||||||||||||||||||||||
142 | - | |||||||||||||||||||||||||
143 | for (unsigned i = 0; i < charClass->m_matches.size()
| 1064-2403 | ||||||||||||||||||||||||
144 | char ch = charClass->m_matches[i]; | - | ||||||||||||||||||||||||
145 | if (m_pattern.m_ignoreCase
| 24-2382 | ||||||||||||||||||||||||
146 | if (isASCIILower(ch)
| 4-20 | ||||||||||||||||||||||||
147 | matchesAZaz.append(ch); | - | ||||||||||||||||||||||||
148 | continue; executed 4 times by 1 test: continue; Executed by:
| 4 | ||||||||||||||||||||||||
149 | } | - | ||||||||||||||||||||||||
150 | if (isASCIIUpper(ch)
| 4-16 | ||||||||||||||||||||||||
151 | continue; executed 4 times by 1 test: continue; Executed by:
| 4 | ||||||||||||||||||||||||
152 | } executed 16 times by 2 tests: end of block Executed by:
| 16 | ||||||||||||||||||||||||
153 | matchDest.append(branch32(Equal, character, Imm32((unsigned short)ch))); | - | ||||||||||||||||||||||||
154 | } executed 2399 times by 4 tests: end of block Executed by:
| 2399 | ||||||||||||||||||||||||
155 | - | |||||||||||||||||||||||||
156 | (!(matchesAZaz.size() <= | - | ||||||||||||||||||||||||
157 | (0x7fffffff * 2U + 1U) | - | ||||||||||||||||||||||||
158 | ) ? (qmlWTFReportAssertionFailure(__FILE__, 252, __PRETTY_FUNCTION__, "matchesAZaz.size() <= UINT_MAX"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
159 | if (unsigned countAZaz = static_cast<int>(matchesAZaz.size())
| 4-1060 | ||||||||||||||||||||||||
160 | or32(TrustedImm32(32), character); | - | ||||||||||||||||||||||||
161 | for (unsigned i = 0; i < countAZaz
| 4 | ||||||||||||||||||||||||
162 | matchDest.append(branch32(Equal, character, TrustedImm32(matchesAZaz[i]))); executed 4 times by 1 test: matchDest.append(branch32(Equal, character, TrustedImm32(matchesAZaz[i]))); Executed by:
| 4 | ||||||||||||||||||||||||
163 | } executed 4 times by 1 test: end of block Executed by:
| 4 | ||||||||||||||||||||||||
164 | } executed 1064 times by 4 tests: end of block Executed by:
| 1064 | ||||||||||||||||||||||||
165 | - | |||||||||||||||||||||||||
166 | if (charClass->m_matchesUnicode.size()
| 0-2083 | ||||||||||||||||||||||||
167 | unicodeFail.link(this); executed 2085 times by 3 tests: unicodeFail.link(this); Executed by:
| 2085 | ||||||||||||||||||||||||
168 | } executed 3429 times by 8 tests: end of block Executed by:
| 3429 | ||||||||||||||||||||||||
169 | - | |||||||||||||||||||||||||
170 | - | |||||||||||||||||||||||||
171 | Jump jumpIfNoAvailableInput(unsigned countToCheck = 0) | - | ||||||||||||||||||||||||
172 | { | - | ||||||||||||||||||||||||
173 | if (countToCheck
| 1050406-1248657 | ||||||||||||||||||||||||
174 | add32(Imm32(countToCheck), index); executed 1050561 times by 9 tests: add32(Imm32(countToCheck), index); Executed by:
| 1050561 | ||||||||||||||||||||||||
175 | return executed 2299917 times by 153 tests: branch32(Above, index, length);return branch32(Above, index, length); Executed by:
executed 2299917 times by 153 tests: return branch32(Above, index, length); Executed by:
| 2299917 | ||||||||||||||||||||||||
176 | } | - | ||||||||||||||||||||||||
177 | - | |||||||||||||||||||||||||
178 | Jump jumpIfAvailableInput(unsigned countToCheck) | - | ||||||||||||||||||||||||
179 | { | - | ||||||||||||||||||||||||
180 | add32(Imm32(countToCheck), index); | - | ||||||||||||||||||||||||
181 | return never executed: branch32(BelowOrEqual, index, length);return branch32(BelowOrEqual, index, length); never executed: return branch32(BelowOrEqual, index, length); | 0 | ||||||||||||||||||||||||
182 | } | - | ||||||||||||||||||||||||
183 | - | |||||||||||||||||||||||||
184 | Jump checkInput() | - | ||||||||||||||||||||||||
185 | { | - | ||||||||||||||||||||||||
186 | return executed 2298223 times by 153 tests: branch32(BelowOrEqual, index, length);return branch32(BelowOrEqual, index, length); Executed by:
executed 2298223 times by 153 tests: return branch32(BelowOrEqual, index, length); Executed by:
| 2298223 | ||||||||||||||||||||||||
187 | } | - | ||||||||||||||||||||||||
188 | - | |||||||||||||||||||||||||
189 | Jump atEndOfInput() | - | ||||||||||||||||||||||||
190 | { | - | ||||||||||||||||||||||||
191 | return executed 2445 times by 8 tests: branch32(Equal, index, length);return branch32(Equal, index, length); Executed by:
executed 2445 times by 8 tests: return branch32(Equal, index, length); Executed by:
| 2445 | ||||||||||||||||||||||||
192 | } | - | ||||||||||||||||||||||||
193 | - | |||||||||||||||||||||||||
194 | Jump notAtEndOfInput() | - | ||||||||||||||||||||||||
195 | { | - | ||||||||||||||||||||||||
196 | return executed 139 times by 5 tests: branch32(NotEqual, index, length);return branch32(NotEqual, index, length); Executed by:
executed 139 times by 5 tests: return branch32(NotEqual, index, length); Executed by:
| 139 | ||||||||||||||||||||||||
197 | } | - | ||||||||||||||||||||||||
198 | - | |||||||||||||||||||||||||
199 | Jump jumpIfCharNotEquals(UChar ch, int inputPosition, RegisterID character) | - | ||||||||||||||||||||||||
200 | { | - | ||||||||||||||||||||||||
201 | readCharacter(inputPosition, character); | - | ||||||||||||||||||||||||
202 | - | |||||||||||||||||||||||||
203 | - | |||||||||||||||||||||||||
204 | - | |||||||||||||||||||||||||
205 | (!(!m_pattern.m_ignoreCase || isASCIIAlpha(ch) || isCanonicallyUnique(ch)) ? (qmlWTFReportAssertionFailure(__FILE__, 299, __PRETTY_FUNCTION__, "!m_pattern.m_ignoreCase || isASCIIAlpha(ch) || isCanonicallyUnique(ch)"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
206 | if (m_pattern.m_ignoreCase
| 32-789400 | ||||||||||||||||||||||||
207 | or32(TrustedImm32(0x20), character); | - | ||||||||||||||||||||||||
208 | ch |= 0x20; | - | ||||||||||||||||||||||||
209 | } executed 78 times by 3 tests: end of block Executed by:
| 78 | ||||||||||||||||||||||||
210 | - | |||||||||||||||||||||||||
211 | return executed 789898 times by 5 tests: branch32(NotEqual, character, Imm32(ch));return branch32(NotEqual, character, Imm32(ch)); Executed by:
executed 789898 times by 5 tests: return branch32(NotEqual, character, Imm32(ch)); Executed by:
| 789898 | ||||||||||||||||||||||||
212 | } | - | ||||||||||||||||||||||||
213 | - | |||||||||||||||||||||||||
214 | void readCharacter(int inputPosition, RegisterID reg) | - | ||||||||||||||||||||||||
215 | { | - | ||||||||||||||||||||||||
216 | if (m_charSize == Char8
| 0-796356 | ||||||||||||||||||||||||
217 | load8(BaseIndex(input, index, TimesOne, inputPosition * sizeof(char)), reg); never executed: load8(BaseIndex(input, index, TimesOne, inputPosition * sizeof(char)), reg); | 0 | ||||||||||||||||||||||||
218 | else | - | ||||||||||||||||||||||||
219 | load16(BaseIndex(input, index, TimesTwo, inputPosition * sizeof(UChar)), reg); executed 796380 times by 9 tests: load16(BaseIndex(input, index, TimesTwo, inputPosition * sizeof(UChar)), reg); Executed by:
| 796380 | ||||||||||||||||||||||||
220 | } | - | ||||||||||||||||||||||||
221 | - | |||||||||||||||||||||||||
222 | void storeToFrame(RegisterID reg, unsigned frameLocation) | - | ||||||||||||||||||||||||
223 | { | - | ||||||||||||||||||||||||
224 | poke(reg, frameLocation); | - | ||||||||||||||||||||||||
225 | } executed 2414 times by 8 tests: end of block Executed by:
| 2414 | ||||||||||||||||||||||||
226 | - | |||||||||||||||||||||||||
227 | void storeToFrame(TrustedImm32 imm, unsigned frameLocation) | - | ||||||||||||||||||||||||
228 | { | - | ||||||||||||||||||||||||
229 | poke(imm, frameLocation); | - | ||||||||||||||||||||||||
230 | } executed 130 times by 2 tests: end of block Executed by:
| 130 | ||||||||||||||||||||||||
231 | - | |||||||||||||||||||||||||
232 | DataLabelPtr storeToFrameWithPatch(unsigned frameLocation) | - | ||||||||||||||||||||||||
233 | { | - | ||||||||||||||||||||||||
234 | return executed 511 times by 3 tests: storePtrWithPatch(TrustedImmPtr(0), Address(stackPointerRegister, frameLocation * sizeof(void*)));return storePtrWithPatch(TrustedImmPtr(0), Address(stackPointerRegister, frameLocation * sizeof(void*))); Executed by:
executed 511 times by 3 tests: return storePtrWithPatch(TrustedImmPtr(0), Address(stackPointerRegister, frameLocation * sizeof(void*))); Executed by:
| 511 | ||||||||||||||||||||||||
235 | } | - | ||||||||||||||||||||||||
236 | - | |||||||||||||||||||||||||
237 | void loadFromFrame(unsigned frameLocation, RegisterID reg) | - | ||||||||||||||||||||||||
238 | { | - | ||||||||||||||||||||||||
239 | peek(reg, frameLocation); | - | ||||||||||||||||||||||||
240 | } executed 2274 times by 8 tests: end of block Executed by:
| 2274 | ||||||||||||||||||||||||
241 | - | |||||||||||||||||||||||||
242 | void loadFromFrameAndJump(unsigned frameLocation) | - | ||||||||||||||||||||||||
243 | { | - | ||||||||||||||||||||||||
244 | jump(Address(stackPointerRegister, frameLocation * sizeof(void*))); | - | ||||||||||||||||||||||||
245 | } executed 164 times by 3 tests: end of block Executed by:
| 164 | ||||||||||||||||||||||||
246 | - | |||||||||||||||||||||||||
247 | unsigned alignCallFrameSizeInBytes(unsigned callFrameSize) | - | ||||||||||||||||||||||||
248 | { | - | ||||||||||||||||||||||||
249 | callFrameSize *= sizeof(void*); | - | ||||||||||||||||||||||||
250 | if (callFrameSize / sizeof(void*) != m_pattern.m_body->m_callFrameSize
| 0-3198 | ||||||||||||||||||||||||
251 | ( never executed: qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap());(qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap()); never executed: (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap()); | 0 | ||||||||||||||||||||||||
252 | - | |||||||||||||||||||||||||
253 | - | |||||||||||||||||||||||||
254 | - | |||||||||||||||||||||||||
255 | - | |||||||||||||||||||||||||
256 | callFrameSize = (callFrameSize + 0xf) & ~0xf; | - | ||||||||||||||||||||||||
257 | if (!callFrameSize
| 0-3199 | ||||||||||||||||||||||||
258 | ( never executed: qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap());(qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap()); never executed: (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap()); | 0 | ||||||||||||||||||||||||
259 | return executed 3196 times by 8 tests: callFrameSize;return callFrameSize; Executed by:
executed 3196 times by 8 tests: return callFrameSize; Executed by:
| 3196 | ||||||||||||||||||||||||
260 | } | - | ||||||||||||||||||||||||
261 | void initCallFrame() | - | ||||||||||||||||||||||||
262 | { | - | ||||||||||||||||||||||||
263 | unsigned callFrameSize = m_pattern.m_body->m_callFrameSize; | - | ||||||||||||||||||||||||
264 | if (callFrameSize
| 1138-1145957 | ||||||||||||||||||||||||
265 | subPtr(Imm32(alignCallFrameSizeInBytes(callFrameSize)), stackPointerRegister); executed 1139 times by 8 tests: subPtr(Imm32(alignCallFrameSizeInBytes(callFrameSize)), stackPointerRegister); Executed by:
| 1139 | ||||||||||||||||||||||||
266 | } executed 1146835 times by 153 tests: end of block Executed by:
| 1146835 | ||||||||||||||||||||||||
267 | void removeCallFrame() | - | ||||||||||||||||||||||||
268 | { | - | ||||||||||||||||||||||||
269 | unsigned callFrameSize = m_pattern.m_body->m_callFrameSize; | - | ||||||||||||||||||||||||
270 | if (callFrameSize
| 2067-2299007 | ||||||||||||||||||||||||
271 | addPtr(Imm32(alignCallFrameSizeInBytes(callFrameSize)), stackPointerRegister); executed 2067 times by 8 tests: addPtr(Imm32(alignCallFrameSizeInBytes(callFrameSize)), stackPointerRegister); Executed by:
| 2067 | ||||||||||||||||||||||||
272 | } executed 2301104 times by 153 tests: end of block Executed by:
| 2301104 | ||||||||||||||||||||||||
273 | - | |||||||||||||||||||||||||
274 | - | |||||||||||||||||||||||||
275 | void setSubpatternStart(RegisterID reg, unsigned subpattern) | - | ||||||||||||||||||||||||
276 | { | - | ||||||||||||||||||||||||
277 | (!(subpattern) ? (qmlWTFReportAssertionFailure(__FILE__, 371, __PRETTY_FUNCTION__, "subpattern"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
278 | - | |||||||||||||||||||||||||
279 | store32(reg, Address(output, (subpattern << 1) * sizeof(int))); | - | ||||||||||||||||||||||||
280 | } executed 1478 times by 3 tests: end of block Executed by:
| 1478 | ||||||||||||||||||||||||
281 | void setSubpatternEnd(RegisterID reg, unsigned subpattern) | - | ||||||||||||||||||||||||
282 | { | - | ||||||||||||||||||||||||
283 | (!(subpattern) ? (qmlWTFReportAssertionFailure(__FILE__, 377, __PRETTY_FUNCTION__, "subpattern"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
284 | - | |||||||||||||||||||||||||
285 | store32(reg, Address(output, ((subpattern << 1) + 1) * sizeof(int))); | - | ||||||||||||||||||||||||
286 | } executed 1478 times by 3 tests: end of block Executed by:
| 1478 | ||||||||||||||||||||||||
287 | void clearSubpatternStart(unsigned subpattern) | - | ||||||||||||||||||||||||
288 | { | - | ||||||||||||||||||||||||
289 | (!(subpattern) ? (qmlWTFReportAssertionFailure(__FILE__, 383, __PRETTY_FUNCTION__, "subpattern"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
290 | - | |||||||||||||||||||||||||
291 | store32(TrustedImm32(-1), Address(output, (subpattern << 1) * sizeof(int))); | - | ||||||||||||||||||||||||
292 | } executed 1476 times by 3 tests: end of block Executed by:
| 1476 | ||||||||||||||||||||||||
293 | void setMatchStart(RegisterID reg) | - | ||||||||||||||||||||||||
294 | { | - | ||||||||||||||||||||||||
295 | (!(!m_pattern.m_body->m_hasFixedSize) ? (qmlWTFReportAssertionFailure(__FILE__, 399, __PRETTY_FUNCTION__, "!m_pattern.m_body->m_hasFixedSize"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
296 | if (compileMode == IncludeSubpatterns
| 0-3424 | ||||||||||||||||||||||||
297 | store32(reg, output); executed 3422 times by 8 tests: store32(reg, output); Executed by:
| 3422 | ||||||||||||||||||||||||
298 | else | - | ||||||||||||||||||||||||
299 | move(reg, output); never executed: move(reg, output); | 0 | ||||||||||||||||||||||||
300 | } | - | ||||||||||||||||||||||||
301 | void getMatchStart(RegisterID reg) | - | ||||||||||||||||||||||||
302 | { | - | ||||||||||||||||||||||||
303 | (!(!m_pattern.m_body->m_hasFixedSize) ? (qmlWTFReportAssertionFailure(__FILE__, 407, __PRETTY_FUNCTION__, "!m_pattern.m_body->m_hasFixedSize"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
304 | if (compileMode == IncludeSubpatterns
| 0-1197 | ||||||||||||||||||||||||
305 | load32(output, reg); executed 1197 times by 8 tests: load32(output, reg); Executed by:
| 1197 | ||||||||||||||||||||||||
306 | else | - | ||||||||||||||||||||||||
307 | move(output, reg); never executed: move(output, reg); | 0 | ||||||||||||||||||||||||
308 | } | - | ||||||||||||||||||||||||
309 | - | |||||||||||||||||||||||||
310 | enum YarrOpCode { | - | ||||||||||||||||||||||||
311 | - | |||||||||||||||||||||||||
312 | - | |||||||||||||||||||||||||
313 | - | |||||||||||||||||||||||||
314 | - | |||||||||||||||||||||||||
315 | - | |||||||||||||||||||||||||
316 | - | |||||||||||||||||||||||||
317 | OpBodyAlternativeBegin, | - | ||||||||||||||||||||||||
318 | OpBodyAlternativeNext, | - | ||||||||||||||||||||||||
319 | OpBodyAlternativeEnd, | - | ||||||||||||||||||||||||
320 | - | |||||||||||||||||||||||||
321 | - | |||||||||||||||||||||||||
322 | OpNestedAlternativeBegin, | - | ||||||||||||||||||||||||
323 | OpNestedAlternativeNext, | - | ||||||||||||||||||||||||
324 | OpNestedAlternativeEnd, | - | ||||||||||||||||||||||||
325 | - | |||||||||||||||||||||||||
326 | - | |||||||||||||||||||||||||
327 | - | |||||||||||||||||||||||||
328 | - | |||||||||||||||||||||||||
329 | OpSimpleNestedAlternativeBegin, | - | ||||||||||||||||||||||||
330 | OpSimpleNestedAlternativeNext, | - | ||||||||||||||||||||||||
331 | OpSimpleNestedAlternativeEnd, | - | ||||||||||||||||||||||||
332 | - | |||||||||||||||||||||||||
333 | OpParenthesesSubpatternOnceBegin, | - | ||||||||||||||||||||||||
334 | OpParenthesesSubpatternOnceEnd, | - | ||||||||||||||||||||||||
335 | - | |||||||||||||||||||||||||
336 | OpParenthesesSubpatternTerminalBegin, | - | ||||||||||||||||||||||||
337 | OpParenthesesSubpatternTerminalEnd, | - | ||||||||||||||||||||||||
338 | - | |||||||||||||||||||||||||
339 | OpParentheticalAssertionBegin, | - | ||||||||||||||||||||||||
340 | OpParentheticalAssertionEnd, | - | ||||||||||||||||||||||||
341 | - | |||||||||||||||||||||||||
342 | OpTerm, | - | ||||||||||||||||||||||||
343 | - | |||||||||||||||||||||||||
344 | - | |||||||||||||||||||||||||
345 | OpMatchFailed | - | ||||||||||||||||||||||||
346 | }; | - | ||||||||||||||||||||||||
347 | - | |||||||||||||||||||||||||
348 | - | |||||||||||||||||||||||||
349 | - | |||||||||||||||||||||||||
350 | - | |||||||||||||||||||||||||
351 | struct YarrOp { | - | ||||||||||||||||||||||||
352 | explicit YarrOp(PatternTerm* term) | - | ||||||||||||||||||||||||
353 | : m_op(OpTerm) | - | ||||||||||||||||||||||||
354 | , m_term(term) | - | ||||||||||||||||||||||||
355 | , m_isDeadCode(false) | - | ||||||||||||||||||||||||
356 | { | - | ||||||||||||||||||||||||
357 | } executed 2373561 times by 9 tests: end of block Executed by:
| 2373561 | ||||||||||||||||||||||||
358 | - | |||||||||||||||||||||||||
359 | explicit YarrOp(YarrOpCode op) | - | ||||||||||||||||||||||||
360 | : m_op(op) | - | ||||||||||||||||||||||||
361 | , m_isDeadCode(false) | - | ||||||||||||||||||||||||
362 | { | - | ||||||||||||||||||||||||
363 | } executed 2312673 times by 153 tests: end of block Executed by:
| 2312673 | ||||||||||||||||||||||||
364 | - | |||||||||||||||||||||||||
365 | - | |||||||||||||||||||||||||
366 | YarrOpCode m_op; | - | ||||||||||||||||||||||||
367 | PatternTerm* m_term = nullptr; | - | ||||||||||||||||||||||||
368 | - | |||||||||||||||||||||||||
369 | - | |||||||||||||||||||||||||
370 | - | |||||||||||||||||||||||||
371 | - | |||||||||||||||||||||||||
372 | - | |||||||||||||||||||||||||
373 | - | |||||||||||||||||||||||||
374 | PatternAlternative* m_alternative = nullptr; | - | ||||||||||||||||||||||||
375 | size_t m_previousOp = 0; | - | ||||||||||||||||||||||||
376 | size_t m_nextOp = 0; | - | ||||||||||||||||||||||||
377 | - | |||||||||||||||||||||||||
378 | - | |||||||||||||||||||||||||
379 | - | |||||||||||||||||||||||||
380 | - | |||||||||||||||||||||||||
381 | - | |||||||||||||||||||||||||
382 | Label m_reentry; | - | ||||||||||||||||||||||||
383 | JumpList m_jumps; | - | ||||||||||||||||||||||||
384 | - | |||||||||||||||||||||||||
385 | - | |||||||||||||||||||||||||
386 | - | |||||||||||||||||||||||||
387 | Jump m_zeroLengthMatch; | - | ||||||||||||||||||||||||
388 | - | |||||||||||||||||||||||||
389 | - | |||||||||||||||||||||||||
390 | - | |||||||||||||||||||||||||
391 | bool m_isDeadCode; | - | ||||||||||||||||||||||||
392 | - | |||||||||||||||||||||||||
393 | - | |||||||||||||||||||||||||
394 | - | |||||||||||||||||||||||||
395 | - | |||||||||||||||||||||||||
396 | int m_checkAdjust; | - | ||||||||||||||||||||||||
397 | - | |||||||||||||||||||||||||
398 | - | |||||||||||||||||||||||||
399 | - | |||||||||||||||||||||||||
400 | - | |||||||||||||||||||||||||
401 | DataLabelPtr m_returnAddress; | - | ||||||||||||||||||||||||
402 | }; | - | ||||||||||||||||||||||||
403 | class BacktrackingState { | - | ||||||||||||||||||||||||
404 | public: | - | ||||||||||||||||||||||||
405 | BacktrackingState() | - | ||||||||||||||||||||||||
406 | : m_pendingFallthrough(false) | - | ||||||||||||||||||||||||
407 | { | - | ||||||||||||||||||||||||
408 | } executed 1148632 times by 153 tests: end of block Executed by:
| 1148632 | ||||||||||||||||||||||||
409 | - | |||||||||||||||||||||||||
410 | - | |||||||||||||||||||||||||
411 | - | |||||||||||||||||||||||||
412 | void append(const Jump& jump) | - | ||||||||||||||||||||||||
413 | { | - | ||||||||||||||||||||||||
414 | m_laterFailures.append(jump); | - | ||||||||||||||||||||||||
415 | } executed 2176 times by 8 tests: end of block Executed by:
| 2176 | ||||||||||||||||||||||||
416 | void append(JumpList& jumpList) | - | ||||||||||||||||||||||||
417 | { | - | ||||||||||||||||||||||||
418 | m_laterFailures.append(jumpList); | - | ||||||||||||||||||||||||
419 | } executed 2379600 times by 9 tests: end of block Executed by:
| 2379600 | ||||||||||||||||||||||||
420 | void append(const DataLabelPtr& returnAddress) | - | ||||||||||||||||||||||||
421 | { | - | ||||||||||||||||||||||||
422 | m_pendingReturns.append(returnAddress); | - | ||||||||||||||||||||||||
423 | } executed 512 times by 3 tests: end of block Executed by:
| 512 | ||||||||||||||||||||||||
424 | void fallthrough() | - | ||||||||||||||||||||||||
425 | { | - | ||||||||||||||||||||||||
426 | (!(!m_pendingFallthrough) ? (qmlWTFReportAssertionFailure(__FILE__, 547, __PRETTY_FUNCTION__, "!m_pendingFallthrough"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
427 | m_pendingFallthrough = true; | - | ||||||||||||||||||||||||
428 | } executed 1854 times by 3 tests: end of block Executed by:
| 1854 | ||||||||||||||||||||||||
429 | - | |||||||||||||||||||||||||
430 | - | |||||||||||||||||||||||||
431 | - | |||||||||||||||||||||||||
432 | - | |||||||||||||||||||||||||
433 | - | |||||||||||||||||||||||||
434 | void link(MacroAssembler* assembler) | - | ||||||||||||||||||||||||
435 | { | - | ||||||||||||||||||||||||
436 | if (m_pendingReturns.size()
| 76-1154950 | ||||||||||||||||||||||||
437 | Label here(assembler); | - | ||||||||||||||||||||||||
438 | for (unsigned i = 0; i < m_pendingReturns.size()
| 76 | ||||||||||||||||||||||||
439 | m_backtrackRecords.append(ReturnAddressRecord(m_pendingReturns[i], here)); executed 76 times by 3 tests: m_backtrackRecords.append(ReturnAddressRecord(m_pendingReturns[i], here)); Executed by:
| 76 | ||||||||||||||||||||||||
440 | m_pendingReturns.clear(); | - | ||||||||||||||||||||||||
441 | } executed 76 times by 3 tests: end of block Executed by:
| 76 | ||||||||||||||||||||||||
442 | m_laterFailures.link(assembler); | - | ||||||||||||||||||||||||
443 | m_laterFailures.clear(); | - | ||||||||||||||||||||||||
444 | m_pendingFallthrough = false; | - | ||||||||||||||||||||||||
445 | } executed 1154003 times by 153 tests: end of block Executed by:
| 1154003 | ||||||||||||||||||||||||
446 | void linkTo(Label label, MacroAssembler* assembler) | - | ||||||||||||||||||||||||
447 | { | - | ||||||||||||||||||||||||
448 | if (m_pendingReturns.size()
| 288-416 | ||||||||||||||||||||||||
449 | for (unsigned i = 0; i < m_pendingReturns.size()
| 287-288 | ||||||||||||||||||||||||
450 | m_backtrackRecords.append(ReturnAddressRecord(m_pendingReturns[i], label)); executed 286 times by 1 test: m_backtrackRecords.append(ReturnAddressRecord(m_pendingReturns[i], label)); Executed by:
| 286 | ||||||||||||||||||||||||
451 | m_pendingReturns.clear(); | - | ||||||||||||||||||||||||
452 | } executed 287 times by 1 test: end of block Executed by:
| 287 | ||||||||||||||||||||||||
453 | if (m_pendingFallthrough
| 108-594 | ||||||||||||||||||||||||
454 | assembler->jump(label); executed 108 times by 1 test: assembler->jump(label); Executed by:
| 108 | ||||||||||||||||||||||||
455 | m_laterFailures.linkTo(label, assembler); | - | ||||||||||||||||||||||||
456 | m_laterFailures.clear(); | - | ||||||||||||||||||||||||
457 | m_pendingFallthrough = false; | - | ||||||||||||||||||||||||
458 | } executed 704 times by 5 tests: end of block Executed by:
| 704 | ||||||||||||||||||||||||
459 | void takeBacktracksToJumpList(JumpList& jumpList, MacroAssembler* assembler) | - | ||||||||||||||||||||||||
460 | { | - | ||||||||||||||||||||||||
461 | if (m_pendingReturns.size()
| 58-145 | ||||||||||||||||||||||||
462 | Label here(assembler); | - | ||||||||||||||||||||||||
463 | for (unsigned i = 0; i < m_pendingReturns.size()
| 146-148 | ||||||||||||||||||||||||
464 | m_backtrackRecords.append(ReturnAddressRecord(m_pendingReturns[i], here)); executed 147 times by 2 tests: m_backtrackRecords.append(ReturnAddressRecord(m_pendingReturns[i], here)); Executed by:
| 147 | ||||||||||||||||||||||||
465 | m_pendingReturns.clear(); | - | ||||||||||||||||||||||||
466 | m_pendingFallthrough = true; | - | ||||||||||||||||||||||||
467 | } executed 148 times by 2 tests: end of block Executed by:
| 148 | ||||||||||||||||||||||||
468 | if (m_pendingFallthrough
| 40-166 | ||||||||||||||||||||||||
469 | jumpList.append(assembler->jump()); executed 165 times by 3 tests: jumpList.append(assembler->jump()); Executed by:
| 165 | ||||||||||||||||||||||||
470 | jumpList.append(m_laterFailures); | - | ||||||||||||||||||||||||
471 | m_laterFailures.clear(); | - | ||||||||||||||||||||||||
472 | m_pendingFallthrough = false; | - | ||||||||||||||||||||||||
473 | } executed 206 times by 3 tests: end of block Executed by:
| 206 | ||||||||||||||||||||||||
474 | - | |||||||||||||||||||||||||
475 | bool isEmpty() | - | ||||||||||||||||||||||||
476 | { | - | ||||||||||||||||||||||||
477 | return executed 2298275 times by 153 tests: m_laterFailures.empty() && m_pendingReturns.isEmpty() && !m_pendingFallthrough;return m_laterFailures.empty() && m_pendingReturns.isEmpty() && !m_pendingFallthrough; Executed by:
executed 2298275 times by 153 tests: return m_laterFailures.empty() && m_pendingReturns.isEmpty() && !m_pendingFallthrough; Executed by:
| 2298275 | ||||||||||||||||||||||||
478 | } | - | ||||||||||||||||||||||||
479 | - | |||||||||||||||||||||||||
480 | - | |||||||||||||||||||||||||
481 | void linkDataLabels(LinkBuffer<JSC::DefaultMacroAssembler>& linkBuffer) | - | ||||||||||||||||||||||||
482 | { | - | ||||||||||||||||||||||||
483 | (!(isEmpty()) ? (qmlWTFReportAssertionFailure(__FILE__, 604, __PRETTY_FUNCTION__, "isEmpty()"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
484 | for (unsigned i = 0; i < m_backtrackRecords.size()
| 512-1150961 | ||||||||||||||||||||||||
485 | linkBuffer.patch(m_backtrackRecords[i].m_dataLabel, linkBuffer.locationOf(m_backtrackRecords[i].m_backtrackLocation)); executed 512 times by 3 tests: linkBuffer.patch(m_backtrackRecords[i].m_dataLabel, linkBuffer.locationOf(m_backtrackRecords[i].m_backtrackLocation)); Executed by:
| 512 | ||||||||||||||||||||||||
486 | } executed 1151131 times by 153 tests: end of block Executed by:
| 1151131 | ||||||||||||||||||||||||
487 | - | |||||||||||||||||||||||||
488 | private: | - | ||||||||||||||||||||||||
489 | struct ReturnAddressRecord { | - | ||||||||||||||||||||||||
490 | ReturnAddressRecord(DataLabelPtr dataLabel, Label backtrackLocation) | - | ||||||||||||||||||||||||
491 | : m_dataLabel(dataLabel) | - | ||||||||||||||||||||||||
492 | , m_backtrackLocation(backtrackLocation) | - | ||||||||||||||||||||||||
493 | { | - | ||||||||||||||||||||||||
494 | } executed 509 times by 3 tests: end of block Executed by:
| 509 | ||||||||||||||||||||||||
495 | - | |||||||||||||||||||||||||
496 | DataLabelPtr m_dataLabel; | - | ||||||||||||||||||||||||
497 | Label m_backtrackLocation; | - | ||||||||||||||||||||||||
498 | }; | - | ||||||||||||||||||||||||
499 | - | |||||||||||||||||||||||||
500 | JumpList m_laterFailures; | - | ||||||||||||||||||||||||
501 | bool m_pendingFallthrough; | - | ||||||||||||||||||||||||
502 | Vector<DataLabelPtr, 4> m_pendingReturns; | - | ||||||||||||||||||||||||
503 | Vector<ReturnAddressRecord, 4> m_backtrackRecords; | - | ||||||||||||||||||||||||
504 | }; | - | ||||||||||||||||||||||||
505 | void backtrackTermDefault(size_t opIndex) | - | ||||||||||||||||||||||||
506 | { | - | ||||||||||||||||||||||||
507 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
508 | m_backtrackingState.append(op.m_jumps); | - | ||||||||||||||||||||||||
509 | } executed 2371685 times by 9 tests: end of block Executed by:
| 2371685 | ||||||||||||||||||||||||
510 | - | |||||||||||||||||||||||||
511 | void generateAssertionBOL(size_t opIndex) | - | ||||||||||||||||||||||||
512 | { | - | ||||||||||||||||||||||||
513 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
514 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
515 | - | |||||||||||||||||||||||||
516 | if (m_pattern.m_multiline
| 20-134 | ||||||||||||||||||||||||
517 | const RegisterID character = regT0; | - | ||||||||||||||||||||||||
518 | - | |||||||||||||||||||||||||
519 | JumpList matchDest; | - | ||||||||||||||||||||||||
520 | if (!term->inputPosition
| 0-20 | ||||||||||||||||||||||||
521 | matchDest.append(branch32(Equal, index, Imm32(m_checked))); executed 20 times by 1 test: matchDest.append(branch32(Equal, index, Imm32(m_checked))); Executed by:
| 20 | ||||||||||||||||||||||||
522 | - | |||||||||||||||||||||||||
523 | readCharacter((term->inputPosition - m_checked) - 1, character); | - | ||||||||||||||||||||||||
524 | matchCharacterClass(character, matchDest, m_pattern.newlineCharacterClass()); | - | ||||||||||||||||||||||||
525 | op.m_jumps.append(jump()); | - | ||||||||||||||||||||||||
526 | - | |||||||||||||||||||||||||
527 | matchDest.link(this); | - | ||||||||||||||||||||||||
528 | } executed 20 times by 1 test: else {end of block Executed by:
| 20 | ||||||||||||||||||||||||
529 | - | |||||||||||||||||||||||||
530 | if (term->inputPosition
| 8-126 | ||||||||||||||||||||||||
531 | op.m_jumps.append(jump()); executed 8 times by 1 test: op.m_jumps.append(jump()); Executed by:
| 8 | ||||||||||||||||||||||||
532 | else | - | ||||||||||||||||||||||||
533 | op.m_jumps.append(branch32(NotEqual, index, Imm32(m_checked))); executed 126 times by 5 tests: op.m_jumps.append(branch32(NotEqual, index, Imm32(m_checked))); Executed by:
| 126 | ||||||||||||||||||||||||
534 | } | - | ||||||||||||||||||||||||
535 | } | - | ||||||||||||||||||||||||
536 | void backtrackAssertionBOL(size_t opIndex) | - | ||||||||||||||||||||||||
537 | { | - | ||||||||||||||||||||||||
538 | backtrackTermDefault(opIndex); | - | ||||||||||||||||||||||||
539 | } executed 154 times by 5 tests: end of block Executed by:
| 154 | ||||||||||||||||||||||||
540 | - | |||||||||||||||||||||||||
541 | void generateAssertionEOL(size_t opIndex) | - | ||||||||||||||||||||||||
542 | { | - | ||||||||||||||||||||||||
543 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
544 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
545 | - | |||||||||||||||||||||||||
546 | if (m_pattern.m_multiline
| 16-139 | ||||||||||||||||||||||||
547 | const RegisterID character = regT0; | - | ||||||||||||||||||||||||
548 | - | |||||||||||||||||||||||||
549 | JumpList matchDest; | - | ||||||||||||||||||||||||
550 | if (term->inputPosition == m_checked
| 0-16 | ||||||||||||||||||||||||
551 | matchDest.append(atEndOfInput()); executed 16 times by 1 test: matchDest.append(atEndOfInput()); Executed by:
| 16 | ||||||||||||||||||||||||
552 | - | |||||||||||||||||||||||||
553 | readCharacter(term->inputPosition - m_checked, character); | - | ||||||||||||||||||||||||
554 | matchCharacterClass(character, matchDest, m_pattern.newlineCharacterClass()); | - | ||||||||||||||||||||||||
555 | op.m_jumps.append(jump()); | - | ||||||||||||||||||||||||
556 | - | |||||||||||||||||||||||||
557 | matchDest.link(this); | - | ||||||||||||||||||||||||
558 | } executed 16 times by 1 test: else {end of block Executed by:
| 16 | ||||||||||||||||||||||||
559 | if (term->inputPosition == m_checked
| 0-139 | ||||||||||||||||||||||||
560 | op.m_jumps.append(notAtEndOfInput()); executed 139 times by 5 tests: op.m_jumps.append(notAtEndOfInput()); Executed by:
| 139 | ||||||||||||||||||||||||
561 | - | |||||||||||||||||||||||||
562 | else | - | ||||||||||||||||||||||||
563 | op.m_jumps.append(jump()); never executed: op.m_jumps.append(jump()); | 0 | ||||||||||||||||||||||||
564 | } | - | ||||||||||||||||||||||||
565 | } | - | ||||||||||||||||||||||||
566 | void backtrackAssertionEOL(size_t opIndex) | - | ||||||||||||||||||||||||
567 | { | - | ||||||||||||||||||||||||
568 | backtrackTermDefault(opIndex); | - | ||||||||||||||||||||||||
569 | } executed 155 times by 5 tests: end of block Executed by:
| 155 | ||||||||||||||||||||||||
570 | - | |||||||||||||||||||||||||
571 | - | |||||||||||||||||||||||||
572 | void matchAssertionWordchar(size_t opIndex, JumpList& nextIsWordChar, JumpList& nextIsNotWordChar) | - | ||||||||||||||||||||||||
573 | { | - | ||||||||||||||||||||||||
574 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
575 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
576 | - | |||||||||||||||||||||||||
577 | const RegisterID character = regT0; | - | ||||||||||||||||||||||||
578 | - | |||||||||||||||||||||||||
579 | if (term->inputPosition == m_checked
| 224-2032 | ||||||||||||||||||||||||
580 | nextIsNotWordChar.append(atEndOfInput()); executed 224 times by 1 test: nextIsNotWordChar.append(atEndOfInput()); Executed by:
| 224 | ||||||||||||||||||||||||
581 | - | |||||||||||||||||||||||||
582 | readCharacter((term->inputPosition - m_checked), character); | - | ||||||||||||||||||||||||
583 | matchCharacterClass(character, nextIsWordChar, m_pattern.wordcharCharacterClass()); | - | ||||||||||||||||||||||||
584 | } executed 2255 times by 1 test: end of block Executed by:
| 2255 | ||||||||||||||||||||||||
585 | - | |||||||||||||||||||||||||
586 | void generateAssertionWordBoundary(size_t opIndex) | - | ||||||||||||||||||||||||
587 | { | - | ||||||||||||||||||||||||
588 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
589 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
590 | - | |||||||||||||||||||||||||
591 | const RegisterID character = regT0; | - | ||||||||||||||||||||||||
592 | - | |||||||||||||||||||||||||
593 | Jump atBegin; | - | ||||||||||||||||||||||||
594 | JumpList matchDest; | - | ||||||||||||||||||||||||
595 | if (!term->inputPosition
| 247-880 | ||||||||||||||||||||||||
596 | atBegin = branch32(Equal, index, Imm32(m_checked)); executed 247 times by 1 test: atBegin = branch32(Equal, index, Imm32(m_checked)); Executed by:
| 247 | ||||||||||||||||||||||||
597 | readCharacter((term->inputPosition - m_checked) - 1, character); | - | ||||||||||||||||||||||||
598 | matchCharacterClass(character, matchDest, m_pattern.wordcharCharacterClass()); | - | ||||||||||||||||||||||||
599 | if (!term->inputPosition
| 248-880 | ||||||||||||||||||||||||
600 | atBegin.link(this); executed 248 times by 1 test: atBegin.link(this); Executed by:
| 248 | ||||||||||||||||||||||||
601 | - | |||||||||||||||||||||||||
602 | - | |||||||||||||||||||||||||
603 | JumpList nonWordCharThenWordChar; | - | ||||||||||||||||||||||||
604 | JumpList nonWordCharThenNonWordChar; | - | ||||||||||||||||||||||||
605 | if (term->invert()
| 84-1044 | ||||||||||||||||||||||||
606 | matchAssertionWordchar(opIndex, nonWordCharThenNonWordChar, nonWordCharThenWordChar); | - | ||||||||||||||||||||||||
607 | nonWordCharThenWordChar.append(jump()); | - | ||||||||||||||||||||||||
608 | } executed 84 times by 1 test: else {end of block Executed by:
| 84 | ||||||||||||||||||||||||
609 | matchAssertionWordchar(opIndex, nonWordCharThenWordChar, nonWordCharThenNonWordChar); | - | ||||||||||||||||||||||||
610 | nonWordCharThenNonWordChar.append(jump()); | - | ||||||||||||||||||||||||
611 | } executed 1044 times by 1 test: end of block Executed by:
| 1044 | ||||||||||||||||||||||||
612 | op.m_jumps.append(nonWordCharThenNonWordChar); | - | ||||||||||||||||||||||||
613 | - | |||||||||||||||||||||||||
614 | - | |||||||||||||||||||||||||
615 | matchDest.link(this); | - | ||||||||||||||||||||||||
616 | JumpList wordCharThenWordChar; | - | ||||||||||||||||||||||||
617 | JumpList wordCharThenNonWordChar; | - | ||||||||||||||||||||||||
618 | if (term->invert()
| 84-1044 | ||||||||||||||||||||||||
619 | matchAssertionWordchar(opIndex, wordCharThenNonWordChar, wordCharThenWordChar); | - | ||||||||||||||||||||||||
620 | wordCharThenWordChar.append(jump()); | - | ||||||||||||||||||||||||
621 | } executed 84 times by 1 test: else {end of block Executed by:
| 84 | ||||||||||||||||||||||||
622 | matchAssertionWordchar(opIndex, wordCharThenWordChar, wordCharThenNonWordChar); | - | ||||||||||||||||||||||||
623 | - | |||||||||||||||||||||||||
624 | } executed 1044 times by 1 test: end of block Executed by:
| 1044 | ||||||||||||||||||||||||
625 | - | |||||||||||||||||||||||||
626 | op.m_jumps.append(wordCharThenWordChar); | - | ||||||||||||||||||||||||
627 | - | |||||||||||||||||||||||||
628 | nonWordCharThenWordChar.link(this); | - | ||||||||||||||||||||||||
629 | wordCharThenNonWordChar.link(this); | - | ||||||||||||||||||||||||
630 | } executed 1127 times by 1 test: end of block Executed by:
| 1127 | ||||||||||||||||||||||||
631 | void backtrackAssertionWordBoundary(size_t opIndex) | - | ||||||||||||||||||||||||
632 | { | - | ||||||||||||||||||||||||
633 | backtrackTermDefault(opIndex); | - | ||||||||||||||||||||||||
634 | } executed 1127 times by 1 test: end of block Executed by:
| 1127 | ||||||||||||||||||||||||
635 | - | |||||||||||||||||||||||||
636 | void generatePatternCharacterOnce(size_t opIndex) | - | ||||||||||||||||||||||||
637 | { | - | ||||||||||||||||||||||||
638 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
639 | - | |||||||||||||||||||||||||
640 | if (op.m_isDeadCode
| 789416-1575565 | ||||||||||||||||||||||||
641 | return; executed 789193 times by 5 tests: return; Executed by:
| 789193 | ||||||||||||||||||||||||
642 | - | |||||||||||||||||||||||||
643 | - | |||||||||||||||||||||||||
644 | - | |||||||||||||||||||||||||
645 | (!(opIndex + 1 < m_ops.size()) ? (qmlWTFReportAssertionFailure(__FILE__, 774, __PRETTY_FUNCTION__, "opIndex + 1 < m_ops.size()"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
646 | YarrOp* nextOp = &m_ops[opIndex + 1]; | - | ||||||||||||||||||||||||
647 | - | |||||||||||||||||||||||||
648 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
649 | UChar ch = term->patternCharacter; | - | ||||||||||||||||||||||||
650 | - | |||||||||||||||||||||||||
651 | if ((
| 0-795117 | ||||||||||||||||||||||||
652 | - | |||||||||||||||||||||||||
653 | op.m_jumps.append(jump()); | - | ||||||||||||||||||||||||
654 | return; never executed: return; | 0 | ||||||||||||||||||||||||
655 | } | - | ||||||||||||||||||||||||
656 | - | |||||||||||||||||||||||||
657 | const RegisterID character = regT0; | - | ||||||||||||||||||||||||
658 | int maxCharactersAtOnce = m_charSize == Char8
| 0-1575640 | ||||||||||||||||||||||||
659 | unsigned ignoreCaseMask = 0; | - | ||||||||||||||||||||||||
660 | - | |||||||||||||||||||||||||
661 | - | |||||||||||||||||||||||||
662 | - | |||||||||||||||||||||||||
663 | int allCharacters = ch; | - | ||||||||||||||||||||||||
664 | - | |||||||||||||||||||||||||
665 | int numberCharacters; | - | ||||||||||||||||||||||||
666 | int startTermPosition = term->inputPosition; | - | ||||||||||||||||||||||||
667 | - | |||||||||||||||||||||||||
668 | - | |||||||||||||||||||||||||
669 | - | |||||||||||||||||||||||||
670 | (!(!m_pattern.m_ignoreCase || isASCIIAlpha(ch) || isCanonicallyUnique(ch)) ? (qmlWTFReportAssertionFailure(__FILE__, 799, __PRETTY_FUNCTION__, "!m_pattern.m_ignoreCase || isASCIIAlpha(ch) || isCanonicallyUnique(ch)"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
671 | - | |||||||||||||||||||||||||
672 | if (m_pattern.m_ignoreCase
| 40-1575222 | ||||||||||||||||||||||||
673 | - | |||||||||||||||||||||||||
674 | - | |||||||||||||||||||||||||
675 | - | |||||||||||||||||||||||||
676 | ignoreCaseMask |= 32; executed 201 times by 3 tests: ignoreCaseMask |= 32; Executed by:
| 201 | ||||||||||||||||||||||||
677 | - | |||||||||||||||||||||||||
678 | - | |||||||||||||||||||||||||
679 | for (numberCharacters = 1; numberCharacters < maxCharactersAtOnce
| 788200-1579245 | ||||||||||||||||||||||||
680 | PatternTerm* nextTerm = nextOp->m_term; | - | ||||||||||||||||||||||||
681 | - | |||||||||||||||||||||||||
682 | if (nextTerm->type != PatternTerm::TypePatternCharacter
| 1141-788846 | ||||||||||||||||||||||||
683 | || nextTerm->quantityType != QuantifierFixedCount
| 100-789342 | ||||||||||||||||||||||||
684 | || nextTerm->quantityCount != 1
| 4-789416 | ||||||||||||||||||||||||
685 | || nextTerm->inputPosition != (startTermPosition + numberCharacters)
| 30-789349 | ||||||||||||||||||||||||
686 | break; executed 1275 times by 4 tests: break; Executed by:
| 1275 | ||||||||||||||||||||||||
687 | - | |||||||||||||||||||||||||
688 | nextOp->m_isDeadCode = true; | - | ||||||||||||||||||||||||
689 | - | |||||||||||||||||||||||||
690 | - | |||||||||||||||||||||||||
691 | - | |||||||||||||||||||||||||
692 | - | |||||||||||||||||||||||||
693 | int shiftAmount = (m_charSize == Char8
| 0-788825 | ||||||||||||||||||||||||
694 | - | |||||||||||||||||||||||||
695 | - | |||||||||||||||||||||||||
696 | UChar currentCharacter = nextTerm->patternCharacter; | - | ||||||||||||||||||||||||
697 | - | |||||||||||||||||||||||||
698 | if ((
| 0-528327 | ||||||||||||||||||||||||
699 | - | |||||||||||||||||||||||||
700 | op.m_jumps.append(jump()); | - | ||||||||||||||||||||||||
701 | return; never executed: return; | 0 | ||||||||||||||||||||||||
702 | } | - | ||||||||||||||||||||||||
703 | - | |||||||||||||||||||||||||
704 | - | |||||||||||||||||||||||||
705 | - | |||||||||||||||||||||||||
706 | (!(!m_pattern.m_ignoreCase || isASCIIAlpha(currentCharacter) || isCanonicallyUnique(currentCharacter)) ? (qmlWTFReportAssertionFailure(__FILE__, 835, __PRETTY_FUNCTION__, "!m_pattern.m_ignoreCase || isASCIIAlpha(currentCharacter) || isCanonicallyUnique(currentCharacter)"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
707 | - | |||||||||||||||||||||||||
708 | allCharacters |= (currentCharacter << shiftAmount); | - | ||||||||||||||||||||||||
709 | - | |||||||||||||||||||||||||
710 | if ((
| 14-788566 | ||||||||||||||||||||||||
711 | ignoreCaseMask |= 32 << shiftAmount; executed 137 times by 3 tests: ignoreCaseMask |= 32 << shiftAmount; Executed by:
| 137 | ||||||||||||||||||||||||
712 | } executed 788656 times by 5 tests: end of block Executed by:
| 788656 | ||||||||||||||||||||||||
713 | - | |||||||||||||||||||||||||
714 | if (m_charSize == Char8
| 0-1577934 | ||||||||||||||||||||||||
715 | switch (numberCharacters) { | - | ||||||||||||||||||||||||
716 | case never executed: 1:case 1: never executed: case 1: | 0 | ||||||||||||||||||||||||
717 | op.m_jumps.append(jumpIfCharNotEquals(ch, startTermPosition - m_checked, character)); | - | ||||||||||||||||||||||||
718 | return; never executed: return; | 0 | ||||||||||||||||||||||||
719 | case never executed: 2:case 2: never executed: {case 2: | 0 | ||||||||||||||||||||||||
720 | BaseIndex address(input, index, TimesOne, (startTermPosition - m_checked) * sizeof(LChar)); | - | ||||||||||||||||||||||||
721 | load16Unaligned(address, character); | - | ||||||||||||||||||||||||
722 | break; never executed: break; | 0 | ||||||||||||||||||||||||
723 | } | - | ||||||||||||||||||||||||
724 | case never executed: 3:case 3: never executed: {case 3: | 0 | ||||||||||||||||||||||||
725 | BaseIndex highAddress(input, index, TimesOne, (startTermPosition - m_checked) * sizeof(LChar)); | - | ||||||||||||||||||||||||
726 | load16Unaligned(highAddress, character); | - | ||||||||||||||||||||||||
727 | if (ignoreCaseMask
| 0 | ||||||||||||||||||||||||
728 | or32(Imm32(ignoreCaseMask), character); never executed: or32(Imm32(ignoreCaseMask), character); | 0 | ||||||||||||||||||||||||
729 | op.m_jumps.append(branch32(NotEqual, character, Imm32((allCharacters & 0xffff) | ignoreCaseMask))); | - | ||||||||||||||||||||||||
730 | op.m_jumps.append(jumpIfCharNotEquals(allCharacters >> 16, startTermPosition + 2 - m_checked, character)); | - | ||||||||||||||||||||||||
731 | return; never executed: return; | 0 | ||||||||||||||||||||||||
732 | } | - | ||||||||||||||||||||||||
733 | case never executed: 4:case 4: never executed: {case 4: | 0 | ||||||||||||||||||||||||
734 | BaseIndex address(input, index, TimesOne, (startTermPosition - m_checked) * sizeof(LChar)); | - | ||||||||||||||||||||||||
735 | load32WithUnalignedHalfWords(address, character); | - | ||||||||||||||||||||||||
736 | break; never executed: break; | 0 | ||||||||||||||||||||||||
737 | } | - | ||||||||||||||||||||||||
738 | } | - | ||||||||||||||||||||||||
739 | } never executed: else {end of block | 0 | ||||||||||||||||||||||||
740 | switch (numberCharacters) { | - | ||||||||||||||||||||||||
741 | case executed 789795 times by 5 tests: 1:case 1: Executed by:
executed 789795 times by 5 tests: case 1: Executed by:
| 789795 | ||||||||||||||||||||||||
742 | op.m_jumps.append(jumpIfCharNotEquals(ch, term->inputPosition - m_checked, character)); | - | ||||||||||||||||||||||||
743 | return; executed 789751 times by 5 tests: return; Executed by:
| 789751 | ||||||||||||||||||||||||
744 | case executed 788772 times by 5 tests: 2:case 2: Executed by:
executed 788772 times by 5 tests: case 2: Executed by:
| 788772 | ||||||||||||||||||||||||
745 | BaseIndex address(input, index, TimesTwo, (term->inputPosition - m_checked) * sizeof(UChar)); | - | ||||||||||||||||||||||||
746 | load32WithUnalignedHalfWords(address, character); | - | ||||||||||||||||||||||||
747 | break; executed 789302 times by 5 tests: break; Executed by:
| 789302 | ||||||||||||||||||||||||
748 | } | - | ||||||||||||||||||||||||
749 | } executed 789163 times by 5 tests: end of block Executed by:
| 789163 | ||||||||||||||||||||||||
750 | - | |||||||||||||||||||||||||
751 | if (ignoreCaseMask
| 148-789059 | ||||||||||||||||||||||||
752 | or32(Imm32(ignoreCaseMask), character); executed 148 times by 3 tests: or32(Imm32(ignoreCaseMask), character); Executed by:
| 148 | ||||||||||||||||||||||||
753 | op.m_jumps.append(branch32(NotEqual, character, Imm32(allCharacters | ignoreCaseMask))); | - | ||||||||||||||||||||||||
754 | return; executed 789168 times by 5 tests: return; Executed by:
| 789168 | ||||||||||||||||||||||||
755 | } | - | ||||||||||||||||||||||||
756 | void backtrackPatternCharacterOnce(size_t opIndex) | - | ||||||||||||||||||||||||
757 | { | - | ||||||||||||||||||||||||
758 | backtrackTermDefault(opIndex); | - | ||||||||||||||||||||||||
759 | } executed 2368455 times by 6 tests: end of block Executed by:
| 2368455 | ||||||||||||||||||||||||
760 | - | |||||||||||||||||||||||||
761 | void generatePatternCharacterFixed(size_t opIndex) | - | ||||||||||||||||||||||||
762 | { | - | ||||||||||||||||||||||||
763 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
764 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
765 | UChar ch = term->patternCharacter; | - | ||||||||||||||||||||||||
766 | - | |||||||||||||||||||||||||
767 | const RegisterID character = regT0; | - | ||||||||||||||||||||||||
768 | const RegisterID countRegister = regT1; | - | ||||||||||||||||||||||||
769 | - | |||||||||||||||||||||||||
770 | move(index, countRegister); | - | ||||||||||||||||||||||||
771 | sub32(Imm32(term->quantityCount.unsafeGet()), countRegister); | - | ||||||||||||||||||||||||
772 | - | |||||||||||||||||||||||||
773 | Label loop(this); | - | ||||||||||||||||||||||||
774 | BaseIndex address(input, countRegister, m_charScale, (Checked<int>(term->inputPosition - m_checked + Checked<int64_t>(term->quantityCount)) * static_cast<int>(m_charSize == Char8 ? sizeof(char) : sizeof(UChar))).unsafeGet()); | - | ||||||||||||||||||||||||
775 | - | |||||||||||||||||||||||||
776 | if (m_charSize == Char8
| 0-32 | ||||||||||||||||||||||||
777 | load8(address, character); never executed: load8(address, character); | 0 | ||||||||||||||||||||||||
778 | else | - | ||||||||||||||||||||||||
779 | load16(address, character); executed 32 times by 2 tests: load16(address, character); Executed by:
| 32 | ||||||||||||||||||||||||
780 | - | |||||||||||||||||||||||||
781 | - | |||||||||||||||||||||||||
782 | - | |||||||||||||||||||||||||
783 | (!(!m_pattern.m_ignoreCase || isASCIIAlpha(ch) || isCanonicallyUnique(ch)) ? (qmlWTFReportAssertionFailure(__FILE__, 912, __PRETTY_FUNCTION__, "!m_pattern.m_ignoreCase || isASCIIAlpha(ch) || isCanonicallyUnique(ch)"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
784 | if (m_pattern.m_ignoreCase
| 0-32 | ||||||||||||||||||||||||
785 | or32(TrustedImm32(0x20), character); | - | ||||||||||||||||||||||||
786 | ch |= 0x20; | - | ||||||||||||||||||||||||
787 | } never executed: end of block | 0 | ||||||||||||||||||||||||
788 | - | |||||||||||||||||||||||||
789 | op.m_jumps.append(branch32(NotEqual, character, Imm32(ch))); | - | ||||||||||||||||||||||||
790 | add32(TrustedImm32(1), countRegister); | - | ||||||||||||||||||||||||
791 | branch32(NotEqual, countRegister, index).linkTo(loop, this); | - | ||||||||||||||||||||||||
792 | } executed 32 times by 2 tests: end of block Executed by:
| 32 | ||||||||||||||||||||||||
793 | void backtrackPatternCharacterFixed(size_t opIndex) | - | ||||||||||||||||||||||||
794 | { | - | ||||||||||||||||||||||||
795 | backtrackTermDefault(opIndex); | - | ||||||||||||||||||||||||
796 | } executed 32 times by 2 tests: end of block Executed by:
| 32 | ||||||||||||||||||||||||
797 | - | |||||||||||||||||||||||||
798 | void generatePatternCharacterGreedy(size_t opIndex) | - | ||||||||||||||||||||||||
799 | { | - | ||||||||||||||||||||||||
800 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
801 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
802 | UChar ch = term->patternCharacter; | - | ||||||||||||||||||||||||
803 | - | |||||||||||||||||||||||||
804 | const RegisterID character = regT0; | - | ||||||||||||||||||||||||
805 | const RegisterID countRegister = regT1; | - | ||||||||||||||||||||||||
806 | - | |||||||||||||||||||||||||
807 | move(TrustedImm32(0), countRegister); | - | ||||||||||||||||||||||||
808 | - | |||||||||||||||||||||||||
809 | - | |||||||||||||||||||||||||
810 | if (!((
| 0-242 | ||||||||||||||||||||||||
811 | JumpList failures; | - | ||||||||||||||||||||||||
812 | Label loop(this); | - | ||||||||||||||||||||||||
813 | failures.append(atEndOfInput()); | - | ||||||||||||||||||||||||
814 | failures.append(jumpIfCharNotEquals(ch, term->inputPosition - m_checked, character)); | - | ||||||||||||||||||||||||
815 | - | |||||||||||||||||||||||||
816 | add32(TrustedImm32(1), countRegister); | - | ||||||||||||||||||||||||
817 | add32(TrustedImm32(1), index); | - | ||||||||||||||||||||||||
818 | if (term->quantityCount == quantifyInfinite
| 112-130 | ||||||||||||||||||||||||
819 | jump(loop); executed 112 times by 2 tests: jump(loop); Executed by:
| 112 | ||||||||||||||||||||||||
820 | else | - | ||||||||||||||||||||||||
821 | branch32(NotEqual, countRegister, Imm32(term->quantityCount.unsafeGet())).linkTo(loop, this); executed 130 times by 2 tests: branch32(NotEqual, countRegister, Imm32(term->quantityCount.unsafeGet())).linkTo(loop, this); Executed by:
| 130 | ||||||||||||||||||||||||
822 | - | |||||||||||||||||||||||||
823 | failures.link(this); | - | ||||||||||||||||||||||||
824 | } executed 242 times by 2 tests: end of block Executed by:
| 242 | ||||||||||||||||||||||||
825 | op.m_reentry = label(); | - | ||||||||||||||||||||||||
826 | - | |||||||||||||||||||||||||
827 | storeToFrame(countRegister, term->frameLocation); | - | ||||||||||||||||||||||||
828 | } executed 242 times by 2 tests: end of block Executed by:
| 242 | ||||||||||||||||||||||||
829 | void backtrackPatternCharacterGreedy(size_t opIndex) | - | ||||||||||||||||||||||||
830 | { | - | ||||||||||||||||||||||||
831 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
832 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
833 | - | |||||||||||||||||||||||||
834 | const RegisterID countRegister = regT1; | - | ||||||||||||||||||||||||
835 | - | |||||||||||||||||||||||||
836 | m_backtrackingState.link(this); | - | ||||||||||||||||||||||||
837 | - | |||||||||||||||||||||||||
838 | loadFromFrame(term->frameLocation, countRegister); | - | ||||||||||||||||||||||||
839 | m_backtrackingState.append(branchTest32(Zero, countRegister)); | - | ||||||||||||||||||||||||
840 | sub32(TrustedImm32(1), countRegister); | - | ||||||||||||||||||||||||
841 | sub32(TrustedImm32(1), index); | - | ||||||||||||||||||||||||
842 | jump(op.m_reentry); | - | ||||||||||||||||||||||||
843 | } executed 242 times by 2 tests: end of block Executed by:
| 242 | ||||||||||||||||||||||||
844 | - | |||||||||||||||||||||||||
845 | void generatePatternCharacterNonGreedy(size_t opIndex) | - | ||||||||||||||||||||||||
846 | { | - | ||||||||||||||||||||||||
847 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
848 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
849 | - | |||||||||||||||||||||||||
850 | const RegisterID countRegister = regT1; | - | ||||||||||||||||||||||||
851 | - | |||||||||||||||||||||||||
852 | move(TrustedImm32(0), countRegister); | - | ||||||||||||||||||||||||
853 | op.m_reentry = label(); | - | ||||||||||||||||||||||||
854 | storeToFrame(countRegister, term->frameLocation); | - | ||||||||||||||||||||||||
855 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||
856 | void backtrackPatternCharacterNonGreedy(size_t opIndex) | - | ||||||||||||||||||||||||
857 | { | - | ||||||||||||||||||||||||
858 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
859 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
860 | UChar ch = term->patternCharacter; | - | ||||||||||||||||||||||||
861 | - | |||||||||||||||||||||||||
862 | const RegisterID character = regT0; | - | ||||||||||||||||||||||||
863 | const RegisterID countRegister = regT1; | - | ||||||||||||||||||||||||
864 | - | |||||||||||||||||||||||||
865 | m_backtrackingState.link(this); | - | ||||||||||||||||||||||||
866 | - | |||||||||||||||||||||||||
867 | loadFromFrame(term->frameLocation, countRegister); | - | ||||||||||||||||||||||||
868 | - | |||||||||||||||||||||||||
869 | - | |||||||||||||||||||||||||
870 | if (!((
| 0-2 | ||||||||||||||||||||||||
871 | JumpList nonGreedyFailures; | - | ||||||||||||||||||||||||
872 | nonGreedyFailures.append(atEndOfInput()); | - | ||||||||||||||||||||||||
873 | if (term->quantityCount != quantifyInfinite
| 0-2 | ||||||||||||||||||||||||
874 | nonGreedyFailures.append(branch32(Equal, countRegister, Imm32(term->quantityCount.unsafeGet()))); executed 2 times by 1 test: nonGreedyFailures.append(branch32(Equal, countRegister, Imm32(term->quantityCount.unsafeGet()))); Executed by:
| 2 | ||||||||||||||||||||||||
875 | nonGreedyFailures.append(jumpIfCharNotEquals(ch, term->inputPosition - m_checked, character)); | - | ||||||||||||||||||||||||
876 | - | |||||||||||||||||||||||||
877 | add32(TrustedImm32(1), countRegister); | - | ||||||||||||||||||||||||
878 | add32(TrustedImm32(1), index); | - | ||||||||||||||||||||||||
879 | - | |||||||||||||||||||||||||
880 | jump(op.m_reentry); | - | ||||||||||||||||||||||||
881 | nonGreedyFailures.link(this); | - | ||||||||||||||||||||||||
882 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||
883 | - | |||||||||||||||||||||||||
884 | sub32(countRegister, index); | - | ||||||||||||||||||||||||
885 | m_backtrackingState.fallthrough(); | - | ||||||||||||||||||||||||
886 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||
887 | - | |||||||||||||||||||||||||
888 | void generateCharacterClassOnce(size_t opIndex) | - | ||||||||||||||||||||||||
889 | { | - | ||||||||||||||||||||||||
890 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
891 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
892 | - | |||||||||||||||||||||||||
893 | const RegisterID character = regT0; | - | ||||||||||||||||||||||||
894 | - | |||||||||||||||||||||||||
895 | JumpList matchDest; | - | ||||||||||||||||||||||||
896 | readCharacter(term->inputPosition - m_checked, character); | - | ||||||||||||||||||||||||
897 | matchCharacterClass(character, matchDest, term->characterClass); | - | ||||||||||||||||||||||||
898 | - | |||||||||||||||||||||||||
899 | if (term->invert()
| 647-842 | ||||||||||||||||||||||||
900 | op.m_jumps.append(matchDest); executed 646 times by 2 tests: op.m_jumps.append(matchDest); Executed by:
| 646 | ||||||||||||||||||||||||
901 | else { | - | ||||||||||||||||||||||||
902 | op.m_jumps.append(jump()); | - | ||||||||||||||||||||||||
903 | matchDest.link(this); | - | ||||||||||||||||||||||||
904 | } executed 843 times by 8 tests: end of block Executed by:
| 843 | ||||||||||||||||||||||||
905 | } | - | ||||||||||||||||||||||||
906 | void backtrackCharacterClassOnce(size_t opIndex) | - | ||||||||||||||||||||||||
907 | { | - | ||||||||||||||||||||||||
908 | backtrackTermDefault(opIndex); | - | ||||||||||||||||||||||||
909 | } executed 1489 times by 8 tests: end of block Executed by:
| 1489 | ||||||||||||||||||||||||
910 | - | |||||||||||||||||||||||||
911 | void generateCharacterClassFixed(size_t opIndex) | - | ||||||||||||||||||||||||
912 | { | - | ||||||||||||||||||||||||
913 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
914 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
915 | - | |||||||||||||||||||||||||
916 | const RegisterID character = regT0; | - | ||||||||||||||||||||||||
917 | const RegisterID countRegister = regT1; | - | ||||||||||||||||||||||||
918 | - | |||||||||||||||||||||||||
919 | move(index, countRegister); | - | ||||||||||||||||||||||||
920 | sub32(Imm32(term->quantityCount.unsafeGet()), countRegister); | - | ||||||||||||||||||||||||
921 | - | |||||||||||||||||||||||||
922 | Label loop(this); | - | ||||||||||||||||||||||||
923 | JumpList matchDest; | - | ||||||||||||||||||||||||
924 | if (m_charSize == Char8
| 0-292 | ||||||||||||||||||||||||
925 | load8(BaseIndex(input, countRegister, TimesOne, (Checked<int>(term->inputPosition - m_checked + Checked<int64_t>(term->quantityCount)) * static_cast<int>(sizeof(char))).unsafeGet()), character); never executed: load8(BaseIndex(input, countRegister, TimesOne, (Checked<int>(term->inputPosition - m_checked + Checked<int64_t>(term->quantityCount)) * static_cast<int>(sizeof(char))).unsafeGet()), character); | 0 | ||||||||||||||||||||||||
926 | else | - | ||||||||||||||||||||||||
927 | load16(BaseIndex(input, countRegister, TimesTwo, (Checked<int>(term->inputPosition - m_checked + Checked<int64_t>(term->quantityCount)) * static_cast<int>(sizeof(UChar))).unsafeGet()), character); executed 292 times by 2 tests: load16(BaseIndex(input, countRegister, TimesTwo, (Checked<int>(term->inputPosition - m_checked + Checked<int64_t>(term->quantityCount)) * static_cast<int>(sizeof(UChar))).unsafeGet()), character); Executed by:
| 292 | ||||||||||||||||||||||||
928 | matchCharacterClass(character, matchDest, term->characterClass); | - | ||||||||||||||||||||||||
929 | - | |||||||||||||||||||||||||
930 | if (term->invert()
| 24-268 | ||||||||||||||||||||||||
931 | op.m_jumps.append(matchDest); executed 24 times by 1 test: op.m_jumps.append(matchDest); Executed by:
| 24 | ||||||||||||||||||||||||
932 | else { | - | ||||||||||||||||||||||||
933 | op.m_jumps.append(jump()); | - | ||||||||||||||||||||||||
934 | matchDest.link(this); | - | ||||||||||||||||||||||||
935 | } executed 270 times by 2 tests: end of block Executed by:
| 270 | ||||||||||||||||||||||||
936 | - | |||||||||||||||||||||||||
937 | add32(TrustedImm32(1), countRegister); | - | ||||||||||||||||||||||||
938 | branch32(NotEqual, countRegister, index).linkTo(loop, this); | - | ||||||||||||||||||||||||
939 | } executed 292 times by 2 tests: end of block Executed by:
| 292 | ||||||||||||||||||||||||
940 | void backtrackCharacterClassFixed(size_t opIndex) | - | ||||||||||||||||||||||||
941 | { | - | ||||||||||||||||||||||||
942 | backtrackTermDefault(opIndex); | - | ||||||||||||||||||||||||
943 | } executed 292 times by 2 tests: end of block Executed by:
| 292 | ||||||||||||||||||||||||
944 | - | |||||||||||||||||||||||||
945 | void generateCharacterClassGreedy(size_t opIndex) | - | ||||||||||||||||||||||||
946 | { | - | ||||||||||||||||||||||||
947 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
948 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
949 | - | |||||||||||||||||||||||||
950 | const RegisterID character = regT0; | - | ||||||||||||||||||||||||
951 | const RegisterID countRegister = regT1; | - | ||||||||||||||||||||||||
952 | - | |||||||||||||||||||||||||
953 | move(TrustedImm32(0), countRegister); | - | ||||||||||||||||||||||||
954 | - | |||||||||||||||||||||||||
955 | JumpList failures; | - | ||||||||||||||||||||||||
956 | Label loop(this); | - | ||||||||||||||||||||||||
957 | failures.append(atEndOfInput()); | - | ||||||||||||||||||||||||
958 | - | |||||||||||||||||||||||||
959 | if (term->invert()
| 207-1722 | ||||||||||||||||||||||||
960 | readCharacter(term->inputPosition - m_checked, character); | - | ||||||||||||||||||||||||
961 | matchCharacterClass(character, failures, term->characterClass); | - | ||||||||||||||||||||||||
962 | } executed 208 times by 3 tests: else {end of block Executed by:
| 208 | ||||||||||||||||||||||||
963 | JumpList matchDest; | - | ||||||||||||||||||||||||
964 | readCharacter(term->inputPosition - m_checked, character); | - | ||||||||||||||||||||||||
965 | matchCharacterClass(character, matchDest, term->characterClass); | - | ||||||||||||||||||||||||
966 | failures.append(jump()); | - | ||||||||||||||||||||||||
967 | matchDest.link(this); | - | ||||||||||||||||||||||||
968 | } executed 1722 times by 7 tests: end of block Executed by:
| 1722 | ||||||||||||||||||||||||
969 | - | |||||||||||||||||||||||||
970 | add32(TrustedImm32(1), countRegister); | - | ||||||||||||||||||||||||
971 | add32(TrustedImm32(1), index); | - | ||||||||||||||||||||||||
972 | if (term->quantityCount != quantifyInfinite
| 214-1718 | ||||||||||||||||||||||||
973 | branch32(NotEqual, countRegister, Imm32(term->quantityCount.unsafeGet())).linkTo(loop, this); | - | ||||||||||||||||||||||||
974 | failures.append(jump()); | - | ||||||||||||||||||||||||
975 | } executed 215 times by 3 tests: elseend of block Executed by:
| 215 | ||||||||||||||||||||||||
976 | jump(loop); executed 1718 times by 7 tests: jump(loop); Executed by:
| 1718 | ||||||||||||||||||||||||
977 | - | |||||||||||||||||||||||||
978 | failures.link(this); | - | ||||||||||||||||||||||||
979 | op.m_reentry = label(); | - | ||||||||||||||||||||||||
980 | - | |||||||||||||||||||||||||
981 | storeToFrame(countRegister, term->frameLocation); | - | ||||||||||||||||||||||||
982 | } executed 1930 times by 8 tests: end of block Executed by:
| 1930 | ||||||||||||||||||||||||
983 | void backtrackCharacterClassGreedy(size_t opIndex) | - | ||||||||||||||||||||||||
984 | { | - | ||||||||||||||||||||||||
985 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
986 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
987 | - | |||||||||||||||||||||||||
988 | const RegisterID countRegister = regT1; | - | ||||||||||||||||||||||||
989 | - | |||||||||||||||||||||||||
990 | m_backtrackingState.link(this); | - | ||||||||||||||||||||||||
991 | - | |||||||||||||||||||||||||
992 | loadFromFrame(term->frameLocation, countRegister); | - | ||||||||||||||||||||||||
993 | m_backtrackingState.append(branchTest32(Zero, countRegister)); | - | ||||||||||||||||||||||||
994 | sub32(TrustedImm32(1), countRegister); | - | ||||||||||||||||||||||||
995 | sub32(TrustedImm32(1), index); | - | ||||||||||||||||||||||||
996 | jump(op.m_reentry); | - | ||||||||||||||||||||||||
997 | } executed 1931 times by 8 tests: end of block Executed by:
| 1931 | ||||||||||||||||||||||||
998 | - | |||||||||||||||||||||||||
999 | void generateCharacterClassNonGreedy(size_t opIndex) | - | ||||||||||||||||||||||||
1000 | { | - | ||||||||||||||||||||||||
1001 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
1002 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1003 | - | |||||||||||||||||||||||||
1004 | const RegisterID countRegister = regT1; | - | ||||||||||||||||||||||||
1005 | - | |||||||||||||||||||||||||
1006 | move(TrustedImm32(0), countRegister); | - | ||||||||||||||||||||||||
1007 | op.m_reentry = label(); | - | ||||||||||||||||||||||||
1008 | storeToFrame(countRegister, term->frameLocation); | - | ||||||||||||||||||||||||
1009 | } executed 32 times by 2 tests: end of block Executed by:
| 32 | ||||||||||||||||||||||||
1010 | void backtrackCharacterClassNonGreedy(size_t opIndex) | - | ||||||||||||||||||||||||
1011 | { | - | ||||||||||||||||||||||||
1012 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
1013 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1014 | - | |||||||||||||||||||||||||
1015 | const RegisterID character = regT0; | - | ||||||||||||||||||||||||
1016 | const RegisterID countRegister = regT1; | - | ||||||||||||||||||||||||
1017 | - | |||||||||||||||||||||||||
1018 | JumpList nonGreedyFailures; | - | ||||||||||||||||||||||||
1019 | - | |||||||||||||||||||||||||
1020 | m_backtrackingState.link(this); | - | ||||||||||||||||||||||||
1021 | - | |||||||||||||||||||||||||
1022 | loadFromFrame(term->frameLocation, countRegister); | - | ||||||||||||||||||||||||
1023 | - | |||||||||||||||||||||||||
1024 | nonGreedyFailures.append(atEndOfInput()); | - | ||||||||||||||||||||||||
1025 | nonGreedyFailures.append(branch32(Equal, countRegister, Imm32(term->quantityCount.unsafeGet()))); | - | ||||||||||||||||||||||||
1026 | - | |||||||||||||||||||||||||
1027 | JumpList matchDest; | - | ||||||||||||||||||||||||
1028 | readCharacter(term->inputPosition - m_checked, character); | - | ||||||||||||||||||||||||
1029 | matchCharacterClass(character, matchDest, term->characterClass); | - | ||||||||||||||||||||||||
1030 | - | |||||||||||||||||||||||||
1031 | if (term->invert()
| 12-20 | ||||||||||||||||||||||||
1032 | nonGreedyFailures.append(matchDest); executed 20 times by 2 tests: nonGreedyFailures.append(matchDest); Executed by:
| 20 | ||||||||||||||||||||||||
1033 | else { | - | ||||||||||||||||||||||||
1034 | nonGreedyFailures.append(jump()); | - | ||||||||||||||||||||||||
1035 | matchDest.link(this); | - | ||||||||||||||||||||||||
1036 | } executed 12 times by 1 test: end of block Executed by:
| 12 | ||||||||||||||||||||||||
1037 | - | |||||||||||||||||||||||||
1038 | add32(TrustedImm32(1), countRegister); | - | ||||||||||||||||||||||||
1039 | add32(TrustedImm32(1), index); | - | ||||||||||||||||||||||||
1040 | - | |||||||||||||||||||||||||
1041 | jump(op.m_reentry); | - | ||||||||||||||||||||||||
1042 | - | |||||||||||||||||||||||||
1043 | nonGreedyFailures.link(this); | - | ||||||||||||||||||||||||
1044 | sub32(countRegister, index); | - | ||||||||||||||||||||||||
1045 | m_backtrackingState.fallthrough(); | - | ||||||||||||||||||||||||
1046 | } executed 32 times by 2 tests: end of block Executed by:
| 32 | ||||||||||||||||||||||||
1047 | - | |||||||||||||||||||||||||
1048 | void generateDotStarEnclosure(size_t opIndex) | - | ||||||||||||||||||||||||
1049 | { | - | ||||||||||||||||||||||||
1050 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
1051 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1052 | - | |||||||||||||||||||||||||
1053 | const RegisterID character = regT0; | - | ||||||||||||||||||||||||
1054 | const RegisterID matchPos = regT1; | - | ||||||||||||||||||||||||
1055 | - | |||||||||||||||||||||||||
1056 | JumpList foundBeginningNewLine; | - | ||||||||||||||||||||||||
1057 | JumpList saveStartIndex; | - | ||||||||||||||||||||||||
1058 | JumpList foundEndingNewLine; | - | ||||||||||||||||||||||||
1059 | - | |||||||||||||||||||||||||
1060 | (!(!m_pattern.m_body->m_hasFixedSize) ? (qmlWTFReportAssertionFailure(__FILE__, 1189, __PRETTY_FUNCTION__, "!m_pattern.m_body->m_hasFixedSize"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1061 | getMatchStart(matchPos); | - | ||||||||||||||||||||||||
1062 | - | |||||||||||||||||||||||||
1063 | saveStartIndex.append(branchTest32(Zero, matchPos)); | - | ||||||||||||||||||||||||
1064 | Label findBOLLoop(this); | - | ||||||||||||||||||||||||
1065 | sub32(TrustedImm32(1), matchPos); | - | ||||||||||||||||||||||||
1066 | if (m_charSize == Char8
| 0-8 | ||||||||||||||||||||||||
1067 | load8(BaseIndex(input, matchPos, TimesOne, 0), character); never executed: load8(BaseIndex(input, matchPos, TimesOne, 0), character); | 0 | ||||||||||||||||||||||||
1068 | else | - | ||||||||||||||||||||||||
1069 | load16(BaseIndex(input, matchPos, TimesTwo, 0), character); executed 8 times by 1 test: load16(BaseIndex(input, matchPos, TimesTwo, 0), character); Executed by:
| 8 | ||||||||||||||||||||||||
1070 | matchCharacterClass(character, foundBeginningNewLine, m_pattern.newlineCharacterClass()); | - | ||||||||||||||||||||||||
1071 | branchTest32(NonZero, matchPos).linkTo(findBOLLoop, this); | - | ||||||||||||||||||||||||
1072 | saveStartIndex.append(jump()); | - | ||||||||||||||||||||||||
1073 | - | |||||||||||||||||||||||||
1074 | foundBeginningNewLine.link(this); | - | ||||||||||||||||||||||||
1075 | add32(TrustedImm32(1), matchPos); | - | ||||||||||||||||||||||||
1076 | saveStartIndex.link(this); | - | ||||||||||||||||||||||||
1077 | - | |||||||||||||||||||||||||
1078 | if (!m_pattern.m_multiline
| 0-8 | ||||||||||||||||||||||||
1079 | op.m_jumps.append(branchTest32(NonZero, matchPos)); never executed: op.m_jumps.append(branchTest32(NonZero, matchPos)); | 0 | ||||||||||||||||||||||||
1080 | - | |||||||||||||||||||||||||
1081 | (!(!m_pattern.m_body->m_hasFixedSize) ? (qmlWTFReportAssertionFailure(__FILE__, 1210, __PRETTY_FUNCTION__, "!m_pattern.m_body->m_hasFixedSize"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1082 | setMatchStart(matchPos); | - | ||||||||||||||||||||||||
1083 | - | |||||||||||||||||||||||||
1084 | move(index, matchPos); | - | ||||||||||||||||||||||||
1085 | - | |||||||||||||||||||||||||
1086 | Label findEOLLoop(this); | - | ||||||||||||||||||||||||
1087 | foundEndingNewLine.append(branch32(Equal, matchPos, length)); | - | ||||||||||||||||||||||||
1088 | if (m_charSize == Char8
| 0-8 | ||||||||||||||||||||||||
1089 | load8(BaseIndex(input, matchPos, TimesOne, 0), character); never executed: load8(BaseIndex(input, matchPos, TimesOne, 0), character); | 0 | ||||||||||||||||||||||||
1090 | else | - | ||||||||||||||||||||||||
1091 | load16(BaseIndex(input, matchPos, TimesTwo, 0), character); executed 8 times by 1 test: load16(BaseIndex(input, matchPos, TimesTwo, 0), character); Executed by:
| 8 | ||||||||||||||||||||||||
1092 | matchCharacterClass(character, foundEndingNewLine, m_pattern.newlineCharacterClass()); | - | ||||||||||||||||||||||||
1093 | add32(TrustedImm32(1), matchPos); | - | ||||||||||||||||||||||||
1094 | jump(findEOLLoop); | - | ||||||||||||||||||||||||
1095 | - | |||||||||||||||||||||||||
1096 | foundEndingNewLine.link(this); | - | ||||||||||||||||||||||||
1097 | - | |||||||||||||||||||||||||
1098 | if (!m_pattern.m_multiline
| 0-8 | ||||||||||||||||||||||||
1099 | op.m_jumps.append(branch32(NotEqual, matchPos, length)); never executed: op.m_jumps.append(branch32(NotEqual, matchPos, length)); | 0 | ||||||||||||||||||||||||
1100 | - | |||||||||||||||||||||||||
1101 | move(matchPos, index); | - | ||||||||||||||||||||||||
1102 | } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||||||||||||||||||||
1103 | - | |||||||||||||||||||||||||
1104 | void backtrackDotStarEnclosure(size_t opIndex) | - | ||||||||||||||||||||||||
1105 | { | - | ||||||||||||||||||||||||
1106 | backtrackTermDefault(opIndex); | - | ||||||||||||||||||||||||
1107 | } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||||||||||||||||||||
1108 | - | |||||||||||||||||||||||||
1109 | - | |||||||||||||||||||||||||
1110 | - | |||||||||||||||||||||||||
1111 | - | |||||||||||||||||||||||||
1112 | void generateTerm(size_t opIndex) | - | ||||||||||||||||||||||||
1113 | { | - | ||||||||||||||||||||||||
1114 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
1115 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1116 | - | |||||||||||||||||||||||||
1117 | switch (term->type) { | - | ||||||||||||||||||||||||
1118 | case executed 2366048 times by 6 tests: PatternTerm::TypePatternCharacter:case PatternTerm::TypePatternCharacter: Executed by:
executed 2366048 times by 6 tests: case PatternTerm::TypePatternCharacter: Executed by:
| 2366048 | ||||||||||||||||||||||||
1119 | switch (term->quantityType) { | - | ||||||||||||||||||||||||
1120 | case executed 2366259 times by 6 tests: QuantifierFixedCount:case QuantifierFixedCount: Executed by:
executed 2366259 times by 6 tests: case QuantifierFixedCount: Executed by:
| 2366259 | ||||||||||||||||||||||||
1121 | if (term->quantityCount == 1
| 32-2365861 | ||||||||||||||||||||||||
1122 | generatePatternCharacterOnce(opIndex); executed 2365820 times by 6 tests: generatePatternCharacterOnce(opIndex); Executed by:
| 2365820 | ||||||||||||||||||||||||
1123 | else | - | ||||||||||||||||||||||||
1124 | generatePatternCharacterFixed(opIndex); executed 32 times by 2 tests: generatePatternCharacterFixed(opIndex); Executed by:
| 32 | ||||||||||||||||||||||||
1125 | break; executed 2367419 times by 6 tests: break; Executed by:
| 2367419 | ||||||||||||||||||||||||
1126 | case executed 242 times by 2 tests: QuantifierGreedy:case QuantifierGreedy: Executed by:
executed 242 times by 2 tests: case QuantifierGreedy: Executed by:
| 242 | ||||||||||||||||||||||||
1127 | generatePatternCharacterGreedy(opIndex); | - | ||||||||||||||||||||||||
1128 | break; executed 242 times by 2 tests: break; Executed by:
| 242 | ||||||||||||||||||||||||
1129 | case executed 2 times by 1 test: QuantifierNonGreedy:case QuantifierNonGreedy: Executed by:
executed 2 times by 1 test: case QuantifierNonGreedy: Executed by:
| 2 | ||||||||||||||||||||||||
1130 | generatePatternCharacterNonGreedy(opIndex); | - | ||||||||||||||||||||||||
1131 | break; executed 2 times by 1 test: break; Executed by:
| 2 | ||||||||||||||||||||||||
1132 | } | - | ||||||||||||||||||||||||
1133 | break; executed 2367526 times by 6 tests: break; Executed by:
| 2367526 | ||||||||||||||||||||||||
1134 | - | |||||||||||||||||||||||||
1135 | case executed 3741 times by 9 tests: PatternTerm::TypeCharacterClass:case PatternTerm::TypeCharacterClass: Executed by:
executed 3741 times by 9 tests: case PatternTerm::TypeCharacterClass: Executed by:
| 3741 | ||||||||||||||||||||||||
1136 | switch (term->quantityType) { | - | ||||||||||||||||||||||||
1137 | case executed 1781 times by 8 tests: QuantifierFixedCount:case QuantifierFixedCount: Executed by:
executed 1781 times by 8 tests: case QuantifierFixedCount: Executed by:
| 1781 | ||||||||||||||||||||||||
1138 | if (term->quantityCount == 1
| 290-1489 | ||||||||||||||||||||||||
1139 | generateCharacterClassOnce(opIndex); executed 1489 times by 8 tests: generateCharacterClassOnce(opIndex); Executed by:
| 1489 | ||||||||||||||||||||||||
1140 | else | - | ||||||||||||||||||||||||
1141 | generateCharacterClassFixed(opIndex); executed 290 times by 2 tests: generateCharacterClassFixed(opIndex); Executed by:
| 290 | ||||||||||||||||||||||||
1142 | break; executed 1789 times by 8 tests: break; Executed by:
| 1789 | ||||||||||||||||||||||||
1143 | case executed 1929 times by 8 tests: QuantifierGreedy:case QuantifierGreedy: Executed by:
executed 1929 times by 8 tests: case QuantifierGreedy: Executed by:
| 1929 | ||||||||||||||||||||||||
1144 | generateCharacterClassGreedy(opIndex); | - | ||||||||||||||||||||||||
1145 | break; executed 1933 times by 8 tests: break; Executed by:
| 1933 | ||||||||||||||||||||||||
1146 | case executed 32 times by 2 tests: QuantifierNonGreedy:case QuantifierNonGreedy: Executed by:
executed 32 times by 2 tests: case QuantifierNonGreedy: Executed by:
| 32 | ||||||||||||||||||||||||
1147 | generateCharacterClassNonGreedy(opIndex); | - | ||||||||||||||||||||||||
1148 | break; executed 32 times by 2 tests: break; Executed by:
| 32 | ||||||||||||||||||||||||
1149 | } | - | ||||||||||||||||||||||||
1150 | break; executed 3754 times by 9 tests: break; Executed by:
| 3754 | ||||||||||||||||||||||||
1151 | - | |||||||||||||||||||||||||
1152 | case executed 154 times by 5 tests: PatternTerm::TypeAssertionBOL:case PatternTerm::TypeAssertionBOL: Executed by:
executed 154 times by 5 tests: case PatternTerm::TypeAssertionBOL: Executed by:
| 154 | ||||||||||||||||||||||||
1153 | generateAssertionBOL(opIndex); | - | ||||||||||||||||||||||||
1154 | break; executed 153 times by 5 tests: break; Executed by:
| 153 | ||||||||||||||||||||||||
1155 | - | |||||||||||||||||||||||||
1156 | case executed 155 times by 5 tests: PatternTerm::TypeAssertionEOL:case PatternTerm::TypeAssertionEOL: Executed by:
executed 155 times by 5 tests: case PatternTerm::TypeAssertionEOL: Executed by:
| 155 | ||||||||||||||||||||||||
1157 | generateAssertionEOL(opIndex); | - | ||||||||||||||||||||||||
1158 | break; executed 155 times by 5 tests: break; Executed by:
| 155 | ||||||||||||||||||||||||
1159 | - | |||||||||||||||||||||||||
1160 | case executed 1127 times by 1 test: PatternTerm::TypeAssertionWordBoundary:case PatternTerm::TypeAssertionWordBoundary: Executed by:
executed 1127 times by 1 test: case PatternTerm::TypeAssertionWordBoundary: Executed by:
| 1127 | ||||||||||||||||||||||||
1161 | generateAssertionWordBoundary(opIndex); | - | ||||||||||||||||||||||||
1162 | break; executed 1128 times by 1 test: break; Executed by:
| 1128 | ||||||||||||||||||||||||
1163 | - | |||||||||||||||||||||||||
1164 | case never executed: PatternTerm::TypeForwardReference:case PatternTerm::TypeForwardReference: never executed: case PatternTerm::TypeForwardReference: | 0 | ||||||||||||||||||||||||
1165 | break; never executed: break; | 0 | ||||||||||||||||||||||||
1166 | - | |||||||||||||||||||||||||
1167 | case never executed: PatternTerm::TypeParenthesesSubpattern:case PatternTerm::TypeParenthesesSubpattern: never executed: case PatternTerm::TypeParenthesesSubpattern: | 0 | ||||||||||||||||||||||||
1168 | case never executed: PatternTerm::TypeParentheticalAssertion:case PatternTerm::TypeParentheticalAssertion: never executed: case PatternTerm::TypeParentheticalAssertion: | 0 | ||||||||||||||||||||||||
1169 | do { qmlWTFReportAssertionFailure(__FILE__, 1298, __PRETTY_FUNCTION__, 0); (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap()); } while (0); | - | ||||||||||||||||||||||||
1170 | case never executed: PatternTerm::TypeBackReference:case PatternTerm::TypeBackReference: never executed: case PatternTerm::TypeBackReference: code before this statement never executed: case PatternTerm::TypeBackReference: | 0 | ||||||||||||||||||||||||
1171 | m_shouldFallBack = true; | - | ||||||||||||||||||||||||
1172 | break; never executed: break; | 0 | ||||||||||||||||||||||||
1173 | case executed 8 times by 1 test: PatternTerm::TypeDotStarEnclosure:case PatternTerm::TypeDotStarEnclosure: Executed by:
executed 8 times by 1 test: case PatternTerm::TypeDotStarEnclosure: Executed by:
| 8 | ||||||||||||||||||||||||
1174 | generateDotStarEnclosure(opIndex); | - | ||||||||||||||||||||||||
1175 | break; executed 8 times by 1 test: break; Executed by:
| 8 | ||||||||||||||||||||||||
1176 | } | - | ||||||||||||||||||||||||
1177 | } executed 2372545 times by 9 tests: end of block Executed by:
| 2372545 | ||||||||||||||||||||||||
1178 | void backtrackTerm(size_t opIndex) | - | ||||||||||||||||||||||||
1179 | { | - | ||||||||||||||||||||||||
1180 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
1181 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1182 | - | |||||||||||||||||||||||||
1183 | switch (term->type) { | - | ||||||||||||||||||||||||
1184 | case executed 2366700 times by 6 tests: PatternTerm::TypePatternCharacter:case PatternTerm::TypePatternCharacter: Executed by:
executed 2366700 times by 6 tests: case PatternTerm::TypePatternCharacter: Executed by:
| 2366700 | ||||||||||||||||||||||||
1185 | switch (term->quantityType) { | - | ||||||||||||||||||||||||
1186 | case executed 2367519 times by 6 tests: QuantifierFixedCount:case QuantifierFixedCount: Executed by:
executed 2367519 times by 6 tests: case QuantifierFixedCount: Executed by:
| 2367519 | ||||||||||||||||||||||||
1187 | if (term->quantityCount == 1
| 32-2368124 | ||||||||||||||||||||||||
1188 | backtrackPatternCharacterOnce(opIndex); executed 2367008 times by 6 tests: backtrackPatternCharacterOnce(opIndex); Executed by:
| 2367008 | ||||||||||||||||||||||||
1189 | else | - | ||||||||||||||||||||||||
1190 | backtrackPatternCharacterFixed(opIndex); executed 32 times by 2 tests: backtrackPatternCharacterFixed(opIndex); Executed by:
| 32 | ||||||||||||||||||||||||
1191 | break; executed 2368467 times by 6 tests: break; Executed by:
| 2368467 | ||||||||||||||||||||||||
1192 | case executed 242 times by 2 tests: QuantifierGreedy:case QuantifierGreedy: Executed by:
executed 242 times by 2 tests: case QuantifierGreedy: Executed by:
| 242 | ||||||||||||||||||||||||
1193 | backtrackPatternCharacterGreedy(opIndex); | - | ||||||||||||||||||||||||
1194 | break; executed 242 times by 2 tests: break; Executed by:
| 242 | ||||||||||||||||||||||||
1195 | case executed 2 times by 1 test: QuantifierNonGreedy:case QuantifierNonGreedy: Executed by:
executed 2 times by 1 test: case QuantifierNonGreedy: Executed by:
| 2 | ||||||||||||||||||||||||
1196 | backtrackPatternCharacterNonGreedy(opIndex); | - | ||||||||||||||||||||||||
1197 | break; executed 2 times by 1 test: break; Executed by:
| 2 | ||||||||||||||||||||||||
1198 | } | - | ||||||||||||||||||||||||
1199 | break; executed 2368773 times by 6 tests: break; Executed by:
| 2368773 | ||||||||||||||||||||||||
1200 | - | |||||||||||||||||||||||||
1201 | case executed 3739 times by 9 tests: PatternTerm::TypeCharacterClass:case PatternTerm::TypeCharacterClass: Executed by:
executed 3739 times by 9 tests: case PatternTerm::TypeCharacterClass: Executed by:
| 3739 | ||||||||||||||||||||||||
1202 | switch (term->quantityType) { | - | ||||||||||||||||||||||||
1203 | case executed 1780 times by 8 tests: QuantifierFixedCount:case QuantifierFixedCount: Executed by:
executed 1780 times by 8 tests: case QuantifierFixedCount: Executed by:
| 1780 | ||||||||||||||||||||||||
1204 | if (term->quantityCount == 1
| 293-1491 | ||||||||||||||||||||||||
1205 | backtrackCharacterClassOnce(opIndex); executed 1491 times by 8 tests: backtrackCharacterClassOnce(opIndex); Executed by:
| 1491 | ||||||||||||||||||||||||
1206 | else | - | ||||||||||||||||||||||||
1207 | backtrackCharacterClassFixed(opIndex); executed 292 times by 2 tests: backtrackCharacterClassFixed(opIndex); Executed by:
| 292 | ||||||||||||||||||||||||
1208 | break; executed 1782 times by 8 tests: break; Executed by:
| 1782 | ||||||||||||||||||||||||
1209 | case executed 1925 times by 8 tests: QuantifierGreedy:case QuantifierGreedy: Executed by:
executed 1925 times by 8 tests: case QuantifierGreedy: Executed by:
| 1925 | ||||||||||||||||||||||||
1210 | backtrackCharacterClassGreedy(opIndex); | - | ||||||||||||||||||||||||
1211 | break; executed 1928 times by 8 tests: break; Executed by:
| 1928 | ||||||||||||||||||||||||
1212 | case executed 32 times by 2 tests: QuantifierNonGreedy:case QuantifierNonGreedy: Executed by:
executed 32 times by 2 tests: case QuantifierNonGreedy: Executed by:
| 32 | ||||||||||||||||||||||||
1213 | backtrackCharacterClassNonGreedy(opIndex); | - | ||||||||||||||||||||||||
1214 | break; executed 32 times by 2 tests: break; Executed by:
| 32 | ||||||||||||||||||||||||
1215 | } | - | ||||||||||||||||||||||||
1216 | break; executed 3739 times by 9 tests: break; Executed by:
| 3739 | ||||||||||||||||||||||||
1217 | - | |||||||||||||||||||||||||
1218 | case executed 154 times by 5 tests: PatternTerm::TypeAssertionBOL:case PatternTerm::TypeAssertionBOL: Executed by:
executed 154 times by 5 tests: case PatternTerm::TypeAssertionBOL: Executed by:
| 154 | ||||||||||||||||||||||||
1219 | backtrackAssertionBOL(opIndex); | - | ||||||||||||||||||||||||
1220 | break; executed 154 times by 5 tests: break; Executed by:
| 154 | ||||||||||||||||||||||||
1221 | - | |||||||||||||||||||||||||
1222 | case executed 154 times by 5 tests: PatternTerm::TypeAssertionEOL:case PatternTerm::TypeAssertionEOL: Executed by:
executed 154 times by 5 tests: case PatternTerm::TypeAssertionEOL: Executed by:
| 154 | ||||||||||||||||||||||||
1223 | backtrackAssertionEOL(opIndex); | - | ||||||||||||||||||||||||
1224 | break; executed 155 times by 5 tests: break; Executed by:
| 155 | ||||||||||||||||||||||||
1225 | - | |||||||||||||||||||||||||
1226 | case executed 1128 times by 1 test: PatternTerm::TypeAssertionWordBoundary:case PatternTerm::TypeAssertionWordBoundary: Executed by:
executed 1128 times by 1 test: case PatternTerm::TypeAssertionWordBoundary: Executed by:
| 1128 | ||||||||||||||||||||||||
1227 | backtrackAssertionWordBoundary(opIndex); | - | ||||||||||||||||||||||||
1228 | break; executed 1127 times by 1 test: break; Executed by:
| 1127 | ||||||||||||||||||||||||
1229 | - | |||||||||||||||||||||||||
1230 | case never executed: PatternTerm::TypeForwardReference:case PatternTerm::TypeForwardReference: never executed: case PatternTerm::TypeForwardReference: | 0 | ||||||||||||||||||||||||
1231 | break; never executed: break; | 0 | ||||||||||||||||||||||||
1232 | - | |||||||||||||||||||||||||
1233 | case never executed: PatternTerm::TypeParenthesesSubpattern:case PatternTerm::TypeParenthesesSubpattern: never executed: case PatternTerm::TypeParenthesesSubpattern: | 0 | ||||||||||||||||||||||||
1234 | case never executed: PatternTerm::TypeParentheticalAssertion:case PatternTerm::TypeParentheticalAssertion: never executed: case PatternTerm::TypeParentheticalAssertion: | 0 | ||||||||||||||||||||||||
1235 | do { qmlWTFReportAssertionFailure(__FILE__, 1364, __PRETTY_FUNCTION__, 0); (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap()); } while (0); | - | ||||||||||||||||||||||||
1236 | - | |||||||||||||||||||||||||
1237 | case executed 8 times by 1 test: case PatternTerm::TypeDotStarEnclosure: Executed by:
code before this statement never executed: case PatternTerm::TypeDotStarEnclosure: executed 8 times by 1 test: PatternTerm::TypeDotStarEnclosure:case PatternTerm::TypeDotStarEnclosure: Executed by:
code before this statement never executed: case PatternTerm::TypeDotStarEnclosure: executed 8 times by 1 test: case PatternTerm::TypeDotStarEnclosure: Executed by:
| 0-8 | ||||||||||||||||||||||||
1238 | backtrackDotStarEnclosure(opIndex); | - | ||||||||||||||||||||||||
1239 | break; executed 8 times by 1 test: break; Executed by:
| 8 | ||||||||||||||||||||||||
1240 | - | |||||||||||||||||||||||||
1241 | case never executed: PatternTerm::TypeBackReference:case PatternTerm::TypeBackReference: never executed: case PatternTerm::TypeBackReference: | 0 | ||||||||||||||||||||||||
1242 | m_shouldFallBack = true; | - | ||||||||||||||||||||||||
1243 | break; never executed: break; | 0 | ||||||||||||||||||||||||
1244 | } | - | ||||||||||||||||||||||||
1245 | } executed 2373956 times by 9 tests: end of block Executed by:
| 2373956 | ||||||||||||||||||||||||
1246 | - | |||||||||||||||||||||||||
1247 | void generate() | - | ||||||||||||||||||||||||
1248 | { | - | ||||||||||||||||||||||||
1249 | - | |||||||||||||||||||||||||
1250 | (!(m_ops.size()) ? (qmlWTFReportAssertionFailure(__FILE__, 1379, __PRETTY_FUNCTION__, "m_ops.size()"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1251 | size_t opIndex = 0; | - | ||||||||||||||||||||||||
1252 | - | |||||||||||||||||||||||||
1253 | do { | - | ||||||||||||||||||||||||
1254 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
1255 | switch (op.m_op) { | - | ||||||||||||||||||||||||
1256 | - | |||||||||||||||||||||||||
1257 | case executed 2372202 times by 9 tests: OpTerm:case OpTerm: Executed by:
executed 2372202 times by 9 tests: case OpTerm: Executed by:
| 2372202 | ||||||||||||||||||||||||
1258 | generateTerm(opIndex); | - | ||||||||||||||||||||||||
1259 | break; executed 2372874 times by 9 tests: break; Executed by:
| 2372874 | ||||||||||||||||||||||||
1260 | case executed 1148705 times by 153 tests: OpBodyAlternativeBegin:case OpBodyAlternativeBegin: Executed by:
executed 1148705 times by 153 tests: {case OpBodyAlternativeBegin: Executed by:
| 1148705 | ||||||||||||||||||||||||
1261 | PatternAlternative* alternative = op.m_alternative; | - | ||||||||||||||||||||||||
1262 | - | |||||||||||||||||||||||||
1263 | - | |||||||||||||||||||||||||
1264 | - | |||||||||||||||||||||||||
1265 | op.m_jumps.append(jumpIfNoAvailableInput(alternative->m_minimumSize)); | - | ||||||||||||||||||||||||
1266 | - | |||||||||||||||||||||||||
1267 | - | |||||||||||||||||||||||||
1268 | op.m_reentry = label(); | - | ||||||||||||||||||||||||
1269 | - | |||||||||||||||||||||||||
1270 | m_checked += alternative->m_minimumSize; | - | ||||||||||||||||||||||||
1271 | break; executed 1148003 times by 153 tests: break; Executed by:
| 1148003 | ||||||||||||||||||||||||
1272 | } | - | ||||||||||||||||||||||||
1273 | case executed 206 times by 2 tests: OpBodyAlternativeNext:case OpBodyAlternativeNext: Executed by:
executed 206 times by 2 tests: case OpBodyAlternativeNext: Executed by:
| 206 | ||||||||||||||||||||||||
1274 | case executed 1149995 times by 153 tests: OpBodyAlternativeEnd:case OpBodyAlternativeEnd: Executed by:
executed 1149995 times by 153 tests: {case OpBodyAlternativeEnd: Executed by:
| 1149995 | ||||||||||||||||||||||||
1275 | PatternAlternative* priorAlternative = m_ops[op.m_previousOp].m_alternative; | - | ||||||||||||||||||||||||
1276 | PatternAlternative* alternative = op.m_alternative; | - | ||||||||||||||||||||||||
1277 | - | |||||||||||||||||||||||||
1278 | - | |||||||||||||||||||||||||
1279 | - | |||||||||||||||||||||||||
1280 | - | |||||||||||||||||||||||||
1281 | removeCallFrame(); | - | ||||||||||||||||||||||||
1282 | - | |||||||||||||||||||||||||
1283 | - | |||||||||||||||||||||||||
1284 | - | |||||||||||||||||||||||||
1285 | - | |||||||||||||||||||||||||
1286 | (!(index != returnRegister) ? (qmlWTFReportAssertionFailure(__FILE__, 1438, __PRETTY_FUNCTION__, "index != returnRegister"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1287 | if (m_pattern.m_body->m_hasFixedSize
| 1187-1148949 | ||||||||||||||||||||||||
1288 | move(index, returnRegister); | - | ||||||||||||||||||||||||
1289 | if (priorAlternative->m_minimumSize
| 97985-1050741 | ||||||||||||||||||||||||
1290 | sub32(Imm32(priorAlternative->m_minimumSize), returnRegister); executed 1050772 times by 6 tests: sub32(Imm32(priorAlternative->m_minimumSize), returnRegister); Executed by:
| 1050772 | ||||||||||||||||||||||||
1291 | if (compileMode == IncludeSubpatterns
| 0-1148591 | ||||||||||||||||||||||||
1292 | store32(returnRegister, output); executed 1148546 times by 153 tests: store32(returnRegister, output); Executed by:
| 1148546 | ||||||||||||||||||||||||
1293 | } executed 1149696 times by 153 tests: elseend of block Executed by:
| 1149696 | ||||||||||||||||||||||||
1294 | getMatchStart(returnRegister); executed 1188 times by 8 tests: getMatchStart(returnRegister); Executed by:
| 1188 | ||||||||||||||||||||||||
1295 | if (compileMode == IncludeSubpatterns
| 0-1150881 | ||||||||||||||||||||||||
1296 | store32(index, Address(output, 4)); executed 1150981 times by 153 tests: store32(index, Address(output, 4)); Executed by:
| 1150981 | ||||||||||||||||||||||||
1297 | move(index, returnRegister2); | - | ||||||||||||||||||||||||
1298 | - | |||||||||||||||||||||||||
1299 | generateReturn(); | - | ||||||||||||||||||||||||
1300 | - | |||||||||||||||||||||||||
1301 | - | |||||||||||||||||||||||||
1302 | - | |||||||||||||||||||||||||
1303 | - | |||||||||||||||||||||||||
1304 | if (op.m_op == OpBodyAlternativeNext
| 205-1150967 | ||||||||||||||||||||||||
1305 | - | |||||||||||||||||||||||||
1306 | - | |||||||||||||||||||||||||
1307 | - | |||||||||||||||||||||||||
1308 | - | |||||||||||||||||||||||||
1309 | op.m_reentry = label(); | - | ||||||||||||||||||||||||
1310 | if (alternative->m_minimumSize > priorAlternative->m_minimumSize
| 68-137 | ||||||||||||||||||||||||
1311 | add32(Imm32(alternative->m_minimumSize - priorAlternative->m_minimumSize), index); | - | ||||||||||||||||||||||||
1312 | op.m_jumps.append(jumpIfNoAvailableInput()); | - | ||||||||||||||||||||||||
1313 | } executed 68 times by 1 test: else if (priorAlternative->m_minimumSize > alternative->m_minimumSizeend of block Executed by:
| 20-118 | ||||||||||||||||||||||||
1314 | sub32(Imm32(priorAlternative->m_minimumSize - alternative->m_minimumSize), index); executed 20 times by 1 test: sub32(Imm32(priorAlternative->m_minimumSize - alternative->m_minimumSize), index); Executed by:
| 20 | ||||||||||||||||||||||||
1315 | } executed 206 times by 2 tests: else if (op.m_nextOp == notFoundend of block Executed by:
| 98-1150257 | ||||||||||||||||||||||||
1316 | - | |||||||||||||||||||||||||
1317 | - | |||||||||||||||||||||||||
1318 | op.m_reentry = label(); | - | ||||||||||||||||||||||||
1319 | sub32(Imm32(priorAlternative->m_minimumSize), index); | - | ||||||||||||||||||||||||
1320 | } executed 98 times by 5 tests: end of block Executed by:
| 98 | ||||||||||||||||||||||||
1321 | - | |||||||||||||||||||||||||
1322 | if (op.m_op == OpBodyAlternativeNext
| 205-1150700 | ||||||||||||||||||||||||
1323 | m_checked += alternative->m_minimumSize; executed 206 times by 2 tests: m_checked += alternative->m_minimumSize; Executed by:
| 206 | ||||||||||||||||||||||||
1324 | m_checked -= priorAlternative->m_minimumSize; | - | ||||||||||||||||||||||||
1325 | break; executed 1150138 times by 153 tests: break; Executed by:
| 1150138 | ||||||||||||||||||||||||
1326 | } | - | ||||||||||||||||||||||||
1327 | case executed 2344 times by 3 tests: OpSimpleNestedAlternativeBegin:case OpSimpleNestedAlternativeBegin: Executed by:
executed 2344 times by 3 tests: case OpSimpleNestedAlternativeBegin: Executed by:
| 2344 | ||||||||||||||||||||||||
1328 | case executed 165 times by 3 tests: OpNestedAlternativeBegin:case OpNestedAlternativeBegin: Executed by:
executed 165 times by 3 tests: {case OpNestedAlternativeBegin: Executed by:
| 165 | ||||||||||||||||||||||||
1329 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1330 | PatternAlternative* alternative = op.m_alternative; | - | ||||||||||||||||||||||||
1331 | PatternDisjunction* disjunction = term->parentheses.disjunction; | - | ||||||||||||||||||||||||
1332 | - | |||||||||||||||||||||||||
1333 | - | |||||||||||||||||||||||||
1334 | op.m_checkAdjust = alternative->m_minimumSize; | - | ||||||||||||||||||||||||
1335 | if ((
| 68-2363 | ||||||||||||||||||||||||
1336 | op.m_checkAdjust -= disjunction->m_minimumSize; executed 2296 times by 3 tests: op.m_checkAdjust -= disjunction->m_minimumSize; Executed by:
| 2296 | ||||||||||||||||||||||||
1337 | if (op.m_checkAdjust
| 228-2278 | ||||||||||||||||||||||||
1338 | op.m_jumps.append(jumpIfNoAvailableInput(op.m_checkAdjust)); executed 228 times by 3 tests: op.m_jumps.append(jumpIfNoAvailableInput(op.m_checkAdjust)); Executed by:
| 228 | ||||||||||||||||||||||||
1339 | - | |||||||||||||||||||||||||
1340 | m_checked += op.m_checkAdjust; | - | ||||||||||||||||||||||||
1341 | break; executed 2508 times by 3 tests: break; Executed by:
| 2508 | ||||||||||||||||||||||||
1342 | } | - | ||||||||||||||||||||||||
1343 | case executed 36 times by 1 test: OpSimpleNestedAlternativeNext:case OpSimpleNestedAlternativeNext: Executed by:
executed 36 times by 1 test: case OpSimpleNestedAlternativeNext: Executed by:
| 36 | ||||||||||||||||||||||||
1344 | case executed 343 times by 3 tests: OpNestedAlternativeNext:case OpNestedAlternativeNext: Executed by:
executed 343 times by 3 tests: {case OpNestedAlternativeNext: Executed by:
| 343 | ||||||||||||||||||||||||
1345 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1346 | PatternAlternative* alternative = op.m_alternative; | - | ||||||||||||||||||||||||
1347 | PatternDisjunction* disjunction = term->parentheses.disjunction; | - | ||||||||||||||||||||||||
1348 | - | |||||||||||||||||||||||||
1349 | - | |||||||||||||||||||||||||
1350 | if (op.m_op == OpNestedAlternativeNext
| 36-345 | ||||||||||||||||||||||||
1351 | unsigned parenthesesFrameLocation = term->frameLocation; | - | ||||||||||||||||||||||||
1352 | unsigned alternativeFrameLocation = parenthesesFrameLocation; | - | ||||||||||||||||||||||||
1353 | if (term->quantityType != QuantifierFixedCount
| 0-342 | ||||||||||||||||||||||||
1354 | alternativeFrameLocation += 1; never executed: alternativeFrameLocation += 1; | 0 | ||||||||||||||||||||||||
1355 | op.m_returnAddress = storeToFrameWithPatch(alternativeFrameLocation); | - | ||||||||||||||||||||||||
1356 | } executed 344 times by 3 tests: end of block Executed by:
| 344 | ||||||||||||||||||||||||
1357 | - | |||||||||||||||||||||||||
1358 | if (term->quantityType != QuantifierFixedCount
| 0-368 | ||||||||||||||||||||||||
1359 | - | |||||||||||||||||||||||||
1360 | - | |||||||||||||||||||||||||
1361 | op.m_zeroLengthMatch = branch32(Equal, index, Address(stackPointerRegister, term->frameLocation * sizeof(void*))); | - | ||||||||||||||||||||||||
1362 | } never executed: end of block | 0 | ||||||||||||||||||||||||
1363 | YarrOp* endOp = &m_ops[op.m_nextOp]; | - | ||||||||||||||||||||||||
1364 | while (endOp->m_nextOp != notFound
| 380-840 | ||||||||||||||||||||||||
1365 | (!(endOp->m_op == OpSimpleNestedAlternativeNext || endOp->m_op == OpNestedAlternativeNext) ? (qmlWTFReportAssertionFailure(__FILE__, 1543, __PRETTY_FUNCTION__, "endOp->m_op == OpSimpleNestedAlternativeNext || endOp->m_op == OpNestedAlternativeNext"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1366 | endOp = &m_ops[endOp->m_nextOp]; | - | ||||||||||||||||||||||||
1367 | } executed 840 times by 1 test: end of block Executed by:
| 840 | ||||||||||||||||||||||||
1368 | (!(endOp->m_op == OpSimpleNestedAlternativeEnd || endOp->m_op == OpNestedAlternativeEnd) ? (qmlWTFReportAssertionFailure(__FILE__, 1546, __PRETTY_FUNCTION__, "endOp->m_op == OpSimpleNestedAlternativeEnd || endOp->m_op == OpNestedAlternativeEnd"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1369 | endOp->m_jumps.append(jump()); | - | ||||||||||||||||||||||||
1370 | - | |||||||||||||||||||||||||
1371 | - | |||||||||||||||||||||||||
1372 | op.m_reentry = label(); | - | ||||||||||||||||||||||||
1373 | - | |||||||||||||||||||||||||
1374 | - | |||||||||||||||||||||||||
1375 | op.m_checkAdjust = alternative->m_minimumSize; | - | ||||||||||||||||||||||||
1376 | if ((
| 12-369 | ||||||||||||||||||||||||
1377 | op.m_checkAdjust -= disjunction->m_minimumSize; executed 345 times by 3 tests: op.m_checkAdjust -= disjunction->m_minimumSize; Executed by:
| 345 | ||||||||||||||||||||||||
1378 | if (op.m_checkAdjust
| 64-317 | ||||||||||||||||||||||||
1379 | op.m_jumps.append(jumpIfNoAvailableInput(op.m_checkAdjust)); executed 64 times by 1 test: op.m_jumps.append(jumpIfNoAvailableInput(op.m_checkAdjust)); Executed by:
| 64 | ||||||||||||||||||||||||
1380 | - | |||||||||||||||||||||||||
1381 | YarrOp& lastOp = m_ops[op.m_previousOp]; | - | ||||||||||||||||||||||||
1382 | m_checked -= lastOp.m_checkAdjust; | - | ||||||||||||||||||||||||
1383 | m_checked += op.m_checkAdjust; | - | ||||||||||||||||||||||||
1384 | break; executed 381 times by 3 tests: break; Executed by:
| 381 | ||||||||||||||||||||||||
1385 | } | - | ||||||||||||||||||||||||
1386 | case executed 2344 times by 3 tests: OpSimpleNestedAlternativeEnd:case OpSimpleNestedAlternativeEnd: Executed by:
executed 2344 times by 3 tests: case OpSimpleNestedAlternativeEnd: Executed by:
| 2344 | ||||||||||||||||||||||||
1387 | case executed 166 times by 3 tests: OpNestedAlternativeEnd:case OpNestedAlternativeEnd: Executed by:
executed 166 times by 3 tests: {case OpNestedAlternativeEnd: Executed by:
| 166 | ||||||||||||||||||||||||
1388 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1389 | - | |||||||||||||||||||||||||
1390 | - | |||||||||||||||||||||||||
1391 | if (op.m_op == OpNestedAlternativeEnd
| 166-2343 | ||||||||||||||||||||||||
1392 | unsigned parenthesesFrameLocation = term->frameLocation; | - | ||||||||||||||||||||||||
1393 | unsigned alternativeFrameLocation = parenthesesFrameLocation; | - | ||||||||||||||||||||||||
1394 | if (term->quantityType != QuantifierFixedCount
| 0-165 | ||||||||||||||||||||||||
1395 | alternativeFrameLocation += 1; never executed: alternativeFrameLocation += 1; | 0 | ||||||||||||||||||||||||
1396 | op.m_returnAddress = storeToFrameWithPatch(alternativeFrameLocation); | - | ||||||||||||||||||||||||
1397 | } executed 164 times by 3 tests: end of block Executed by:
| 164 | ||||||||||||||||||||||||
1398 | - | |||||||||||||||||||||||||
1399 | if (term->quantityType != QuantifierFixedCount
| 0-2365 | ||||||||||||||||||||||||
1400 | - | |||||||||||||||||||||||||
1401 | - | |||||||||||||||||||||||||
1402 | op.m_zeroLengthMatch = branch32(Equal, index, Address(stackPointerRegister, term->frameLocation * sizeof(void*))); | - | ||||||||||||||||||||||||
1403 | } never executed: end of block | 0 | ||||||||||||||||||||||||
1404 | - | |||||||||||||||||||||||||
1405 | - | |||||||||||||||||||||||||
1406 | - | |||||||||||||||||||||||||
1407 | - | |||||||||||||||||||||||||
1408 | op.m_jumps.link(this); | - | ||||||||||||||||||||||||
1409 | op.m_jumps.clear(); | - | ||||||||||||||||||||||||
1410 | - | |||||||||||||||||||||||||
1411 | YarrOp& lastOp = m_ops[op.m_previousOp]; | - | ||||||||||||||||||||||||
1412 | m_checked -= lastOp.m_checkAdjust; | - | ||||||||||||||||||||||||
1413 | break; executed 2508 times by 3 tests: break; Executed by:
| 2508 | ||||||||||||||||||||||||
1414 | } | - | ||||||||||||||||||||||||
1415 | - | |||||||||||||||||||||||||
1416 | - | |||||||||||||||||||||||||
1417 | - | |||||||||||||||||||||||||
1418 | - | |||||||||||||||||||||||||
1419 | - | |||||||||||||||||||||||||
1420 | case executed 2425 times by 3 tests: OpParenthesesSubpatternOnceBegin:case OpParenthesesSubpatternOnceBegin: Executed by:
executed 2425 times by 3 tests: {case OpParenthesesSubpatternOnceBegin: Executed by:
| 2425 | ||||||||||||||||||||||||
1421 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1422 | unsigned parenthesesFrameLocation = term->frameLocation; | - | ||||||||||||||||||||||||
1423 | const RegisterID indexTemporary = regT0; | - | ||||||||||||||||||||||||
1424 | (!(term->quantityCount == 1) ? (qmlWTFReportAssertionFailure(__FILE__, 1602, __PRETTY_FUNCTION__, "term->quantityCount == 1"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1425 | if (term->quantityType == QuantifierGreedy
| 130-2296 | ||||||||||||||||||||||||
1426 | storeToFrame(index, parenthesesFrameLocation); executed 130 times by 2 tests: storeToFrame(index, parenthesesFrameLocation); Executed by:
| 130 | ||||||||||||||||||||||||
1427 | else if (term->quantityType == QuantifierNonGreedy
| 0-2296 | ||||||||||||||||||||||||
1428 | storeToFrame(TrustedImm32(-1), parenthesesFrameLocation); | - | ||||||||||||||||||||||||
1429 | op.m_jumps.append(jump()); | - | ||||||||||||||||||||||||
1430 | op.m_reentry = label(); | - | ||||||||||||||||||||||||
1431 | storeToFrame(index, parenthesesFrameLocation); | - | ||||||||||||||||||||||||
1432 | } never executed: end of block | 0 | ||||||||||||||||||||||||
1433 | - | |||||||||||||||||||||||||
1434 | - | |||||||||||||||||||||||||
1435 | - | |||||||||||||||||||||||||
1436 | - | |||||||||||||||||||||||||
1437 | - | |||||||||||||||||||||||||
1438 | - | |||||||||||||||||||||||||
1439 | - | |||||||||||||||||||||||||
1440 | if (term->capture()
| 0-1475 | ||||||||||||||||||||||||
1441 | int inputOffset = term->inputPosition - m_checked; | - | ||||||||||||||||||||||||
1442 | if (term->quantityType == QuantifierFixedCount
| 130-1345 | ||||||||||||||||||||||||
1443 | inputOffset -= term->parentheses.disjunction->m_minimumSize; executed 1344 times by 3 tests: inputOffset -= term->parentheses.disjunction->m_minimumSize; Executed by:
| 1344 | ||||||||||||||||||||||||
1444 | if (inputOffset
| 108-1367 | ||||||||||||||||||||||||
1445 | move(index, indexTemporary); | - | ||||||||||||||||||||||||
1446 | add32(Imm32(inputOffset), indexTemporary); | - | ||||||||||||||||||||||||
1447 | setSubpatternStart(indexTemporary, term->parentheses.subpatternId); | - | ||||||||||||||||||||||||
1448 | } executed 1370 times by 3 tests: elseend of block Executed by:
| 1370 | ||||||||||||||||||||||||
1449 | setSubpatternStart(index, term->parentheses.subpatternId); executed 108 times by 3 tests: setSubpatternStart(index, term->parentheses.subpatternId); Executed by:
| 108 | ||||||||||||||||||||||||
1450 | } | - | ||||||||||||||||||||||||
1451 | break; executed 2427 times by 3 tests: break; Executed by:
| 2427 | ||||||||||||||||||||||||
1452 | } | - | ||||||||||||||||||||||||
1453 | case executed 2428 times by 3 tests: OpParenthesesSubpatternOnceEnd:case OpParenthesesSubpatternOnceEnd: Executed by:
executed 2428 times by 3 tests: {case OpParenthesesSubpatternOnceEnd: Executed by:
| 2428 | ||||||||||||||||||||||||
1454 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1455 | const RegisterID indexTemporary = regT0; | - | ||||||||||||||||||||||||
1456 | (!(term->quantityCount == 1) ? (qmlWTFReportAssertionFailure(__FILE__, 1649, __PRETTY_FUNCTION__, "term->quantityCount == 1"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1457 | - | |||||||||||||||||||||||||
1458 | - | |||||||||||||||||||||||||
1459 | - | |||||||||||||||||||||||||
1460 | - | |||||||||||||||||||||||||
1461 | if (term->quantityType != QuantifierFixedCount
| 0-2297 | ||||||||||||||||||||||||
1462 | Jump pastBreakpoint; | - | ||||||||||||||||||||||||
1463 | pastBreakpoint = branch32(NotEqual, index, Address(stackPointerRegister, term->frameLocation * sizeof(void*))); | - | ||||||||||||||||||||||||
1464 | breakpoint(); | - | ||||||||||||||||||||||||
1465 | pastBreakpoint.link(this); | - | ||||||||||||||||||||||||
1466 | } never executed: end of block | 0 | ||||||||||||||||||||||||
1467 | if (term->capture()
| 0-1478 | ||||||||||||||||||||||||
1468 | int inputOffset = term->inputPosition - m_checked; | - | ||||||||||||||||||||||||
1469 | if (inputOffset
| 266-1212 | ||||||||||||||||||||||||
1470 | move(index, indexTemporary); | - | ||||||||||||||||||||||||
1471 | add32(Imm32(inputOffset), indexTemporary); | - | ||||||||||||||||||||||||
1472 | setSubpatternEnd(indexTemporary, term->parentheses.subpatternId); | - | ||||||||||||||||||||||||
1473 | } executed 266 times by 2 tests: elseend of block Executed by:
| 266 | ||||||||||||||||||||||||
1474 | setSubpatternEnd(index, term->parentheses.subpatternId); executed 1212 times by 3 tests: setSubpatternEnd(index, term->parentheses.subpatternId); Executed by:
| 1212 | ||||||||||||||||||||||||
1475 | } | - | ||||||||||||||||||||||||
1476 | - | |||||||||||||||||||||||||
1477 | - | |||||||||||||||||||||||||
1478 | - | |||||||||||||||||||||||||
1479 | - | |||||||||||||||||||||||||
1480 | if (term->quantityType == QuantifierGreedy
| 130-2298 | ||||||||||||||||||||||||
1481 | op.m_reentry = label(); executed 130 times by 2 tests: op.m_reentry = label(); Executed by:
| 130 | ||||||||||||||||||||||||
1482 | else if (term->quantityType == QuantifierNonGreedy
| 0-2296 | ||||||||||||||||||||||||
1483 | YarrOp& beginOp = m_ops[op.m_previousOp]; | - | ||||||||||||||||||||||||
1484 | beginOp.m_jumps.link(this); | - | ||||||||||||||||||||||||
1485 | } never executed: end of block | 0 | ||||||||||||||||||||||||
1486 | break; executed 2425 times by 3 tests: break; Executed by:
| 2425 | ||||||||||||||||||||||||
1487 | } | - | ||||||||||||||||||||||||
1488 | - | |||||||||||||||||||||||||
1489 | - | |||||||||||||||||||||||||
1490 | case executed 12 times by 1 test: OpParenthesesSubpatternTerminalBegin:case OpParenthesesSubpatternTerminalBegin: Executed by:
executed 12 times by 1 test: {case OpParenthesesSubpatternTerminalBegin: Executed by:
| 12 | ||||||||||||||||||||||||
1491 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1492 | (!(term->quantityType == QuantifierGreedy) ? (qmlWTFReportAssertionFailure(__FILE__, 1693, __PRETTY_FUNCTION__, "term->quantityType == QuantifierGreedy"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1493 | (!(term->quantityCount == quantifyInfinite) ? (qmlWTFReportAssertionFailure(__FILE__, 1694, __PRETTY_FUNCTION__, "term->quantityCount == quantifyInfinite"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1494 | (!(!term->capture()) ? (qmlWTFReportAssertionFailure(__FILE__, 1695, __PRETTY_FUNCTION__, "!term->capture()"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1495 | - | |||||||||||||||||||||||||
1496 | - | |||||||||||||||||||||||||
1497 | op.m_reentry = label(); | - | ||||||||||||||||||||||||
1498 | - | |||||||||||||||||||||||||
1499 | - | |||||||||||||||||||||||||
1500 | - | |||||||||||||||||||||||||
1501 | storeToFrame(index, term->frameLocation); | - | ||||||||||||||||||||||||
1502 | break; executed 11 times by 1 test: break; Executed by:
| 11 | ||||||||||||||||||||||||
1503 | } | - | ||||||||||||||||||||||||
1504 | case executed 12 times by 1 test: OpParenthesesSubpatternTerminalEnd:case OpParenthesesSubpatternTerminalEnd: Executed by:
executed 12 times by 1 test: {case OpParenthesesSubpatternTerminalEnd: Executed by:
| 12 | ||||||||||||||||||||||||
1505 | YarrOp& beginOp = m_ops[op.m_previousOp]; | - | ||||||||||||||||||||||||
1506 | - | |||||||||||||||||||||||||
1507 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1508 | - | |||||||||||||||||||||||||
1509 | - | |||||||||||||||||||||||||
1510 | - | |||||||||||||||||||||||||
1511 | Jump pastBreakpoint; | - | ||||||||||||||||||||||||
1512 | pastBreakpoint = branch32(NotEqual, index, Address(stackPointerRegister, term->frameLocation * sizeof(void*))); | - | ||||||||||||||||||||||||
1513 | breakpoint(); | - | ||||||||||||||||||||||||
1514 | pastBreakpoint.link(this); | - | ||||||||||||||||||||||||
1515 | - | |||||||||||||||||||||||||
1516 | - | |||||||||||||||||||||||||
1517 | - | |||||||||||||||||||||||||
1518 | - | |||||||||||||||||||||||||
1519 | jump(beginOp.m_reentry); | - | ||||||||||||||||||||||||
1520 | - | |||||||||||||||||||||||||
1521 | - | |||||||||||||||||||||||||
1522 | - | |||||||||||||||||||||||||
1523 | op.m_reentry = label(); | - | ||||||||||||||||||||||||
1524 | break; executed 12 times by 1 test: break; Executed by:
| 12 | ||||||||||||||||||||||||
1525 | } | - | ||||||||||||||||||||||||
1526 | - | |||||||||||||||||||||||||
1527 | - | |||||||||||||||||||||||||
1528 | case executed 68 times by 1 test: OpParentheticalAssertionBegin:case OpParentheticalAssertionBegin: Executed by:
executed 68 times by 1 test: {case OpParentheticalAssertionBegin: Executed by:
| 68 | ||||||||||||||||||||||||
1529 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1530 | - | |||||||||||||||||||||||||
1531 | - | |||||||||||||||||||||||||
1532 | - | |||||||||||||||||||||||||
1533 | unsigned parenthesesFrameLocation = term->frameLocation; | - | ||||||||||||||||||||||||
1534 | storeToFrame(index, parenthesesFrameLocation); | - | ||||||||||||||||||||||||
1535 | - | |||||||||||||||||||||||||
1536 | - | |||||||||||||||||||||||||
1537 | op.m_checkAdjust = m_checked - term->inputPosition; | - | ||||||||||||||||||||||||
1538 | if (op.m_checkAdjust
| 16-52 | ||||||||||||||||||||||||
1539 | sub32(Imm32(op.m_checkAdjust), index); executed 16 times by 1 test: sub32(Imm32(op.m_checkAdjust), index); Executed by:
| 16 | ||||||||||||||||||||||||
1540 | - | |||||||||||||||||||||||||
1541 | m_checked -= op.m_checkAdjust; | - | ||||||||||||||||||||||||
1542 | break; executed 68 times by 1 test: break; Executed by:
| 68 | ||||||||||||||||||||||||
1543 | } | - | ||||||||||||||||||||||||
1544 | case executed 68 times by 1 test: OpParentheticalAssertionEnd:case OpParentheticalAssertionEnd: Executed by:
executed 68 times by 1 test: {case OpParentheticalAssertionEnd: Executed by:
| 68 | ||||||||||||||||||||||||
1545 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1546 | - | |||||||||||||||||||||||||
1547 | - | |||||||||||||||||||||||||
1548 | unsigned parenthesesFrameLocation = term->frameLocation; | - | ||||||||||||||||||||||||
1549 | loadFromFrame(parenthesesFrameLocation, index); | - | ||||||||||||||||||||||||
1550 | - | |||||||||||||||||||||||||
1551 | - | |||||||||||||||||||||||||
1552 | - | |||||||||||||||||||||||||
1553 | if (term->invert()
| 28-40 | ||||||||||||||||||||||||
1554 | op.m_jumps.append(jump()); | - | ||||||||||||||||||||||||
1555 | op.m_reentry = label(); | - | ||||||||||||||||||||||||
1556 | } executed 40 times by 1 test: end of block Executed by:
| 40 | ||||||||||||||||||||||||
1557 | - | |||||||||||||||||||||||||
1558 | YarrOp& lastOp = m_ops[op.m_previousOp]; | - | ||||||||||||||||||||||||
1559 | m_checked += lastOp.m_checkAdjust; | - | ||||||||||||||||||||||||
1560 | break; executed 68 times by 1 test: break; Executed by:
| 68 | ||||||||||||||||||||||||
1561 | } | - | ||||||||||||||||||||||||
1562 | - | |||||||||||||||||||||||||
1563 | case executed 92 times by 4 tests: OpMatchFailed:case OpMatchFailed: Executed by:
executed 92 times by 4 tests: case OpMatchFailed: Executed by:
| 92 | ||||||||||||||||||||||||
1564 | removeCallFrame(); | - | ||||||||||||||||||||||||
1565 | move(TrustedImmPtr((void*)WTF::notFound), returnRegister); | - | ||||||||||||||||||||||||
1566 | move(TrustedImm32(0), returnRegister2); | - | ||||||||||||||||||||||||
1567 | generateReturn(); | - | ||||||||||||||||||||||||
1568 | break; executed 92 times by 4 tests: break; Executed by:
| 92 | ||||||||||||||||||||||||
1569 | } | - | ||||||||||||||||||||||||
1570 | - | |||||||||||||||||||||||||
1571 | ++opIndex; | - | ||||||||||||||||||||||||
1572 | } executed 4680815 times by 153 tests: while (opIndex < m_ops.size()end of block Executed by:
| 1150127-4680815 | ||||||||||||||||||||||||
1573 | } executed 1150025 times by 153 tests: end of block Executed by:
| 1150025 | ||||||||||||||||||||||||
1574 | - | |||||||||||||||||||||||||
1575 | void backtrack() | - | ||||||||||||||||||||||||
1576 | { | - | ||||||||||||||||||||||||
1577 | - | |||||||||||||||||||||||||
1578 | size_t opIndex = m_ops.size(); | - | ||||||||||||||||||||||||
1579 | (!(opIndex) ? (qmlWTFReportAssertionFailure(__FILE__, 1780, __PRETTY_FUNCTION__, "opIndex"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1580 | - | |||||||||||||||||||||||||
1581 | do { | - | ||||||||||||||||||||||||
1582 | --opIndex; | - | ||||||||||||||||||||||||
1583 | YarrOp& op = m_ops[opIndex]; | - | ||||||||||||||||||||||||
1584 | switch (op.m_op) { | - | ||||||||||||||||||||||||
1585 | - | |||||||||||||||||||||||||
1586 | case executed 2372176 times by 9 tests: OpTerm:case OpTerm: Executed by:
executed 2372176 times by 9 tests: case OpTerm: Executed by:
| 2372176 | ||||||||||||||||||||||||
1587 | backtrackTerm(opIndex); | - | ||||||||||||||||||||||||
1588 | break; executed 2373967 times by 9 tests: break; Executed by:
| 2373967 | ||||||||||||||||||||||||
1589 | case executed 1149916 times by 153 tests: OpBodyAlternativeBegin:case OpBodyAlternativeBegin: Executed by:
executed 1149916 times by 153 tests: case OpBodyAlternativeBegin: Executed by:
| 1149916 | ||||||||||||||||||||||||
1590 | case executed 206 times by 2 tests: OpBodyAlternativeNext:case OpBodyAlternativeNext: Executed by:
executed 206 times by 2 tests: {case OpBodyAlternativeNext: Executed by:
| 206 | ||||||||||||||||||||||||
1591 | PatternAlternative* alternative = op.m_alternative; | - | ||||||||||||||||||||||||
1592 | - | |||||||||||||||||||||||||
1593 | if (op.m_op == OpBodyAlternativeNext
| 205-1149200 | ||||||||||||||||||||||||
1594 | PatternAlternative* priorAlternative = m_ops[op.m_previousOp].m_alternative; | - | ||||||||||||||||||||||||
1595 | m_checked += priorAlternative->m_minimumSize; | - | ||||||||||||||||||||||||
1596 | } executed 205 times by 2 tests: end of block Executed by:
| 205 | ||||||||||||||||||||||||
1597 | m_checked -= alternative->m_minimumSize; | - | ||||||||||||||||||||||||
1598 | - | |||||||||||||||||||||||||
1599 | - | |||||||||||||||||||||||||
1600 | - | |||||||||||||||||||||||||
1601 | if (m_ops[op.m_nextOp].m_op != OpBodyAlternativeEnd
| 206-1150771 | ||||||||||||||||||||||||
1602 | m_backtrackingState.linkTo(m_ops[op.m_nextOp].m_reentry, this); | - | ||||||||||||||||||||||||
1603 | break; executed 206 times by 2 tests: break; Executed by:
| 206 | ||||||||||||||||||||||||
1604 | } | - | ||||||||||||||||||||||||
1605 | YarrOp& endOp = m_ops[op.m_nextOp]; | - | ||||||||||||||||||||||||
1606 | - | |||||||||||||||||||||||||
1607 | YarrOp* beginOp = &op; | - | ||||||||||||||||||||||||
1608 | while (beginOp->m_op != OpBodyAlternativeBegin
| 205-1149349 | ||||||||||||||||||||||||
1609 | (!(beginOp->m_op == OpBodyAlternativeNext) ? (qmlWTFReportAssertionFailure(__FILE__, 1834, __PRETTY_FUNCTION__, "beginOp->m_op == OpBodyAlternativeNext"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1610 | beginOp = &m_ops[beginOp->m_previousOp]; | - | ||||||||||||||||||||||||
1611 | } executed 205 times by 2 tests: end of block Executed by:
| 205 | ||||||||||||||||||||||||
1612 | - | |||||||||||||||||||||||||
1613 | bool onceThrough = endOp.m_nextOp == notFound; | - | ||||||||||||||||||||||||
1614 | - | |||||||||||||||||||||||||
1615 | - | |||||||||||||||||||||||||
1616 | - | |||||||||||||||||||||||||
1617 | - | |||||||||||||||||||||||||
1618 | if (onceThrough
| 98-1148175 | ||||||||||||||||||||||||
1619 | m_backtrackingState.linkTo(endOp.m_reentry, this); executed 98 times by 5 tests: m_backtrackingState.linkTo(endOp.m_reentry, this); Executed by:
| 98 | ||||||||||||||||||||||||
1620 | else { | - | ||||||||||||||||||||||||
1621 | - | |||||||||||||||||||||||||
1622 | - | |||||||||||||||||||||||||
1623 | - | |||||||||||||||||||||||||
1624 | - | |||||||||||||||||||||||||
1625 | if (m_pattern.m_body->m_hasFixedSize
| 1075-1147173 | ||||||||||||||||||||||||
1626 | && (
| 60-1147026 | ||||||||||||||||||||||||
1627 | && (
| 0-60 | ||||||||||||||||||||||||
1628 | m_backtrackingState.linkTo(beginOp->m_reentry, this); executed 60 times by 1 test: m_backtrackingState.linkTo(beginOp->m_reentry, this); Executed by:
| 60 | ||||||||||||||||||||||||
1629 | else { | - | ||||||||||||||||||||||||
1630 | - | |||||||||||||||||||||||||
1631 | - | |||||||||||||||||||||||||
1632 | m_backtrackingState.link(this); | - | ||||||||||||||||||||||||
1633 | - | |||||||||||||||||||||||||
1634 | - | |||||||||||||||||||||||||
1635 | if (!m_pattern.m_body->m_hasFixedSize
| 1081-1148412 | ||||||||||||||||||||||||
1636 | if (alternative->m_minimumSize == 1
| 254-826 | ||||||||||||||||||||||||
1637 | setMatchStart(index); executed 254 times by 5 tests: setMatchStart(index); Executed by:
| 254 | ||||||||||||||||||||||||
1638 | else { | - | ||||||||||||||||||||||||
1639 | move(index, regT0); | - | ||||||||||||||||||||||||
1640 | if (alternative->m_minimumSize
| 148-680 | ||||||||||||||||||||||||
1641 | sub32(Imm32(alternative->m_minimumSize - 1), regT0); executed 677 times by 3 tests: sub32(Imm32(alternative->m_minimumSize - 1), regT0); Executed by:
| 677 | ||||||||||||||||||||||||
1642 | else | - | ||||||||||||||||||||||||
1643 | add32(TrustedImm32(1), regT0); executed 148 times by 2 tests: add32(TrustedImm32(1), regT0); Executed by:
| 148 | ||||||||||||||||||||||||
1644 | setMatchStart(regT0); | - | ||||||||||||||||||||||||
1645 | } executed 824 times by 3 tests: end of block Executed by:
| 824 | ||||||||||||||||||||||||
1646 | } | - | ||||||||||||||||||||||||
1647 | - | |||||||||||||||||||||||||
1648 | - | |||||||||||||||||||||||||
1649 | - | |||||||||||||||||||||||||
1650 | if (alternative->m_minimumSize > beginOp->m_alternative->m_minimumSize
| 4-1149876 | ||||||||||||||||||||||||
1651 | - | |||||||||||||||||||||||||
1652 | - | |||||||||||||||||||||||||
1653 | unsigned delta = alternative->m_minimumSize - beginOp->m_alternative->m_minimumSize; | - | ||||||||||||||||||||||||
1654 | (!(delta) ? (qmlWTFReportAssertionFailure(__FILE__, 1879, __PRETTY_FUNCTION__, "delta"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1655 | if (delta != 1
| 0-4 | ||||||||||||||||||||||||
1656 | sub32(Imm32(delta - 1), index); executed 4 times by 1 test: sub32(Imm32(delta - 1), index); Executed by:
| 4 | ||||||||||||||||||||||||
1657 | jump(beginOp->m_reentry); | - | ||||||||||||||||||||||||
1658 | } executed 4 times by 1 test: else {end of block Executed by:
| 4 | ||||||||||||||||||||||||
1659 | - | |||||||||||||||||||||||||
1660 | - | |||||||||||||||||||||||||
1661 | unsigned delta = beginOp->m_alternative->m_minimumSize - alternative->m_minimumSize; | - | ||||||||||||||||||||||||
1662 | if (delta != 0xFFFFFFFFu
| 0-1148115 | ||||||||||||||||||||||||
1663 | - | |||||||||||||||||||||||||
1664 | add32(Imm32(delta + 1), index); | - | ||||||||||||||||||||||||
1665 | checkInput().linkTo(beginOp->m_reentry, this); | - | ||||||||||||||||||||||||
1666 | } executed 1149429 times by 153 tests: end of block Executed by:
| 1149429 | ||||||||||||||||||||||||
1667 | } executed 1149538 times by 153 tests: end of block Executed by:
| 1149538 | ||||||||||||||||||||||||
1668 | } | - | ||||||||||||||||||||||||
1669 | } | - | ||||||||||||||||||||||||
1670 | Label firstInputCheckFailed(this); | - | ||||||||||||||||||||||||
1671 | - | |||||||||||||||||||||||||
1672 | - | |||||||||||||||||||||||||
1673 | - | |||||||||||||||||||||||||
1674 | - | |||||||||||||||||||||||||
1675 | - | |||||||||||||||||||||||||
1676 | - | |||||||||||||||||||||||||
1677 | - | |||||||||||||||||||||||||
1678 | YarrOp* prevOp = beginOp; | - | ||||||||||||||||||||||||
1679 | YarrOp* nextOp = &m_ops[beginOp->m_nextOp]; | - | ||||||||||||||||||||||||
1680 | while (nextOp->m_op != OpBodyAlternativeEnd
| 206-1150607 | ||||||||||||||||||||||||
1681 | prevOp->m_jumps.link(this); | - | ||||||||||||||||||||||||
1682 | - | |||||||||||||||||||||||||
1683 | - | |||||||||||||||||||||||||
1684 | - | |||||||||||||||||||||||||
1685 | if (prevOp->m_alternative->m_minimumSize > nextOp->m_alternative->m_minimumSize
| 20-186 | ||||||||||||||||||||||||
1686 | - | |||||||||||||||||||||||||
1687 | - | |||||||||||||||||||||||||
1688 | - | |||||||||||||||||||||||||
1689 | unsigned delta = prevOp->m_alternative->m_minimumSize - nextOp->m_alternative->m_minimumSize; | - | ||||||||||||||||||||||||
1690 | sub32(Imm32(delta), index); | - | ||||||||||||||||||||||||
1691 | Jump fail = jumpIfNoAvailableInput(); | - | ||||||||||||||||||||||||
1692 | add32(Imm32(delta), index); | - | ||||||||||||||||||||||||
1693 | jump(nextOp->m_reentry); | - | ||||||||||||||||||||||||
1694 | fail.link(this); | - | ||||||||||||||||||||||||
1695 | } executed 20 times by 1 test: else if (prevOp->m_alternative->m_minimumSize < nextOp->m_alternative->m_minimumSizeend of block Executed by:
| 20-118 | ||||||||||||||||||||||||
1696 | add32(Imm32(nextOp->m_alternative->m_minimumSize - prevOp->m_alternative->m_minimumSize), index); executed 68 times by 1 test: add32(Imm32(nextOp->m_alternative->m_minimumSize - prevOp->m_alternative->m_minimumSize), index); Executed by:
| 68 | ||||||||||||||||||||||||
1697 | prevOp = nextOp; | - | ||||||||||||||||||||||||
1698 | nextOp = &m_ops[nextOp->m_nextOp]; | - | ||||||||||||||||||||||||
1699 | } executed 206 times by 2 tests: end of block Executed by:
| 206 | ||||||||||||||||||||||||
1700 | - | |||||||||||||||||||||||||
1701 | - | |||||||||||||||||||||||||
1702 | - | |||||||||||||||||||||||||
1703 | - | |||||||||||||||||||||||||
1704 | - | |||||||||||||||||||||||||
1705 | if (onceThrough
| 98-1149378 | ||||||||||||||||||||||||
1706 | op.m_jumps.linkTo(endOp.m_reentry, this); | - | ||||||||||||||||||||||||
1707 | jump(endOp.m_reentry); | - | ||||||||||||||||||||||||
1708 | break; executed 98 times by 5 tests: break; Executed by:
| 98 | ||||||||||||||||||||||||
1709 | } | - | ||||||||||||||||||||||||
1710 | - | |||||||||||||||||||||||||
1711 | - | |||||||||||||||||||||||||
1712 | - | |||||||||||||||||||||||||
1713 | op.m_jumps.link(this); | - | ||||||||||||||||||||||||
1714 | - | |||||||||||||||||||||||||
1715 | bool needsToUpdateMatchStart = !m_pattern.m_body->m_hasFixedSize; | - | ||||||||||||||||||||||||
1716 | - | |||||||||||||||||||||||||
1717 | - | |||||||||||||||||||||||||
1718 | - | |||||||||||||||||||||||||
1719 | - | |||||||||||||||||||||||||
1720 | if (needsToUpdateMatchStart
| 254-1148712 | ||||||||||||||||||||||||
1721 | - | |||||||||||||||||||||||||
1722 | setMatchStart(index); | - | ||||||||||||||||||||||||
1723 | needsToUpdateMatchStart = false; | - | ||||||||||||||||||||||||
1724 | } executed 254 times by 5 tests: end of block Executed by:
| 254 | ||||||||||||||||||||||||
1725 | - | |||||||||||||||||||||||||
1726 | - | |||||||||||||||||||||||||
1727 | - | |||||||||||||||||||||||||
1728 | - | |||||||||||||||||||||||||
1729 | - | |||||||||||||||||||||||||
1730 | (!(alternative->m_minimumSize >= m_pattern.m_body->m_minimumSize) ? (qmlWTFReportAssertionFailure(__FILE__, 1963, __PRETTY_FUNCTION__, "alternative->m_minimumSize >= m_pattern.m_body->m_minimumSize"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1731 | if (alternative->m_minimumSize == m_pattern.m_body->m_minimumSize
| 68-1148419 | ||||||||||||||||||||||||
1732 | - | |||||||||||||||||||||||||
1733 | - | |||||||||||||||||||||||||
1734 | add32(TrustedImm32(1), index); | - | ||||||||||||||||||||||||
1735 | } executed 1150407 times by 153 tests: else {end of block Executed by:
| 1150407 | ||||||||||||||||||||||||
1736 | - | |||||||||||||||||||||||||
1737 | - | |||||||||||||||||||||||||
1738 | unsigned delta = (alternative->m_minimumSize - m_pattern.m_body->m_minimumSize) - 1; | - | ||||||||||||||||||||||||
1739 | if (delta
| 4-64 | ||||||||||||||||||||||||
1740 | sub32(Imm32(delta), index); executed 4 times by 1 test: sub32(Imm32(delta), index); Executed by:
| 4 | ||||||||||||||||||||||||
1741 | } executed 68 times by 1 test: end of block Executed by:
| 68 | ||||||||||||||||||||||||
1742 | Jump matchFailed = jumpIfNoAvailableInput(); | - | ||||||||||||||||||||||||
1743 | - | |||||||||||||||||||||||||
1744 | if (needsToUpdateMatchStart
| 826-1148728 | ||||||||||||||||||||||||
1745 | if (!m_pattern.m_body->m_minimumSize
| 148-678 | ||||||||||||||||||||||||
1746 | setMatchStart(index); executed 148 times by 2 tests: setMatchStart(index); Executed by:
| 148 | ||||||||||||||||||||||||
1747 | else { | - | ||||||||||||||||||||||||
1748 | move(index, regT0); | - | ||||||||||||||||||||||||
1749 | sub32(Imm32(m_pattern.m_body->m_minimumSize), regT0); | - | ||||||||||||||||||||||||
1750 | setMatchStart(regT0); | - | ||||||||||||||||||||||||
1751 | } executed 680 times by 3 tests: end of block Executed by:
| 680 | ||||||||||||||||||||||||
1752 | } | - | ||||||||||||||||||||||||
1753 | - | |||||||||||||||||||||||||
1754 | - | |||||||||||||||||||||||||
1755 | - | |||||||||||||||||||||||||
1756 | - | |||||||||||||||||||||||||
1757 | if (beginOp->m_alternative->m_minimumSize == m_pattern.m_body->m_minimumSize
| 20-1149781 | ||||||||||||||||||||||||
1758 | jump(beginOp->m_reentry); executed 1149975 times by 153 tests: jump(beginOp->m_reentry); Executed by:
| 1149975 | ||||||||||||||||||||||||
1759 | else { | - | ||||||||||||||||||||||||
1760 | if (beginOp->m_alternative->m_minimumSize > m_pattern.m_body->m_minimumSize
| 0-20 | ||||||||||||||||||||||||
1761 | add32(Imm32(beginOp->m_alternative->m_minimumSize - m_pattern.m_body->m_minimumSize), index); executed 20 times by 1 test: add32(Imm32(beginOp->m_alternative->m_minimumSize - m_pattern.m_body->m_minimumSize), index); Executed by:
| 20 | ||||||||||||||||||||||||
1762 | else | - | ||||||||||||||||||||||||
1763 | sub32(Imm32(m_pattern.m_body->m_minimumSize - beginOp->m_alternative->m_minimumSize), index); never executed: sub32(Imm32(m_pattern.m_body->m_minimumSize - beginOp->m_alternative->m_minimumSize), index); | 0 | ||||||||||||||||||||||||
1764 | checkInput().linkTo(beginOp->m_reentry, this); | - | ||||||||||||||||||||||||
1765 | jump(firstInputCheckFailed); | - | ||||||||||||||||||||||||
1766 | } executed 20 times by 1 test: end of block Executed by:
| 20 | ||||||||||||||||||||||||
1767 | - | |||||||||||||||||||||||||
1768 | - | |||||||||||||||||||||||||
1769 | - | |||||||||||||||||||||||||
1770 | matchFailed.link(this); | - | ||||||||||||||||||||||||
1771 | - | |||||||||||||||||||||||||
1772 | removeCallFrame(); | - | ||||||||||||||||||||||||
1773 | move(TrustedImmPtr((void*)WTF::notFound), returnRegister); | - | ||||||||||||||||||||||||
1774 | move(TrustedImm32(0), returnRegister2); | - | ||||||||||||||||||||||||
1775 | generateReturn(); | - | ||||||||||||||||||||||||
1776 | break; executed 1150840 times by 153 tests: break; Executed by:
| 1150840 | ||||||||||||||||||||||||
1777 | } | - | ||||||||||||||||||||||||
1778 | case executed 1148142 times by 153 tests: OpBodyAlternativeEnd:case OpBodyAlternativeEnd: Executed by:
executed 1148142 times by 153 tests: {case OpBodyAlternativeEnd: Executed by:
| 1148142 | ||||||||||||||||||||||||
1779 | - | |||||||||||||||||||||||||
1780 | (!(m_backtrackingState.isEmpty()) ? (qmlWTFReportAssertionFailure(__FILE__, 2013, __PRETTY_FUNCTION__, "m_backtrackingState.isEmpty()"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1781 | - | |||||||||||||||||||||||||
1782 | PatternAlternative* priorAlternative = m_ops[op.m_previousOp].m_alternative; | - | ||||||||||||||||||||||||
1783 | m_checked += priorAlternative->m_minimumSize; | - | ||||||||||||||||||||||||
1784 | break; executed 1147760 times by 153 tests: break; Executed by:
| 1147760 | ||||||||||||||||||||||||
1785 | } | - | ||||||||||||||||||||||||
1786 | case executed 2343 times by 3 tests: OpSimpleNestedAlternativeBegin:case OpSimpleNestedAlternativeBegin: Executed by:
executed 2343 times by 3 tests: case OpSimpleNestedAlternativeBegin: Executed by:
| 2343 | ||||||||||||||||||||||||
1787 | case executed 36 times by 1 test: OpSimpleNestedAlternativeNext:case OpSimpleNestedAlternativeNext: Executed by:
executed 36 times by 1 test: case OpSimpleNestedAlternativeNext: Executed by:
| 36 | ||||||||||||||||||||||||
1788 | case executed 166 times by 3 tests: OpNestedAlternativeBegin:case OpNestedAlternativeBegin: Executed by:
executed 166 times by 3 tests: case OpNestedAlternativeBegin: Executed by:
| 166 | ||||||||||||||||||||||||
1789 | case executed 346 times by 3 tests: OpNestedAlternativeNext:case OpNestedAlternativeNext: Executed by:
executed 346 times by 3 tests: {case OpNestedAlternativeNext: Executed by:
| 346 | ||||||||||||||||||||||||
1790 | YarrOp& nextOp = m_ops[op.m_nextOp]; | - | ||||||||||||||||||||||||
1791 | bool isBegin = op.m_previousOp == notFound; | - | ||||||||||||||||||||||||
1792 | bool isLastAlternative = nextOp.m_nextOp == notFound; | - | ||||||||||||||||||||||||
1793 | (!(isBegin == (op.m_op == OpSimpleNestedAlternativeBegin || op.m_op == OpNestedAlternativeBegin)) ? (qmlWTFReportAssertionFailure(__FILE__, 2038, __PRETTY_FUNCTION__, "isBegin == (op.m_op == OpSimpleNestedAlternativeBegin || op.m_op == OpNestedAlternativeBegin)"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1794 | (!(isLastAlternative == (nextOp.m_op == OpSimpleNestedAlternativeEnd || nextOp.m_op == OpNestedAlternativeEnd)) ? (qmlWTFReportAssertionFailure(__FILE__, 2039, __PRETTY_FUNCTION__, "isLastAlternative == (nextOp.m_op == OpSimpleNestedAlternativeEnd || nextOp.m_op == OpNestedAlternativeEnd)"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1795 | - | |||||||||||||||||||||||||
1796 | - | |||||||||||||||||||||||||
1797 | m_backtrackingState.append(op.m_jumps); | - | ||||||||||||||||||||||||
1798 | if (op.m_checkAdjust
| 291-2596 | ||||||||||||||||||||||||
1799 | - | |||||||||||||||||||||||||
1800 | m_backtrackingState.link(this); | - | ||||||||||||||||||||||||
1801 | sub32(Imm32(op.m_checkAdjust), index); | - | ||||||||||||||||||||||||
1802 | if (!isLastAlternative
| 54-238 | ||||||||||||||||||||||||
1803 | - | |||||||||||||||||||||||||
1804 | jump(nextOp.m_reentry); | - | ||||||||||||||||||||||||
1805 | } executed 54 times by 3 tests: else if (!isBeginend of block Executed by:
| 54-174 | ||||||||||||||||||||||||
1806 | - | |||||||||||||||||||||||||
1807 | nextOp.m_jumps.append(jump()); | - | ||||||||||||||||||||||||
1808 | } executed 63 times by 1 test: else {end of block Executed by:
| 63 | ||||||||||||||||||||||||
1809 | - | |||||||||||||||||||||||||
1810 | m_backtrackingState.fallthrough(); | - | ||||||||||||||||||||||||
1811 | } executed 174 times by 2 tests: end of block Executed by:
| 174 | ||||||||||||||||||||||||
1812 | } else { | - | ||||||||||||||||||||||||
1813 | - | |||||||||||||||||||||||||
1814 | if (!isLastAlternative
| 328-2267 | ||||||||||||||||||||||||
1815 | - | |||||||||||||||||||||||||
1816 | m_backtrackingState.linkTo(nextOp.m_reentry, this); | - | ||||||||||||||||||||||||
1817 | } executed 327 times by 1 test: else if (!isBeginend of block Executed by:
| 137-2131 | ||||||||||||||||||||||||
1818 | - | |||||||||||||||||||||||||
1819 | m_backtrackingState.takeBacktracksToJumpList(nextOp.m_jumps, this); | - | ||||||||||||||||||||||||
1820 | } executed 137 times by 3 tests: end of block Executed by:
| 137 | ||||||||||||||||||||||||
1821 | - | |||||||||||||||||||||||||
1822 | } executed 2595 times by 3 tests: end of block Executed by:
| 2595 | ||||||||||||||||||||||||
1823 | - | |||||||||||||||||||||||||
1824 | - | |||||||||||||||||||||||||
1825 | if (op.m_zeroLengthMatch.isSet()
| 0-2887 | ||||||||||||||||||||||||
1826 | m_backtrackingState.append(op.m_zeroLengthMatch); never executed: m_backtrackingState.append(op.m_zeroLengthMatch); | 0 | ||||||||||||||||||||||||
1827 | - | |||||||||||||||||||||||||
1828 | - | |||||||||||||||||||||||||
1829 | - | |||||||||||||||||||||||||
1830 | - | |||||||||||||||||||||||||
1831 | - | |||||||||||||||||||||||||
1832 | - | |||||||||||||||||||||||||
1833 | if (op.m_op == OpNestedAlternativeNext
| 346-2539 | ||||||||||||||||||||||||
1834 | m_backtrackingState.append(op.m_returnAddress); executed 346 times by 3 tests: m_backtrackingState.append(op.m_returnAddress); Executed by:
| 346 | ||||||||||||||||||||||||
1835 | - | |||||||||||||||||||||||||
1836 | - | |||||||||||||||||||||||||
1837 | - | |||||||||||||||||||||||||
1838 | - | |||||||||||||||||||||||||
1839 | if (isBegin
| 382-2505 | ||||||||||||||||||||||||
1840 | YarrOp* endOp = &m_ops[op.m_nextOp]; | - | ||||||||||||||||||||||||
1841 | while (endOp->m_nextOp != notFound
| 381-2506 | ||||||||||||||||||||||||
1842 | (!(endOp->m_op == OpSimpleNestedAlternativeNext || endOp->m_op == OpNestedAlternativeNext) ? (qmlWTFReportAssertionFailure(__FILE__, 2108, __PRETTY_FUNCTION__, "endOp->m_op == OpSimpleNestedAlternativeNext || endOp->m_op == OpNestedAlternativeNext"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1843 | endOp = &m_ops[endOp->m_nextOp]; | - | ||||||||||||||||||||||||
1844 | } executed 381 times by 3 tests: end of block Executed by:
| 381 | ||||||||||||||||||||||||
1845 | (!(endOp->m_op == OpSimpleNestedAlternativeEnd || endOp->m_op == OpNestedAlternativeEnd) ? (qmlWTFReportAssertionFailure(__FILE__, 2111, __PRETTY_FUNCTION__, "endOp->m_op == OpSimpleNestedAlternativeEnd || endOp->m_op == OpNestedAlternativeEnd"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1846 | m_backtrackingState.append(endOp->m_jumps); | - | ||||||||||||||||||||||||
1847 | } executed 2507 times by 3 tests: end of block Executed by:
| 2507 | ||||||||||||||||||||||||
1848 | - | |||||||||||||||||||||||||
1849 | if (!isBegin
| 382-2506 | ||||||||||||||||||||||||
1850 | YarrOp& lastOp = m_ops[op.m_previousOp]; | - | ||||||||||||||||||||||||
1851 | m_checked += lastOp.m_checkAdjust; | - | ||||||||||||||||||||||||
1852 | } executed 382 times by 3 tests: end of block Executed by:
| 382 | ||||||||||||||||||||||||
1853 | m_checked -= op.m_checkAdjust; | - | ||||||||||||||||||||||||
1854 | break; executed 2890 times by 3 tests: break; Executed by:
| 2890 | ||||||||||||||||||||||||
1855 | } | - | ||||||||||||||||||||||||
1856 | case executed 2343 times by 3 tests: OpSimpleNestedAlternativeEnd:case OpSimpleNestedAlternativeEnd: Executed by:
executed 2343 times by 3 tests: case OpSimpleNestedAlternativeEnd: Executed by:
| 2343 | ||||||||||||||||||||||||
1857 | case executed 163 times by 3 tests: OpNestedAlternativeEnd:case OpNestedAlternativeEnd: Executed by:
executed 163 times by 3 tests: {case OpNestedAlternativeEnd: Executed by:
| 163 | ||||||||||||||||||||||||
1858 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1859 | - | |||||||||||||||||||||||||
1860 | - | |||||||||||||||||||||||||
1861 | if (op.m_zeroLengthMatch.isSet()
| 0-2505 | ||||||||||||||||||||||||
1862 | m_backtrackingState.append(op.m_zeroLengthMatch); never executed: m_backtrackingState.append(op.m_zeroLengthMatch); | 0 | ||||||||||||||||||||||||
1863 | - | |||||||||||||||||||||||||
1864 | - | |||||||||||||||||||||||||
1865 | - | |||||||||||||||||||||||||
1866 | - | |||||||||||||||||||||||||
1867 | - | |||||||||||||||||||||||||
1868 | if (op.m_op == OpNestedAlternativeEnd
| 164-2341 | ||||||||||||||||||||||||
1869 | m_backtrackingState.link(this); | - | ||||||||||||||||||||||||
1870 | - | |||||||||||||||||||||||||
1871 | - | |||||||||||||||||||||||||
1872 | unsigned parenthesesFrameLocation = term->frameLocation; | - | ||||||||||||||||||||||||
1873 | unsigned alternativeFrameLocation = parenthesesFrameLocation; | - | ||||||||||||||||||||||||
1874 | if (term->quantityType != QuantifierFixedCount
| 0-165 | ||||||||||||||||||||||||
1875 | alternativeFrameLocation += 1; never executed: alternativeFrameLocation += 1; | 0 | ||||||||||||||||||||||||
1876 | loadFromFrameAndJump(alternativeFrameLocation); | - | ||||||||||||||||||||||||
1877 | - | |||||||||||||||||||||||||
1878 | - | |||||||||||||||||||||||||
1879 | - | |||||||||||||||||||||||||
1880 | m_backtrackingState.append(op.m_returnAddress); | - | ||||||||||||||||||||||||
1881 | } executed 166 times by 3 tests: end of block Executed by:
| 166 | ||||||||||||||||||||||||
1882 | - | |||||||||||||||||||||||||
1883 | YarrOp& lastOp = m_ops[op.m_previousOp]; | - | ||||||||||||||||||||||||
1884 | m_checked += lastOp.m_checkAdjust; | - | ||||||||||||||||||||||||
1885 | break; executed 2507 times by 3 tests: break; Executed by:
| 2507 | ||||||||||||||||||||||||
1886 | } | - | ||||||||||||||||||||||||
1887 | case executed 2425 times by 3 tests: OpParenthesesSubpatternOnceBegin:case OpParenthesesSubpatternOnceBegin: Executed by:
executed 2425 times by 3 tests: {case OpParenthesesSubpatternOnceBegin: Executed by:
| 2425 | ||||||||||||||||||||||||
1888 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1889 | (!(term->quantityCount == 1) ? (qmlWTFReportAssertionFailure(__FILE__, 2171, __PRETTY_FUNCTION__, "term->quantityCount == 1"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1890 | - | |||||||||||||||||||||||||
1891 | - | |||||||||||||||||||||||||
1892 | if ((term->capture()
| 0-1476 | ||||||||||||||||||||||||
1893 | m_backtrackingState.link(this); | - | ||||||||||||||||||||||||
1894 | - | |||||||||||||||||||||||||
1895 | - | |||||||||||||||||||||||||
1896 | if (term->capture()
| 0-1478 | ||||||||||||||||||||||||
1897 | clearSubpatternStart(term->parentheses.subpatternId); executed 1478 times by 3 tests: clearSubpatternStart(term->parentheses.subpatternId); Executed by:
| 1478 | ||||||||||||||||||||||||
1898 | - | |||||||||||||||||||||||||
1899 | - | |||||||||||||||||||||||||
1900 | if (term->quantityType == QuantifierGreedy
| 129-1347 | ||||||||||||||||||||||||
1901 | - | |||||||||||||||||||||||||
1902 | unsigned parenthesesFrameLocation = term->frameLocation; | - | ||||||||||||||||||||||||
1903 | storeToFrame(TrustedImm32(-1), parenthesesFrameLocation); | - | ||||||||||||||||||||||||
1904 | - | |||||||||||||||||||||||||
1905 | jump(m_ops[op.m_nextOp].m_reentry); | - | ||||||||||||||||||||||||
1906 | - | |||||||||||||||||||||||||
1907 | - | |||||||||||||||||||||||||
1908 | op.m_jumps.link(this); | - | ||||||||||||||||||||||||
1909 | } executed 130 times by 2 tests: end of block Executed by:
| 130 | ||||||||||||||||||||||||
1910 | - | |||||||||||||||||||||||||
1911 | m_backtrackingState.fallthrough(); | - | ||||||||||||||||||||||||
1912 | } executed 1477 times by 3 tests: end of block Executed by:
| 1477 | ||||||||||||||||||||||||
1913 | break; executed 2429 times by 3 tests: break; Executed by:
| 2429 | ||||||||||||||||||||||||
1914 | } | - | ||||||||||||||||||||||||
1915 | case executed 2429 times by 3 tests: OpParenthesesSubpatternOnceEnd:case OpParenthesesSubpatternOnceEnd: Executed by:
executed 2429 times by 3 tests: {case OpParenthesesSubpatternOnceEnd: Executed by:
| 2429 | ||||||||||||||||||||||||
1916 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1917 | - | |||||||||||||||||||||||||
1918 | if (term->quantityType != QuantifierFixedCount
| 129-2298 | ||||||||||||||||||||||||
1919 | m_backtrackingState.link(this); | - | ||||||||||||||||||||||||
1920 | - | |||||||||||||||||||||||||
1921 | - | |||||||||||||||||||||||||
1922 | - | |||||||||||||||||||||||||
1923 | - | |||||||||||||||||||||||||
1924 | unsigned parenthesesFrameLocation = term->frameLocation; | - | ||||||||||||||||||||||||
1925 | Jump hadSkipped = branch32(Equal, Address(stackPointerRegister, parenthesesFrameLocation * sizeof(void*)), TrustedImm32(-1)); | - | ||||||||||||||||||||||||
1926 | - | |||||||||||||||||||||||||
1927 | if (term->quantityType == QuantifierGreedy
| 0-129 | ||||||||||||||||||||||||
1928 | - | |||||||||||||||||||||||||
1929 | - | |||||||||||||||||||||||||
1930 | YarrOp& beginOp = m_ops[op.m_previousOp]; | - | ||||||||||||||||||||||||
1931 | beginOp.m_jumps.append(hadSkipped); | - | ||||||||||||||||||||||||
1932 | } executed 128 times by 2 tests: else {end of block Executed by:
| 128 | ||||||||||||||||||||||||
1933 | - | |||||||||||||||||||||||||
1934 | - | |||||||||||||||||||||||||
1935 | - | |||||||||||||||||||||||||
1936 | - | |||||||||||||||||||||||||
1937 | (!(term->quantityType == QuantifierNonGreedy) ? (qmlWTFReportAssertionFailure(__FILE__, 2219, __PRETTY_FUNCTION__, "term->quantityType == QuantifierNonGreedy"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1938 | YarrOp& beginOp = m_ops[op.m_previousOp]; | - | ||||||||||||||||||||||||
1939 | hadSkipped.linkTo(beginOp.m_reentry, this); | - | ||||||||||||||||||||||||
1940 | } never executed: end of block | 0 | ||||||||||||||||||||||||
1941 | - | |||||||||||||||||||||||||
1942 | m_backtrackingState.fallthrough(); | - | ||||||||||||||||||||||||
1943 | } executed 130 times by 2 tests: end of block Executed by:
| 130 | ||||||||||||||||||||||||
1944 | - | |||||||||||||||||||||||||
1945 | m_backtrackingState.append(op.m_jumps); | - | ||||||||||||||||||||||||
1946 | break; executed 2426 times by 3 tests: break; Executed by:
| 2426 | ||||||||||||||||||||||||
1947 | } | - | ||||||||||||||||||||||||
1948 | - | |||||||||||||||||||||||||
1949 | - | |||||||||||||||||||||||||
1950 | - | |||||||||||||||||||||||||
1951 | - | |||||||||||||||||||||||||
1952 | - | |||||||||||||||||||||||||
1953 | - | |||||||||||||||||||||||||
1954 | case executed 12 times by 1 test: OpParenthesesSubpatternTerminalBegin:case OpParenthesesSubpatternTerminalBegin: Executed by:
executed 12 times by 1 test: {case OpParenthesesSubpatternTerminalBegin: Executed by:
| 12 | ||||||||||||||||||||||||
1955 | - | |||||||||||||||||||||||||
1956 | - | |||||||||||||||||||||||||
1957 | - | |||||||||||||||||||||||||
1958 | - | |||||||||||||||||||||||||
1959 | YarrOp& endOp = m_ops[op.m_nextOp]; | - | ||||||||||||||||||||||||
1960 | m_backtrackingState.linkTo(endOp.m_reentry, this); | - | ||||||||||||||||||||||||
1961 | break; executed 11 times by 1 test: break; Executed by:
| 11 | ||||||||||||||||||||||||
1962 | } | - | ||||||||||||||||||||||||
1963 | case executed 11 times by 1 test: OpParenthesesSubpatternTerminalEnd:case OpParenthesesSubpatternTerminalEnd: Executed by:
executed 11 times by 1 test: case OpParenthesesSubpatternTerminalEnd: Executed by:
| 11 | ||||||||||||||||||||||||
1964 | - | |||||||||||||||||||||||||
1965 | (!(m_backtrackingState.isEmpty()) ? (qmlWTFReportAssertionFailure(__FILE__, 2247, __PRETTY_FUNCTION__, "m_backtrackingState.isEmpty()"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
1966 | m_backtrackingState.append(op.m_jumps); | - | ||||||||||||||||||||||||
1967 | break; executed 11 times by 1 test: break; Executed by:
| 11 | ||||||||||||||||||||||||
1968 | - | |||||||||||||||||||||||||
1969 | - | |||||||||||||||||||||||||
1970 | case executed 68 times by 1 test: OpParentheticalAssertionBegin:case OpParentheticalAssertionBegin: Executed by:
executed 68 times by 1 test: {case OpParentheticalAssertionBegin: Executed by:
| 68 | ||||||||||||||||||||||||
1971 | PatternTerm* term = op.m_term; | - | ||||||||||||||||||||||||
1972 | YarrOp& endOp = m_ops[op.m_nextOp]; | - | ||||||||||||||||||||||||
1973 | - | |||||||||||||||||||||||||
1974 | - | |||||||||||||||||||||||||
1975 | - | |||||||||||||||||||||||||
1976 | - | |||||||||||||||||||||||||
1977 | if (op.m_checkAdjust
| 16-52 | ||||||||||||||||||||||||
1978 | m_backtrackingState.link(this); | - | ||||||||||||||||||||||||
1979 | - | |||||||||||||||||||||||||
1980 | if (op.m_checkAdjust
| 16-24 | ||||||||||||||||||||||||
1981 | add32(Imm32(op.m_checkAdjust), index); executed 16 times by 1 test: add32(Imm32(op.m_checkAdjust), index); Executed by:
| 16 | ||||||||||||||||||||||||
1982 | - | |||||||||||||||||||||||||
1983 | - | |||||||||||||||||||||||||
1984 | - | |||||||||||||||||||||||||
1985 | - | |||||||||||||||||||||||||
1986 | - | |||||||||||||||||||||||||
1987 | if (term->invert()
| 0-40 | ||||||||||||||||||||||||
1988 | jump(endOp.m_reentry); executed 40 times by 1 test: jump(endOp.m_reentry); Executed by:
| 40 | ||||||||||||||||||||||||
1989 | - | |||||||||||||||||||||||||
1990 | m_backtrackingState.fallthrough(); | - | ||||||||||||||||||||||||
1991 | } executed 40 times by 1 test: end of block Executed by:
| 40 | ||||||||||||||||||||||||
1992 | - | |||||||||||||||||||||||||
1993 | - | |||||||||||||||||||||||||
1994 | - | |||||||||||||||||||||||||
1995 | - | |||||||||||||||||||||||||
1996 | m_backtrackingState.append(endOp.m_jumps); | - | ||||||||||||||||||||||||
1997 | - | |||||||||||||||||||||||||
1998 | m_checked += op.m_checkAdjust; | - | ||||||||||||||||||||||||
1999 | break; executed 68 times by 1 test: break; Executed by:
| 68 | ||||||||||||||||||||||||
2000 | } | - | ||||||||||||||||||||||||
2001 | case executed 68 times by 1 test: OpParentheticalAssertionEnd:case OpParentheticalAssertionEnd: Executed by:
executed 68 times by 1 test: {case OpParentheticalAssertionEnd: Executed by:
| 68 | ||||||||||||||||||||||||
2002 | - | |||||||||||||||||||||||||
2003 | - | |||||||||||||||||||||||||
2004 | - | |||||||||||||||||||||||||
2005 | - | |||||||||||||||||||||||||
2006 | - | |||||||||||||||||||||||||
2007 | m_backtrackingState.takeBacktracksToJumpList(op.m_jumps, this); | - | ||||||||||||||||||||||||
2008 | - | |||||||||||||||||||||||||
2009 | YarrOp& lastOp = m_ops[op.m_previousOp]; | - | ||||||||||||||||||||||||
2010 | m_checked -= lastOp.m_checkAdjust; | - | ||||||||||||||||||||||||
2011 | break; executed 68 times by 1 test: break; Executed by:
| 68 | ||||||||||||||||||||||||
2012 | } | - | ||||||||||||||||||||||||
2013 | - | |||||||||||||||||||||||||
2014 | case executed 92 times by 4 tests: OpMatchFailed:case OpMatchFailed: Executed by:
executed 92 times by 4 tests: case OpMatchFailed: Executed by:
| 92 | ||||||||||||||||||||||||
2015 | break; executed 92 times by 4 tests: break; Executed by:
| 92 | ||||||||||||||||||||||||
2016 | } | - | ||||||||||||||||||||||||
2017 | - | |||||||||||||||||||||||||
2018 | } executed 4683088 times by 153 tests: while (opIndexend of block Executed by:
| 1150184-4683088 | ||||||||||||||||||||||||
2019 | } executed 1151009 times by 153 tests: end of block Executed by:
| 1151009 | ||||||||||||||||||||||||
2020 | void opCompileParenthesesSubpattern(PatternTerm* term) | - | ||||||||||||||||||||||||
2021 | { | - | ||||||||||||||||||||||||
2022 | YarrOpCode parenthesesBeginOpCode; | - | ||||||||||||||||||||||||
2023 | YarrOpCode parenthesesEndOpCode; | - | ||||||||||||||||||||||||
2024 | YarrOpCode alternativeBeginOpCode = OpSimpleNestedAlternativeBegin; | - | ||||||||||||||||||||||||
2025 | YarrOpCode alternativeNextOpCode = OpSimpleNestedAlternativeNext; | - | ||||||||||||||||||||||||
2026 | YarrOpCode alternativeEndOpCode = OpSimpleNestedAlternativeEnd; | - | ||||||||||||||||||||||||
2027 | if (term->quantityCount == 1
| 0-2702 | ||||||||||||||||||||||||
2028 | - | |||||||||||||||||||||||||
2029 | parenthesesBeginOpCode = OpParenthesesSubpatternOnceBegin; | - | ||||||||||||||||||||||||
2030 | parenthesesEndOpCode = OpParenthesesSubpatternOnceEnd; | - | ||||||||||||||||||||||||
2031 | - | |||||||||||||||||||||||||
2032 | - | |||||||||||||||||||||||||
2033 | if (term->parentheses.disjunction->m_alternatives.size() != 1
| 272-2429 | ||||||||||||||||||||||||
2034 | alternativeBeginOpCode = OpNestedAlternativeBegin; | - | ||||||||||||||||||||||||
2035 | alternativeNextOpCode = OpNestedAlternativeNext; | - | ||||||||||||||||||||||||
2036 | alternativeEndOpCode = OpNestedAlternativeEnd; | - | ||||||||||||||||||||||||
2037 | } executed 272 times by 3 tests: end of block Executed by:
| 272 | ||||||||||||||||||||||||
2038 | } executed 2702 times by 3 tests: else if (term->parentheses.isTerminalend of block Executed by:
| 12-2702 | ||||||||||||||||||||||||
2039 | - | |||||||||||||||||||||||||
2040 | parenthesesBeginOpCode = OpParenthesesSubpatternTerminalBegin; | - | ||||||||||||||||||||||||
2041 | parenthesesEndOpCode = OpParenthesesSubpatternTerminalEnd; | - | ||||||||||||||||||||||||
2042 | } executed 12 times by 1 test: else {end of block Executed by:
| 12 | ||||||||||||||||||||||||
2043 | - | |||||||||||||||||||||||||
2044 | m_shouldFallBack = true; | - | ||||||||||||||||||||||||
2045 | return; executed 272 times by 1 test: return; Executed by:
| 272 | ||||||||||||||||||||||||
2046 | } | - | ||||||||||||||||||||||||
2047 | - | |||||||||||||||||||||||||
2048 | size_t parenBegin = m_ops.size(); | - | ||||||||||||||||||||||||
2049 | m_ops.append(parenthesesBeginOpCode); | - | ||||||||||||||||||||||||
2050 | - | |||||||||||||||||||||||||
2051 | m_ops.append(alternativeBeginOpCode); | - | ||||||||||||||||||||||||
2052 | m_ops.last().m_previousOp = notFound; | - | ||||||||||||||||||||||||
2053 | m_ops.last().m_term = term; | - | ||||||||||||||||||||||||
2054 | Vector<OwnPtr<PatternAlternative> >& alternatives = term->parentheses.disjunction->m_alternatives; | - | ||||||||||||||||||||||||
2055 | for (unsigned i = 0; i < alternatives.size()
| 2718-3208 | ||||||||||||||||||||||||
2056 | size_t lastOpIndex = m_ops.size() - 1; | - | ||||||||||||||||||||||||
2057 | - | |||||||||||||||||||||||||
2058 | PatternAlternative* nestedAlternative = alternatives[i].get(); | - | ||||||||||||||||||||||||
2059 | opCompileAlternative(nestedAlternative); | - | ||||||||||||||||||||||||
2060 | - | |||||||||||||||||||||||||
2061 | size_t thisOpIndex = m_ops.size(); | - | ||||||||||||||||||||||||
2062 | m_ops.append(YarrOp(alternativeNextOpCode)); | - | ||||||||||||||||||||||||
2063 | - | |||||||||||||||||||||||||
2064 | YarrOp& lastOp = m_ops[lastOpIndex]; | - | ||||||||||||||||||||||||
2065 | YarrOp& thisOp = m_ops[thisOpIndex]; | - | ||||||||||||||||||||||||
2066 | - | |||||||||||||||||||||||||
2067 | lastOp.m_alternative = nestedAlternative; | - | ||||||||||||||||||||||||
2068 | lastOp.m_nextOp = thisOpIndex; | - | ||||||||||||||||||||||||
2069 | thisOp.m_previousOp = lastOpIndex; | - | ||||||||||||||||||||||||
2070 | thisOp.m_term = term; | - | ||||||||||||||||||||||||
2071 | } executed 3208 times by 3 tests: end of block Executed by:
| 3208 | ||||||||||||||||||||||||
2072 | YarrOp& lastOp = m_ops.last(); | - | ||||||||||||||||||||||||
2073 | (!(lastOp.m_op == alternativeNextOpCode) ? (qmlWTFReportAssertionFailure(__FILE__, 2377, __PRETTY_FUNCTION__, "lastOp.m_op == alternativeNextOpCode"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
2074 | lastOp.m_op = alternativeEndOpCode; | - | ||||||||||||||||||||||||
2075 | lastOp.m_alternative = 0; | - | ||||||||||||||||||||||||
2076 | lastOp.m_nextOp = notFound; | - | ||||||||||||||||||||||||
2077 | - | |||||||||||||||||||||||||
2078 | size_t parenEnd = m_ops.size(); | - | ||||||||||||||||||||||||
2079 | m_ops.append(parenthesesEndOpCode); | - | ||||||||||||||||||||||||
2080 | - | |||||||||||||||||||||||||
2081 | m_ops[parenBegin].m_term = term; | - | ||||||||||||||||||||||||
2082 | m_ops[parenBegin].m_previousOp = notFound; | - | ||||||||||||||||||||||||
2083 | m_ops[parenBegin].m_nextOp = parenEnd; | - | ||||||||||||||||||||||||
2084 | m_ops[parenEnd].m_term = term; | - | ||||||||||||||||||||||||
2085 | m_ops[parenEnd].m_previousOp = parenBegin; | - | ||||||||||||||||||||||||
2086 | m_ops[parenEnd].m_nextOp = notFound; | - | ||||||||||||||||||||||||
2087 | } executed 2718 times by 3 tests: end of block Executed by:
| 2718 | ||||||||||||||||||||||||
2088 | void opCompileParentheticalAssertion(PatternTerm* term) | - | ||||||||||||||||||||||||
2089 | { | - | ||||||||||||||||||||||||
2090 | size_t parenBegin = m_ops.size(); | - | ||||||||||||||||||||||||
2091 | m_ops.append(OpParentheticalAssertionBegin); | - | ||||||||||||||||||||||||
2092 | - | |||||||||||||||||||||||||
2093 | m_ops.append(OpSimpleNestedAlternativeBegin); | - | ||||||||||||||||||||||||
2094 | m_ops.last().m_previousOp = notFound; | - | ||||||||||||||||||||||||
2095 | m_ops.last().m_term = term; | - | ||||||||||||||||||||||||
2096 | Vector<OwnPtr<PatternAlternative> >& alternatives = term->parentheses.disjunction->m_alternatives; | - | ||||||||||||||||||||||||
2097 | for (unsigned i = 0; i < alternatives.size()
| 68-92 | ||||||||||||||||||||||||
2098 | size_t lastOpIndex = m_ops.size() - 1; | - | ||||||||||||||||||||||||
2099 | - | |||||||||||||||||||||||||
2100 | PatternAlternative* nestedAlternative = alternatives[i].get(); | - | ||||||||||||||||||||||||
2101 | opCompileAlternative(nestedAlternative); | - | ||||||||||||||||||||||||
2102 | - | |||||||||||||||||||||||||
2103 | size_t thisOpIndex = m_ops.size(); | - | ||||||||||||||||||||||||
2104 | m_ops.append(YarrOp(OpSimpleNestedAlternativeNext)); | - | ||||||||||||||||||||||||
2105 | - | |||||||||||||||||||||||||
2106 | YarrOp& lastOp = m_ops[lastOpIndex]; | - | ||||||||||||||||||||||||
2107 | YarrOp& thisOp = m_ops[thisOpIndex]; | - | ||||||||||||||||||||||||
2108 | - | |||||||||||||||||||||||||
2109 | lastOp.m_alternative = nestedAlternative; | - | ||||||||||||||||||||||||
2110 | lastOp.m_nextOp = thisOpIndex; | - | ||||||||||||||||||||||||
2111 | thisOp.m_previousOp = lastOpIndex; | - | ||||||||||||||||||||||||
2112 | thisOp.m_term = term; | - | ||||||||||||||||||||||||
2113 | } executed 92 times by 1 test: end of block Executed by:
| 92 | ||||||||||||||||||||||||
2114 | YarrOp& lastOp = m_ops.last(); | - | ||||||||||||||||||||||||
2115 | (!(lastOp.m_op == OpSimpleNestedAlternativeNext) ? (qmlWTFReportAssertionFailure(__FILE__, 2428, __PRETTY_FUNCTION__, "lastOp.m_op == OpSimpleNestedAlternativeNext"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
2116 | lastOp.m_op = OpSimpleNestedAlternativeEnd; | - | ||||||||||||||||||||||||
2117 | lastOp.m_alternative = 0; | - | ||||||||||||||||||||||||
2118 | lastOp.m_nextOp = notFound; | - | ||||||||||||||||||||||||
2119 | - | |||||||||||||||||||||||||
2120 | size_t parenEnd = m_ops.size(); | - | ||||||||||||||||||||||||
2121 | m_ops.append(OpParentheticalAssertionEnd); | - | ||||||||||||||||||||||||
2122 | - | |||||||||||||||||||||||||
2123 | m_ops[parenBegin].m_term = term; | - | ||||||||||||||||||||||||
2124 | m_ops[parenBegin].m_previousOp = notFound; | - | ||||||||||||||||||||||||
2125 | m_ops[parenBegin].m_nextOp = parenEnd; | - | ||||||||||||||||||||||||
2126 | m_ops[parenEnd].m_term = term; | - | ||||||||||||||||||||||||
2127 | m_ops[parenEnd].m_previousOp = parenBegin; | - | ||||||||||||||||||||||||
2128 | m_ops[parenEnd].m_nextOp = notFound; | - | ||||||||||||||||||||||||
2129 | } executed 68 times by 1 test: end of block Executed by:
| 68 | ||||||||||||||||||||||||
2130 | - | |||||||||||||||||||||||||
2131 | - | |||||||||||||||||||||||||
2132 | - | |||||||||||||||||||||||||
2133 | void opCompileAlternative(PatternAlternative* alternative) | - | ||||||||||||||||||||||||
2134 | { | - | ||||||||||||||||||||||||
2135 | optimizeAlternative(alternative); | - | ||||||||||||||||||||||||
2136 | - | |||||||||||||||||||||||||
2137 | for (unsigned i = 0; i < alternative->m_terms.size()
| 1153843-2376037 | ||||||||||||||||||||||||
2138 | PatternTerm* term = &alternative->m_terms[i]; | - | ||||||||||||||||||||||||
2139 | - | |||||||||||||||||||||||||
2140 | switch (term->type) { | - | ||||||||||||||||||||||||
2141 | case executed 2984 times by 3 tests: PatternTerm::TypeParenthesesSubpattern:case PatternTerm::TypeParenthesesSubpattern: Executed by:
executed 2984 times by 3 tests: case PatternTerm::TypeParenthesesSubpattern: Executed by:
| 2984 | ||||||||||||||||||||||||
2142 | opCompileParenthesesSubpattern(term); | - | ||||||||||||||||||||||||
2143 | break; executed 2990 times by 3 tests: break; Executed by:
| 2990 | ||||||||||||||||||||||||
2144 | - | |||||||||||||||||||||||||
2145 | case executed 68 times by 1 test: PatternTerm::TypeParentheticalAssertion:case PatternTerm::TypeParentheticalAssertion: Executed by:
executed 68 times by 1 test: case PatternTerm::TypeParentheticalAssertion: Executed by:
| 68 | ||||||||||||||||||||||||
2146 | opCompileParentheticalAssertion(term); | - | ||||||||||||||||||||||||
2147 | break; executed 68 times by 1 test: break; Executed by:
| 68 | ||||||||||||||||||||||||
2148 | - | |||||||||||||||||||||||||
2149 | default executed 2372984 times by 9 tests: :default: Executed by:
executed 2372984 times by 9 tests: default: Executed by:
| 2372984 | ||||||||||||||||||||||||
2150 | m_ops.append(term); | - | ||||||||||||||||||||||||
2151 | } executed 2374493 times by 9 tests: end of block Executed by:
| 2374493 | ||||||||||||||||||||||||
2152 | } | - | ||||||||||||||||||||||||
2153 | } executed 1153607 times by 153 tests: end of block Executed by:
| 1153607 | ||||||||||||||||||||||||
2154 | void opCompileBody(PatternDisjunction* disjunction) | - | ||||||||||||||||||||||||
2155 | { | - | ||||||||||||||||||||||||
2156 | Vector<OwnPtr<PatternAlternative> >& alternatives = disjunction->m_alternatives; | - | ||||||||||||||||||||||||
2157 | size_t currentAlternativeIndex = 0; | - | ||||||||||||||||||||||||
2158 | - | |||||||||||||||||||||||||
2159 | - | |||||||||||||||||||||||||
2160 | if (alternatives.size()
| 0-1150093 | ||||||||||||||||||||||||
2161 | m_ops.append(YarrOp(OpBodyAlternativeBegin)); | - | ||||||||||||||||||||||||
2162 | m_ops.last().m_previousOp = notFound; | - | ||||||||||||||||||||||||
2163 | - | |||||||||||||||||||||||||
2164 | do { | - | ||||||||||||||||||||||||
2165 | size_t lastOpIndex = m_ops.size() - 1; | - | ||||||||||||||||||||||||
2166 | PatternAlternative* alternative = alternatives[currentAlternativeIndex].get(); | - | ||||||||||||||||||||||||
2167 | opCompileAlternative(alternative); | - | ||||||||||||||||||||||||
2168 | - | |||||||||||||||||||||||||
2169 | size_t thisOpIndex = m_ops.size(); | - | ||||||||||||||||||||||||
2170 | m_ops.append(YarrOp(OpBodyAlternativeNext)); | - | ||||||||||||||||||||||||
2171 | - | |||||||||||||||||||||||||
2172 | YarrOp& lastOp = m_ops[lastOpIndex]; | - | ||||||||||||||||||||||||
2173 | YarrOp& thisOp = m_ops[thisOpIndex]; | - | ||||||||||||||||||||||||
2174 | - | |||||||||||||||||||||||||
2175 | lastOp.m_alternative = alternative; | - | ||||||||||||||||||||||||
2176 | lastOp.m_nextOp = thisOpIndex; | - | ||||||||||||||||||||||||
2177 | thisOp.m_previousOp = lastOpIndex; | - | ||||||||||||||||||||||||
2178 | - | |||||||||||||||||||||||||
2179 | ++currentAlternativeIndex; | - | ||||||||||||||||||||||||
2180 | } executed 128 times by 5 tests: while (currentAlternativeIndex < alternatives.size()end of block Executed by:
| 6-128 | ||||||||||||||||||||||||
2181 | - | |||||||||||||||||||||||||
2182 | YarrOp& lastOp = m_ops.last(); | - | ||||||||||||||||||||||||
2183 | - | |||||||||||||||||||||||||
2184 | (!(lastOp.m_op == OpBodyAlternativeNext) ? (qmlWTFReportAssertionFailure(__FILE__, 2511, __PRETTY_FUNCTION__, "lastOp.m_op == OpBodyAlternativeNext"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
2185 | lastOp.m_op = OpBodyAlternativeEnd; | - | ||||||||||||||||||||||||
2186 | lastOp.m_alternative = 0; | - | ||||||||||||||||||||||||
2187 | lastOp.m_nextOp = notFound; | - | ||||||||||||||||||||||||
2188 | } executed 118 times by 5 tests: end of block Executed by:
| 118 | ||||||||||||||||||||||||
2189 | - | |||||||||||||||||||||||||
2190 | if (currentAlternativeIndex == alternatives.size()
| 112-1150080 | ||||||||||||||||||||||||
2191 | m_ops.append(YarrOp(OpMatchFailed)); | - | ||||||||||||||||||||||||
2192 | return; executed 112 times by 4 tests: return; Executed by:
| 112 | ||||||||||||||||||||||||
2193 | } | - | ||||||||||||||||||||||||
2194 | - | |||||||||||||||||||||||||
2195 | - | |||||||||||||||||||||||||
2196 | size_t repeatLoop = m_ops.size(); | - | ||||||||||||||||||||||||
2197 | m_ops.append(YarrOp(OpBodyAlternativeBegin)); | - | ||||||||||||||||||||||||
2198 | m_ops.last().m_previousOp = notFound; | - | ||||||||||||||||||||||||
2199 | do { | - | ||||||||||||||||||||||||
2200 | size_t lastOpIndex = m_ops.size() - 1; | - | ||||||||||||||||||||||||
2201 | PatternAlternative* alternative = alternatives[currentAlternativeIndex].get(); | - | ||||||||||||||||||||||||
2202 | (!(!alternative->onceThrough()) ? (qmlWTFReportAssertionFailure(__FILE__, 2529, __PRETTY_FUNCTION__, "!alternative->onceThrough()"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
2203 | opCompileAlternative(alternative); | - | ||||||||||||||||||||||||
2204 | - | |||||||||||||||||||||||||
2205 | size_t thisOpIndex = m_ops.size(); | - | ||||||||||||||||||||||||
2206 | m_ops.append(YarrOp(OpBodyAlternativeNext)); | - | ||||||||||||||||||||||||
2207 | - | |||||||||||||||||||||||||
2208 | YarrOp& lastOp = m_ops[lastOpIndex]; | - | ||||||||||||||||||||||||
2209 | YarrOp& thisOp = m_ops[thisOpIndex]; | - | ||||||||||||||||||||||||
2210 | - | |||||||||||||||||||||||||
2211 | lastOp.m_alternative = alternative; | - | ||||||||||||||||||||||||
2212 | lastOp.m_nextOp = thisOpIndex; | - | ||||||||||||||||||||||||
2213 | thisOp.m_previousOp = lastOpIndex; | - | ||||||||||||||||||||||||
2214 | - | |||||||||||||||||||||||||
2215 | ++currentAlternativeIndex; | - | ||||||||||||||||||||||||
2216 | } executed 1151295 times by 153 tests: while (currentAlternativeIndex < alternatives.size()end of block Executed by:
| 220-1151295 | ||||||||||||||||||||||||
2217 | YarrOp& lastOp = m_ops.last(); | - | ||||||||||||||||||||||||
2218 | (!(lastOp.m_op == OpBodyAlternativeNext) ? (qmlWTFReportAssertionFailure(__FILE__, 2545, __PRETTY_FUNCTION__, "lastOp.m_op == OpBodyAlternativeNext"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||||||||||||||||||||
2219 | lastOp.m_op = OpBodyAlternativeEnd; | - | ||||||||||||||||||||||||
2220 | lastOp.m_alternative = 0; | - | ||||||||||||||||||||||||
2221 | lastOp.m_nextOp = repeatLoop; | - | ||||||||||||||||||||||||
2222 | } executed 1150367 times by 153 tests: end of block Executed by:
| 1150367 | ||||||||||||||||||||||||
2223 | - | |||||||||||||||||||||||||
2224 | void generateEnter() | - | ||||||||||||||||||||||||
2225 | { | - | ||||||||||||||||||||||||
2226 | - | |||||||||||||||||||||||||
2227 | push(X86Registers::ebp); | - | ||||||||||||||||||||||||
2228 | move(stackPointerRegister, X86Registers::ebp); | - | ||||||||||||||||||||||||
2229 | push(X86Registers::ebx); | - | ||||||||||||||||||||||||
2230 | - | |||||||||||||||||||||||||
2231 | zeroExtend32ToPtr(index, index); | - | ||||||||||||||||||||||||
2232 | zeroExtend32ToPtr(length, length); | - | ||||||||||||||||||||||||
2233 | } executed 1150894 times by 153 tests: end of block Executed by:
| 1150894 | ||||||||||||||||||||||||
2234 | - | |||||||||||||||||||||||||
2235 | void generateReturn() | - | ||||||||||||||||||||||||
2236 | { | - | ||||||||||||||||||||||||
2237 | - | |||||||||||||||||||||||||
2238 | - | |||||||||||||||||||||||||
2239 | - | |||||||||||||||||||||||||
2240 | - | |||||||||||||||||||||||||
2241 | - | |||||||||||||||||||||||||
2242 | - | |||||||||||||||||||||||||
2243 | - | |||||||||||||||||||||||||
2244 | pop(X86Registers::ebx); | - | ||||||||||||||||||||||||
2245 | pop(X86Registers::ebp); | - | ||||||||||||||||||||||||
2246 | ret(); | - | ||||||||||||||||||||||||
2247 | } executed 3449818 times by 153 tests: end of block Executed by:
| 3449818 | ||||||||||||||||||||||||
2248 | - | |||||||||||||||||||||||||
2249 | public: | - | ||||||||||||||||||||||||
2250 | YarrGenerator(YarrPattern& pattern, YarrCharSize charSize) | - | ||||||||||||||||||||||||
2251 | : m_pattern(pattern) | - | ||||||||||||||||||||||||
2252 | , m_charSize(charSize) | - | ||||||||||||||||||||||||
2253 | , m_charScale(m_charSize == Char8 ? TimesOne: TimesTwo) | - | ||||||||||||||||||||||||
2254 | , m_shouldFallBack(false) | - | ||||||||||||||||||||||||
2255 | , m_checked(0) | - | ||||||||||||||||||||||||
2256 | { | - | ||||||||||||||||||||||||
2257 | } executed 1148563 times by 153 tests: end of block Executed by:
| 1148563 | ||||||||||||||||||||||||
2258 | - | |||||||||||||||||||||||||
2259 | void compile(JSGlobalData* globalData, YarrCodeBlock& jitObject) | - | ||||||||||||||||||||||||
2260 | { | - | ||||||||||||||||||||||||
2261 | generateEnter(); | - | ||||||||||||||||||||||||
2262 | - | |||||||||||||||||||||||||
2263 | Jump hasInput = checkInput(); | - | ||||||||||||||||||||||||
2264 | move(TrustedImmPtr((void*)WTF::notFound), returnRegister); | - | ||||||||||||||||||||||||
2265 | move(TrustedImm32(0), returnRegister2); | - | ||||||||||||||||||||||||
2266 | generateReturn(); | - | ||||||||||||||||||||||||
2267 | hasInput.link(this); | - | ||||||||||||||||||||||||
2268 | - | |||||||||||||||||||||||||
2269 | if (compileMode == IncludeSubpatterns
| 0-1146398 | ||||||||||||||||||||||||
2270 | for (unsigned i = 0; i < m_pattern.m_numSubpatterns + 1
| 1148636-1149381 | ||||||||||||||||||||||||
2271 | store32(TrustedImm32(-1), Address(output, (i << 1) * sizeof(int))); executed 1148639 times by 153 tests: store32(TrustedImm32(-1), Address(output, (i << 1) * sizeof(int))); Executed by:
| 1148639 | ||||||||||||||||||||||||
2272 | } executed 1149361 times by 153 tests: end of block Executed by:
| 1149361 | ||||||||||||||||||||||||
2273 | - | |||||||||||||||||||||||||
2274 | if (!m_pattern.m_body->m_hasFixedSize
| 1257-1148427 | ||||||||||||||||||||||||
2275 | setMatchStart(index); executed 1257 times by 8 tests: setMatchStart(index); Executed by:
| 1257 | ||||||||||||||||||||||||
2276 | - | |||||||||||||||||||||||||
2277 | initCallFrame(); | - | ||||||||||||||||||||||||
2278 | - | |||||||||||||||||||||||||
2279 | - | |||||||||||||||||||||||||
2280 | opCompileBody(m_pattern.m_body); | - | ||||||||||||||||||||||||
2281 | - | |||||||||||||||||||||||||
2282 | - | |||||||||||||||||||||||||
2283 | - | |||||||||||||||||||||||||
2284 | if (m_shouldFallBack
| 124-1150024 | ||||||||||||||||||||||||
2285 | jitObject.setFallBack(true); | - | ||||||||||||||||||||||||
2286 | return; executed 124 times by 1 test: return; Executed by:
| 124 | ||||||||||||||||||||||||
2287 | } | - | ||||||||||||||||||||||||
2288 | - | |||||||||||||||||||||||||
2289 | generate(); | - | ||||||||||||||||||||||||
2290 | backtrack(); | - | ||||||||||||||||||||||||
2291 | - | |||||||||||||||||||||||||
2292 | - | |||||||||||||||||||||||||
2293 | LinkBuffer<JSC::DefaultMacroAssembler> linkBuffer(*globalData, this, reinterpret_cast<void*>(static_cast<intptr_t>(-2))); | - | ||||||||||||||||||||||||
2294 | m_backtrackingState.linkDataLabels(linkBuffer); | - | ||||||||||||||||||||||||
2295 | - | |||||||||||||||||||||||||
2296 | if (compileMode == MatchOnly
| 0-1150905 | ||||||||||||||||||||||||
2297 | if (m_charSize == Char8
| 0 | ||||||||||||||||||||||||
2298 | jitObject.set8BitCodeMatchOnly((__builtin_expect(((Options::showDisassembly())), 0) ? ((linkBuffer).finalizeCodeWithDisassembly ("Match-only 8-bit regular expression")) : (linkBuffer).finalizeCodeWithoutDisassembly())); never executed: jitObject.set8BitCodeMatchOnly((__builtin_expect(((Options::showDisassembly())), 0) ? ((linkBuffer).finalizeCodeWithDisassembly ("Match-only 8-bit regular expression")) : (linkBuffer).finalizeCodeWithoutDisassembly())); | 0 | ||||||||||||||||||||||||
2299 | else | - | ||||||||||||||||||||||||
2300 | jitObject.set16BitCodeMatchOnly((__builtin_expect(((Options::showDisassembly())), 0) ? ((linkBuffer).finalizeCodeWithDisassembly ("Match-only 16-bit regular expression")) : (linkBuffer).finalizeCodeWithoutDisassembly())); never executed: jitObject.set16BitCodeMatchOnly((__builtin_expect(((Options::showDisassembly())), 0) ? ((linkBuffer).finalizeCodeWithDisassembly ("Match-only 16-bit regular expression")) : (linkBuffer).finalizeCodeWithoutDisassembly())); | 0 | ||||||||||||||||||||||||
2301 | } else { | - | ||||||||||||||||||||||||
2302 | if (m_charSize == Char8
| 0-1150890 | ||||||||||||||||||||||||
2303 | jitObject.set8BitCode((__builtin_expect(((Options::showDisassembly())), 0) ? ((linkBuffer).finalizeCodeWithDisassembly ("8-bit regular expression")) : (linkBuffer).finalizeCodeWithoutDisassembly())); never executed: jitObject.set8BitCode((__builtin_expect(((Options::showDisassembly())), 0) ? ((linkBuffer).finalizeCodeWithDisassembly ("8-bit regular expression")) : (linkBuffer).finalizeCodeWithoutDisassembly())); | 0 | ||||||||||||||||||||||||
2304 | else | - | ||||||||||||||||||||||||
2305 | jitObject.set16BitCode((__builtin_expect(((Options::showDisassembly())), 0) ? ((linkBuffer).finalizeCodeWithDisassembly ("16-bit regular expression")) : (linkBuffer).finalizeCodeWithoutDisassembly())); executed 1150849 times by 153 tests: jitObject.set16BitCode((__builtin_expect(((Options::showDisassembly())), 0) ? ((linkBuffer).finalizeCodeWithDisassembly ("16-bit regular expression")) : (linkBuffer).finalizeCodeWithoutDisassembly())); Executed by:
| 1150849 | ||||||||||||||||||||||||
2306 | } | - | ||||||||||||||||||||||||
2307 | jitObject.setFallBack(m_shouldFallBack); | - | ||||||||||||||||||||||||
2308 | } executed 1151302 times by 153 tests: end of block Executed by:
| 1151302 | ||||||||||||||||||||||||
2309 | - | |||||||||||||||||||||||||
2310 | private: | - | ||||||||||||||||||||||||
2311 | YarrPattern& m_pattern; | - | ||||||||||||||||||||||||
2312 | - | |||||||||||||||||||||||||
2313 | YarrCharSize m_charSize; | - | ||||||||||||||||||||||||
2314 | - | |||||||||||||||||||||||||
2315 | Scale m_charScale; | - | ||||||||||||||||||||||||
2316 | - | |||||||||||||||||||||||||
2317 | - | |||||||||||||||||||||||||
2318 | - | |||||||||||||||||||||||||
2319 | bool m_shouldFallBack; | - | ||||||||||||||||||||||||
2320 | - | |||||||||||||||||||||||||
2321 | - | |||||||||||||||||||||||||
2322 | Vector<YarrOp, 128> m_ops; | - | ||||||||||||||||||||||||
2323 | int m_checked; | - | ||||||||||||||||||||||||
2324 | - | |||||||||||||||||||||||||
2325 | - | |||||||||||||||||||||||||
2326 | BacktrackingState m_backtrackingState; | - | ||||||||||||||||||||||||
2327 | }; | - | ||||||||||||||||||||||||
2328 | - | |||||||||||||||||||||||||
2329 | void jitCompile(YarrPattern& pattern, YarrCharSize charSize, JSGlobalData* globalData, YarrCodeBlock& jitObject, YarrJITCompileMode mode) | - | ||||||||||||||||||||||||
2330 | { | - | ||||||||||||||||||||||||
2331 | if (mode == MatchOnly
| 0-1148484 | ||||||||||||||||||||||||
2332 | YarrGenerator<MatchOnly>(pattern, charSize).compile(globalData, jitObject); never executed: YarrGenerator<MatchOnly>(pattern, charSize).compile(globalData, jitObject); | 0 | ||||||||||||||||||||||||
2333 | else | - | ||||||||||||||||||||||||
2334 | YarrGenerator<IncludeSubpatterns>(pattern, charSize).compile(globalData, jitObject); executed 1148533 times by 153 tests: YarrGenerator<IncludeSubpatterns>(pattern, charSize).compile(globalData, jitObject); Executed by:
| 1148533 | ||||||||||||||||||||||||
2335 | } | - | ||||||||||||||||||||||||
2336 | - | |||||||||||||||||||||||||
2337 | }} | - | ||||||||||||||||||||||||
Switch to Source code | Preprocessed file |