OpenCoverage

YarrJIT.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/3rdparty/masm/yarr/YarrJIT.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/*-
2 * Copyright (C) 2009, 2013 Apple Inc. All rights reserved.-
3 *-
4 * Redistribution and use in source and binary forms, with or without-
5 * modification, are permitted provided that the following conditions-
6 * are met:-
7 * 1. Redistributions of source code must retain the above copyright-
8 * notice, this list of conditions and the following disclaimer.-
9 * 2. Redistributions in binary form must reproduce the above copyright-
10 * notice, this list of conditions and the following disclaimer in the-
11 * documentation and/or other materials provided with the distribution.-
12 *-
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY-
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE-
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR-
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR-
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,-
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,-
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR-
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY-
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT-
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE-
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -
24 */-
25-
26#include "config.h"-
27#include "YarrJIT.h"-
28#include <wtf/ASCIICType.h>-
29#include "Options.h"-
30#include "Yarr.h"-
31#include "YarrCanonicalizeUCS2.h"-
32-
33#if ENABLE(YARR_JIT)-
34-
35#include "LinkBuffer.h"-
36-
37using namespace WTF;-
38-
39namespace JSC { namespace Yarr {-
40-
41template<YarrJITCompileMode compileMode>-
42class YarrGenerator : private DefaultMacroAssembler {-
43 friend void jitCompile(JSGlobalData*, YarrCodeBlock& jitObject, const String& pattern, unsigned& numSubpatterns, const char*& error, bool ignoreCase, bool multiline);-
44-
45#if CPU(ARM)-
46 static const RegisterID input = ARMRegisters::r0;-
47 static const RegisterID index = ARMRegisters::r1;-
48 static const RegisterID length = ARMRegisters::r2;-
49 static const RegisterID output = ARMRegisters::r3;-
50-
51 static const RegisterID regT0 = ARMRegisters::r4;-
52 static const RegisterID regT1 = ARMRegisters::r5;-
53-
54 static const RegisterID returnRegister = ARMRegisters::r0;-
55 static const RegisterID returnRegister2 = ARMRegisters::r1;-
56#elif CPU(ARM64)-
57 static const RegisterID input = ARM64Registers::x0;-
58 static const RegisterID index = ARM64Registers::x1;-
59 static const RegisterID length = ARM64Registers::x2;-
60 static const RegisterID output = ARM64Registers::x3;-
61-
62 static const RegisterID regT0 = ARM64Registers::x4;-
63 static const RegisterID regT1 = ARM64Registers::x5;-
64-
65 static const RegisterID returnRegister = ARM64Registers::x0;-
66 static const RegisterID returnRegister2 = ARM64Registers::x1;-
67#elif CPU(MIPS)-
68 static const RegisterID input = MIPSRegisters::a0;-
69 static const RegisterID index = MIPSRegisters::a1;-
70 static const RegisterID length = MIPSRegisters::a2;-
71 static const RegisterID output = MIPSRegisters::a3;-
72-
73 static const RegisterID regT0 = MIPSRegisters::t4;-
74 static const RegisterID regT1 = MIPSRegisters::t5;-
75-
76 static const RegisterID returnRegister = MIPSRegisters::v0;-
77 static const RegisterID returnRegister2 = MIPSRegisters::v1;-
78#elif CPU(SH4)-
79 static const RegisterID input = SH4Registers::r4;-
80 static const RegisterID index = SH4Registers::r5;-
81 static const RegisterID length = SH4Registers::r6;-
82 static const RegisterID output = SH4Registers::r7;-
83-
84 static const RegisterID regT0 = SH4Registers::r0;-
85 static const RegisterID regT1 = SH4Registers::r1;-
86-
87 static const RegisterID returnRegister = SH4Registers::r0;-
88 static const RegisterID returnRegister2 = SH4Registers::r1;-
89#elif CPU(X86)-
90 static const RegisterID input = X86Registers::eax;-
91 static const RegisterID index = X86Registers::edx;-
92 static const RegisterID length = X86Registers::ecx;-
93 static const RegisterID output = X86Registers::edi;-
94-
95 static const RegisterID regT0 = X86Registers::ebx;-
96 static const RegisterID regT1 = X86Registers::esi;-
97-
98 static const RegisterID returnRegister = X86Registers::eax;-
99 static const RegisterID returnRegister2 = X86Registers::edx;-
100#elif CPU(X86_64)-
101#if !OS(WINDOWS)-
102 static const RegisterID input = X86Registers::edi;-
103 static const RegisterID index = X86Registers::esi;-
104 static const RegisterID length = X86Registers::edx;-
105 static const RegisterID output = X86Registers::ecx;-
106#else-
107 // If the return value doesn't fit in 64bits, its destination is pointed by rcx and the parameters are shifted.-
108 // http://msdn.microsoft.com/en-us/library/7572ztz4.aspx-
109 COMPILE_ASSERT(sizeof(MatchResult) > sizeof(void*), MatchResult_does_not_fit_in_64bits);-
110 static const RegisterID input = X86Registers::edx;-
111 static const RegisterID index = X86Registers::r8;-
112 static const RegisterID length = X86Registers::r9;-
113 static const RegisterID output = X86Registers::r10;-
114#endif-
115-
116 static const RegisterID regT0 = X86Registers::eax;-
117 static const RegisterID regT1 = X86Registers::ebx;-
118-
119 static const RegisterID returnRegister = X86Registers::eax;-
120 static const RegisterID returnRegister2 = X86Registers::edx;-
121#endif-
122-
123 void optimizeAlternative(PatternAlternative* alternative)-
124 {-
125 if (!alternative->m_terms.size())
!alternative->m_terms.size()Description
TRUEevaluated 98105 times by 153 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
FALSEevaluated 1052025 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
98105-1052025
126 return;
executed 98086 times by 153 tests: return;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
98086
127-
128 for (unsigned i = 0; i < alternative->m_terms.size() - 1; ++i) {
i < alternativ...rms.size() - 1Description
TRUEevaluated 1321864 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEevaluated 1054988 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
1054988-1321864
129 PatternTerm& term = alternative->m_terms[i];-
130 PatternTerm& nextTerm = alternative->m_terms[i + 1];-
131-
132 if ((term.type == PatternTerm::TypeCharacterClass)
(term.type == ...haracterClass)Description
TRUEevaluated 2994 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEevaluated 1318854 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
2994-1318854
133 && (term.quantityType == QuantifierFixedCount)
(term.quantity...ierFixedCount)Description
TRUEevaluated 1425 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEevaluated 1570 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
1425-1570
134 && (nextTerm.type == PatternTerm::TypePatternCharacter)
(nextTerm.type...ternCharacter)Description
TRUEevaluated 458 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 968 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
458-968
135 && (nextTerm.quantityType == QuantifierFixedCount)) {
(nextTerm.quan...ierFixedCount)Description
TRUEevaluated 454 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
4-454
136 PatternTerm termCopy = term;-
137 alternative->m_terms[i] = nextTerm;-
138 alternative->m_terms[i + 1] = termCopy;-
139 }
executed 454 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
454
140 }
executed 1321828 times by 8 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
1321828
141 }
executed 1054186 times by 9 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
1054186
142-
143 void matchCharacterClassRange(RegisterID character, JumpList& failures, JumpList& matchDest, const CharacterRange* ranges, unsigned count, unsigned* matchIndex, const UChar* matches, unsigned matchCount)-
144 {-
145 do {-
146 // pick which range we're going to generate-
147 int which = count >> 1;-
148 char lo = ranges[which].begin;-
149 char hi = ranges[which].end;-
150-
151 // check if there are any ranges or matches below lo. If not, just jl to failure --
152 // if there is anything else to check, check that first, if it falls through jmp to failure.-
153 if ((*matchIndex < matchCount) && (matches[*matchIndex] < lo)) {
(*matchIndex < matchCount)Description
TRUEevaluated 2896 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 933 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
  • tst_qquickworkerscript
(matches[*matchIndex] < lo)Description
TRUEevaluated 1468 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1428 times by 1 test
Evaluated by:
  • tst_ecmascripttests
933-2896
154 Jump loOrAbove = branch32(GreaterThanOrEqual, character, Imm32((unsigned short)lo));-
155-
156 // generate code for all ranges before this one-
157 if (which)
whichDescription
TRUEevaluated 1423 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 44 times by 1 test
Evaluated by:
  • tst_ecmascripttests
44-1423
158 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:
  • tst_ecmascripttests
1423
159-
160 while ((*matchIndex < matchCount) && (matches[*matchIndex] < lo)) {
(*matchIndex < matchCount)Description
TRUEevaluated 1508 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1439 times by 1 test
Evaluated by:
  • tst_ecmascripttests
(matches[*matchIndex] < lo)Description
TRUEevaluated 1480 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
28-1508
161 matchDest.append(branch32(Equal, character, Imm32((unsigned short)matches[*matchIndex])));-
162 ++*matchIndex;-
163 }
executed 1479 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
1479
164 failures.append(jump());-
165-
166 loOrAbove.link(this);-
167 } else if (which) {
executed 1467 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
whichDescription
TRUEevaluated 60 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
FALSEevaluated 2305 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
  • tst_qquickworkerscript
60-2305
168 Jump loOrAbove = branch32(GreaterThanOrEqual, character, Imm32((unsigned short)lo));-
169-
170 matchCharacterClassRange(character, failures, matchDest, ranges, which, matchIndex, matches, matchCount);-
171 failures.append(jump());-
172-
173 loOrAbove.link(this);-
174 } else
executed 60 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
60
175 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:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
  • tst_qquickworkerscript
2306
176-
177 while ((*matchIndex < matchCount) && (matches[*matchIndex] <= hi))
(*matchIndex < matchCount)Description
TRUEevaluated 1456 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2380 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
  • tst_qquickworkerscript
(matches[*matchIndex] <= hi)Description
TRUEnever evaluated
FALSEevaluated 1456 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-2380
178 ++*matchIndex;
never executed: ++*matchIndex;
0
179-
180 matchDest.append(branch32(LessThanOrEqual, character, Imm32((unsigned short)hi)));-
181 // fall through to here, the value is above hi.-
182-
183 // shuffle along & loop around if there are any more matches to handle.-
184 unsigned next = which + 1;-
185 ranges += next;-
186 count -= next;-
187 } while (count);
executed 3837 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
  • tst_qquickworkerscript
countDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 3825 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
  • tst_qquickworkerscript
12-3837
188 }
executed 3824 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
  • tst_qquickworkerscript
3824
189-
190 void matchCharacterClass(RegisterID character, JumpList& matchDest, const CharacterClass* charClass)-
191 {-
192 if (charClass->m_table) {
charClass->m_tableDescription
TRUEevaluated 3755 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
FALSEevaluated 3414 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
3414-3755
193 ExtendedAddress tableEntry(character, reinterpret_cast<intptr_t>(charClass->m_table));-
194 matchDest.append(branchTest8(charClass->m_tableInverted ? Zero : NonZero, tableEntry));-
195 return;
executed 3757 times by 3 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
3757
196 }-
197 Jump unicodeFail;-
198 if (charClass->m_matchesUnicode.size() || charClass->m_rangesUnicode.size()) {
charClass->m_m...Unicode.size()Description
TRUEevaluated 2081 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
FALSEevaluated 1335 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
  • tst_qquickworkerscript
charClass->m_r...Unicode.size()Description
TRUEnever evaluated
FALSEevaluated 1341 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
  • tst_qquickworkerscript
0-2081
199 Jump isAscii = branch32(LessThanOrEqual, character, TrustedImm32(0x7f));-
200-
201 if (charClass->m_matchesUnicode.size()) {
charClass->m_m...Unicode.size()Description
TRUEevaluated 2086 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
FALSEnever evaluated
0-2086
202 for (unsigned i = 0; i < charClass->m_matchesUnicode.size(); ++i) {
i < charClass-...Unicode.size()Description
TRUEevaluated 14040 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
FALSEevaluated 2088 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
2088-14040
203 UChar ch = charClass->m_matchesUnicode[i];-
204 matchDest.append(branch32(Equal, character, Imm32(ch)));-
205 }
executed 14042 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
14042
206 }
executed 2088 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
2088
207-
208 if (charClass->m_rangesUnicode.size()) {
charClass->m_r...Unicode.size()Description
TRUEevaluated 1416 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 672 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
672-1416
209 for (unsigned i = 0; i < charClass->m_rangesUnicode.size(); ++i) {
i < charClass-...Unicode.size()Description
TRUEevaluated 12631 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1415 times by 1 test
Evaluated by:
  • tst_ecmascripttests
1415-12631
210 UChar lo = charClass->m_rangesUnicode[i].begin;-
211 UChar hi = charClass->m_rangesUnicode[i].end;-
212-
213 Jump below = branch32(LessThan, character, Imm32(lo));-
214 matchDest.append(branch32(LessThanOrEqual, character, Imm32(hi)));-
215 below.link(this);-
216 }
executed 12627 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
12627
217 }
executed 1415 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
1415
218-
219 unicodeFail = jump();-
220 isAscii.link(this);-
221 }
executed 2086 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
2086
222-
223 if (charClass->m_ranges.size()) {
charClass->m_ranges.size()Description
TRUEevaluated 2338 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEevaluated 1089 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
  • tst_qquicktextinput
1089-2338
224 unsigned matchIndex = 0;-
225 JumpList failures;-
226 ASSERT(charClass->m_ranges.size() <= UINT_MAX);-
227 matchCharacterClassRange(character, failures, matchDest, &charClass->m_ranges[0],-
228 static_cast<unsigned>(charClass->m_ranges.size()),-
229 &matchIndex, charClass->m_matches.isEmpty() ? 0 : &charClass->m_matches[0],-
230 static_cast<unsigned>(charClass->m_matches.size()));-
231 while (matchIndex < charClass->m_matches.size())
matchIndex < c...matches.size()Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2341 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
  • tst_qquickworkerscript
16-2341
232 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:
  • tst_ecmascripttests
16
233-
234 failures.link(this);-
235 } else if (charClass->m_matches.size()) {
executed 2338 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
  • tst_qquickworkerscript
charClass->m_matches.size()Description
TRUEevaluated 1059 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
  • tst_qquicktextinput
FALSEevaluated 27 times by 1 test
Evaluated by:
  • tst_ecmascripttests
27-2338
236 // optimization: gather 'a','A' etc back together, can mask & test once.-
237 Vector<char> matchesAZaz;-
238-
239 for (unsigned i = 0; i < charClass->m_matches.size(); ++i) {
i < charClass-...matches.size()Description
TRUEevaluated 2403 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
  • tst_qquicktextinput
FALSEevaluated 1064 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
  • tst_qquicktextinput
1064-2403
240 char ch = charClass->m_matches[i];-
241 if (m_pattern.m_ignoreCase) {
m_pattern.m_ignoreCaseDescription
TRUEevaluated 24 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 2382 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
  • tst_qquicktextinput
24-2382
242 if (isASCIILower(ch)) {
isASCIILower(ch)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 20 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
4-20
243 matchesAZaz.append(ch);-
244 continue;
executed 4 times by 1 test: continue;
Executed by:
  • tst_ecmascripttests
4
245 }-
246 if (isASCIIUpper(ch))
isASCIIUpper(ch)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 16 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
4-16
247 continue;
executed 4 times by 1 test: continue;
Executed by:
  • tst_ecmascripttests
4
248 }
executed 16 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
16
249 matchDest.append(branch32(Equal, character, Imm32((unsigned short)ch)));-
250 }
executed 2399 times by 4 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
  • tst_qquicktextinput
2399
251-
252 ASSERT(matchesAZaz.size() <= UINT_MAX);-
253 if (unsigned countAZaz = static_cast<int>(matchesAZaz.size())) {
unsigned count...esAZaz.size())Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1060 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
  • tst_qquicktextinput
4-1060
254 or32(TrustedImm32(32), character);-
255 for (unsigned i = 0; i < countAZaz; ++i)
i < countAZazDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
4
256 matchDest.append(branch32(Equal, character, TrustedImm32(matchesAZaz[i])));
executed 4 times by 1 test: matchDest.append(branch32(Equal, character, TrustedImm32(matchesAZaz[i])));
Executed by:
  • tst_ecmascripttests
4
257 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
4
258 }
executed 1064 times by 4 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
  • tst_qquicktextinput
1064
259-
260 if (charClass->m_matchesUnicode.size() || charClass->m_rangesUnicode.size())
charClass->m_m...Unicode.size()Description
TRUEevaluated 2083 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
FALSEevaluated 1342 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
  • tst_qquickworkerscript
charClass->m_r...Unicode.size()Description
TRUEnever evaluated
FALSEevaluated 1343 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
  • tst_qquickworkerscript
0-2083
261 unicodeFail.link(this);
executed 2085 times by 3 tests: unicodeFail.link(this);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
2085
262 }
executed 3429 times by 8 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
3429
263-
264 // Jumps if input not available; will have (incorrectly) incremented already!-
265 Jump jumpIfNoAvailableInput(unsigned countToCheck = 0)-
266 {-
267 if (countToCheck)
countToCheckDescription
TRUEevaluated 1050406 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEevaluated 1248657 times by 153 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1050406-1248657
268 add32(Imm32(countToCheck), index);
executed 1050561 times by 9 tests: add32(Imm32(countToCheck), index);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
1050561
269 return branch32(Above, index, length);
executed 2299917 times by 153 tests: return branch32(Above, index, length);
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
2299917
270 }-
271-
272 Jump jumpIfAvailableInput(unsigned countToCheck)-
273 {-
274 add32(Imm32(countToCheck), index);-
275 return branch32(BelowOrEqual, index, length);
never executed: return branch32(BelowOrEqual, index, length);
0
276 }-
277-
278 Jump checkInput()-
279 {-
280 return branch32(BelowOrEqual, index, length);
executed 2298223 times by 153 tests: return branch32(BelowOrEqual, index, length);
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
2298223
281 }-
282-
283 Jump atEndOfInput()-
284 {-
285 return branch32(Equal, index, length);
executed 2445 times by 8 tests: return branch32(Equal, index, length);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
2445
286 }-
287-
288 Jump notAtEndOfInput()-
289 {-
290 return branch32(NotEqual, index, length);
executed 139 times by 5 tests: return branch32(NotEqual, index, length);
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
139
291 }-
292-
293 Jump jumpIfCharNotEquals(UChar ch, int inputPosition, RegisterID character)-
294 {-
295 readCharacter(inputPosition, character);-
296-
297 // For case-insesitive compares, non-ascii characters that have different-
298 // upper & lower case representations are converted to a character class.-
299 ASSERT(!m_pattern.m_ignoreCase || isASCIIAlpha(ch) || isCanonicallyUnique(ch));-
300 if (m_pattern.m_ignoreCase && isASCIIAlpha(ch)) {
m_pattern.m_ignoreCaseDescription
TRUEevaluated 110 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
FALSEevaluated 789400 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
isASCIIAlpha(ch)Description
TRUEevaluated 78 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
FALSEevaluated 32 times by 1 test
Evaluated by:
  • tst_ecmascripttests
32-789400
301 or32(TrustedImm32(0x20), character);-
302 ch |= 0x20;-
303 }
executed 78 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
78
304-
305 return branch32(NotEqual, character, Imm32(ch));
executed 789898 times by 5 tests: return branch32(NotEqual, character, Imm32(ch));
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
789898
306 }-
307-
308 void readCharacter(int inputPosition, RegisterID reg)-
309 {-
310 if (m_charSize == Char8)
m_charSize == Char8Description
TRUEnever evaluated
FALSEevaluated 796356 times by 9 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
0-796356
311 load8(BaseIndex(input, index, TimesOne, inputPosition * sizeof(char)), reg);
never executed: load8(BaseIndex(input, index, TimesOne, inputPosition * sizeof(char)), reg);
0
312 else-
313 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:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
796380
314 }-
315-
316 void storeToFrame(RegisterID reg, unsigned frameLocation)-
317 {-
318 poke(reg, frameLocation);-
319 }
executed 2414 times by 8 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
2414
320-
321 void storeToFrame(TrustedImm32 imm, unsigned frameLocation)-
322 {-
323 poke(imm, frameLocation);-
324 }
executed 130 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qquicktextinput
130
325-
326 DataLabelPtr storeToFrameWithPatch(unsigned frameLocation)-
327 {-
328 return storePtrWithPatch(TrustedImmPtr(0), Address(stackPointerRegister, frameLocation * sizeof(void*)));
executed 511 times by 3 tests: return storePtrWithPatch(TrustedImmPtr(0), Address(stackPointerRegister, frameLocation * sizeof(void*)));
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
511
329 }-
330-
331 void loadFromFrame(unsigned frameLocation, RegisterID reg)-
332 {-
333 peek(reg, frameLocation);-
334 }
executed 2274 times by 8 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
2274
335-
336 void loadFromFrameAndJump(unsigned frameLocation)-
337 {-
338 jump(Address(stackPointerRegister, frameLocation * sizeof(void*)));-
339 }
executed 164 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
164
340-
341 unsigned alignCallFrameSizeInBytes(unsigned callFrameSize)-
342 {-
343 callFrameSize *= sizeof(void*);-
344 if (callFrameSize / sizeof(void*) != m_pattern.m_body->m_callFrameSize)
callFrameSize ..._callFrameSizeDescription
TRUEnever evaluated
FALSEevaluated 3198 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
0-3198
345 CRASH();
never executed: (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap());
0
346 // Originally, the code was:-
347// callFrameSize = (callFrameSize + 0x3f) & ~0x3f;-
348 // However, 64 bytes is a bit surprising. The biggest "alignment" requirement is on Aarch64, where:-
349 // "SP mod 16 = 0. The stack must be quad-word aligned." (IHI0055B_aapcs64.pdf)-
350 callFrameSize = (callFrameSize + 0xf) & ~0xf;-
351 if (!callFrameSize)
!callFrameSizeDescription
TRUEnever evaluated
FALSEevaluated 3199 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
0-3199
352 CRASH();
never executed: (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap());
0
353 return callFrameSize;
executed 3196 times by 8 tests: return callFrameSize;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
3196
354 }-
355 void initCallFrame()-
356 {-
357 unsigned callFrameSize = m_pattern.m_body->m_callFrameSize;-
358 if (callFrameSize)
callFrameSizeDescription
TRUEevaluated 1138 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEevaluated 1145957 times by 153 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1138-1145957
359 subPtr(Imm32(alignCallFrameSizeInBytes(callFrameSize)), stackPointerRegister);
executed 1139 times by 8 tests: subPtr(Imm32(alignCallFrameSizeInBytes(callFrameSize)), stackPointerRegister);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
1139
360 }
executed 1146835 times by 153 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1146835
361 void removeCallFrame()-
362 {-
363 unsigned callFrameSize = m_pattern.m_body->m_callFrameSize;-
364 if (callFrameSize)
callFrameSizeDescription
TRUEevaluated 2067 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEevaluated 2299007 times by 153 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
2067-2299007
365 addPtr(Imm32(alignCallFrameSizeInBytes(callFrameSize)), stackPointerRegister);
executed 2067 times by 8 tests: addPtr(Imm32(alignCallFrameSizeInBytes(callFrameSize)), stackPointerRegister);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
2067
366 }
executed 2301104 times by 153 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
2301104
367-
368 // Used to record subpatters, should only be called if compileMode is IncludeSubpatterns.-
369 void setSubpatternStart(RegisterID reg, unsigned subpattern)-
370 {-
371 ASSERT(subpattern);-
372 // FIXME: should be able to ASSERT(compileMode == IncludeSubpatterns), but then this function is conditionally NORETURN. :-(-
373 store32(reg, Address(output, (subpattern << 1) * sizeof(int)));-
374 }
executed 1478 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
1478
375 void setSubpatternEnd(RegisterID reg, unsigned subpattern)-
376 {-
377 ASSERT(subpattern);-
378 // FIXME: should be able to ASSERT(compileMode == IncludeSubpatterns), but then this function is conditionally NORETURN. :-(-
379 store32(reg, Address(output, ((subpattern << 1) + 1) * sizeof(int)));-
380 }
executed 1478 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
1478
381 void clearSubpatternStart(unsigned subpattern)-
382 {-
383 ASSERT(subpattern);-
384 // FIXME: should be able to ASSERT(compileMode == IncludeSubpatterns), but then this function is conditionally NORETURN. :-(-
385 store32(TrustedImm32(-1), Address(output, (subpattern << 1) * sizeof(int)));-
386 }
executed 1476 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
1476
387-
388 // We use one of three different strategies to track the start of the current match,-
389 // while matching.-
390 // 1) If the pattern has a fixed size, do nothing! - we calculate the value lazily-
391 // at the end of matching. This is irrespective of compileMode, and in this case-
392 // these methods should never be called.-
393 // 2) If we're compiling IncludeSubpatterns, 'output' contains a pointer to an output-
394 // vector, store the match start in the output vector.-
395 // 3) If we're compiling MatchOnly, 'output' is unused, store the match start directly-
396 // in this register.-
397 void setMatchStart(RegisterID reg)-
398 {-
399 ASSERT(!m_pattern.m_body->m_hasFixedSize);-
400 if (compileMode == IncludeSubpatterns)
compileMode ==...udeSubpatternsDescription
TRUEevaluated 3424 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEnever evaluated
0-3424
401 store32(reg, output);
executed 3422 times by 8 tests: store32(reg, output);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
3422
402 else-
403 move(reg, output);
never executed: move(reg, output);
0
404 }-
405 void getMatchStart(RegisterID reg)-
406 {-
407 ASSERT(!m_pattern.m_body->m_hasFixedSize);-
408 if (compileMode == IncludeSubpatterns)
compileMode ==...udeSubpatternsDescription
TRUEevaluated 1197 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEnever evaluated
0-1197
409 load32(output, reg);
executed 1197 times by 8 tests: load32(output, reg);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
1197
410 else-
411 move(output, reg);
never executed: move(output, reg);
0
412 }-
413-
414 enum YarrOpCode {-
415 // These nodes wrap body alternatives - those in the main disjunction,-
416 // rather than subpatterns or assertions. These are chained together in-
417 // a doubly linked list, with a 'begin' node for the first alternative,-
418 // a 'next' node for each subsequent alternative, and an 'end' node at-
419 // the end. In the case of repeating alternatives, the 'end' node also-
420 // has a reference back to 'begin'.-
421 OpBodyAlternativeBegin,-
422 OpBodyAlternativeNext,-
423 OpBodyAlternativeEnd,-
424 // Similar to the body alternatives, but used for subpatterns with two-
425 // or more alternatives.-
426 OpNestedAlternativeBegin,-
427 OpNestedAlternativeNext,-
428 OpNestedAlternativeEnd,-
429 // Used for alternatives in subpatterns where there is only a single-
430 // alternative (backtrackingis easier in these cases), or for alternatives-
431 // which never need to be backtracked (those in parenthetical assertions,-
432 // terminal subpatterns).-
433 OpSimpleNestedAlternativeBegin,-
434 OpSimpleNestedAlternativeNext,-
435 OpSimpleNestedAlternativeEnd,-
436 // Used to wrap 'Once' subpattern matches (quantityCount == 1).-
437 OpParenthesesSubpatternOnceBegin,-
438 OpParenthesesSubpatternOnceEnd,-
439 // Used to wrap 'Terminal' subpattern matches (at the end of the regexp).-
440 OpParenthesesSubpatternTerminalBegin,-
441 OpParenthesesSubpatternTerminalEnd,-
442 // Used to wrap parenthetical assertions.-
443 OpParentheticalAssertionBegin,-
444 OpParentheticalAssertionEnd,-
445 // Wraps all simple terms (pattern characters, character classes).-
446 OpTerm,-
447 // Where an expression contains only 'once through' body alternatives-
448 // and no repeating ones, this op is used to return match failure.-
449 OpMatchFailed-
450 };-
451-
452 // This structure is used to hold the compiled opcode information,-
453 // including reference back to the original PatternTerm/PatternAlternatives,-
454 // and JIT compilation data structures.-
455 struct YarrOp {-
456 explicit YarrOp(PatternTerm* term)-
457 : m_op(OpTerm)-
458 , m_term(term)-
459 , m_isDeadCode(false)-
460 {-
461 }
executed 2373561 times by 9 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
2373561
462-
463 explicit YarrOp(YarrOpCode op)-
464 : m_op(op)-
465 , m_isDeadCode(false)-
466 {-
467 }
executed 2312673 times by 153 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
2312673
468-
469 // The operation, as a YarrOpCode, and also a reference to the PatternTerm.-
470 YarrOpCode m_op;-
471 PatternTerm* m_term = nullptr;-
472-
473 // For alternatives, this holds the PatternAlternative and doubly linked-
474 // references to this alternative's siblings. In the case of the-
475 // OpBodyAlternativeEnd node at the end of a section of repeating nodes,-
476 // m_nextOp will reference the OpBodyAlternativeBegin node of the first-
477 // repeating alternative.-
478 PatternAlternative* m_alternative = nullptr;-
479 size_t m_previousOp = 0;-
480 size_t m_nextOp = 0;-
481-
482 // Used to record a set of Jumps out of the generated code, typically-
483 // used for jumps out to backtracking code, and a single reentry back-
484 // into the code for a node (likely where a backtrack will trigger-
485 // rematching).-
486 Label m_reentry;-
487 JumpList m_jumps;-
488-
489 // Used for backtracking when the prior alternative did not consume any-
490 // characters but matched.-
491 Jump m_zeroLengthMatch;-
492-
493 // This flag is used to null out the second pattern character, when-
494 // two are fused to match a pair together.-
495 bool m_isDeadCode;-
496-
497 // Currently used in the case of some of the more complex management of-
498 // 'm_checked', to cache the offset used in this alternative, to avoid-
499 // recalculating it.-
500 int m_checkAdjust;-
501-
502 // Used by OpNestedAlternativeNext/End to hold the pointer to the-
503 // value that will be pushed into the pattern's frame to return to,-
504 // upon backtracking back into the disjunction.-
505 DataLabelPtr m_returnAddress;-
506 };-
507-
508 // BacktrackingState-
509 // This class encapsulates information about the state of code generation-
510 // whilst generating the code for backtracking, when a term fails to match.-
511 // Upon entry to code generation of the backtracking code for a given node,-
512 // the Backtracking state will hold references to all control flow sources-
513 // that are outputs in need of further backtracking from the prior node-
514 // generated (which is the subsequent operation in the regular expression,-
515 // and in the m_ops Vector, since we generated backtracking backwards).-
516 // These references to control flow take the form of:-
517 // - A jump list of jumps, to be linked to code that will backtrack them-
518 // further.-
519 // - A set of DataLabelPtr values, to be populated with values to be-
520 // treated effectively as return addresses backtracking into complex-
521 // subpatterns.-
522 // - A flag indicating that the current sequence of generated code up to-
523 // this point requires backtracking.-
524 class BacktrackingState {-
525 public:-
526 BacktrackingState()-
527 : m_pendingFallthrough(false)-
528 {-
529 }
executed 1148632 times by 153 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1148632
530-
531 // Add a jump or jumps, a return address, or set the flag indicating-
532 // that the current 'fallthrough' control flow requires backtracking.-
533 void append(const Jump& jump)-
534 {-
535 m_laterFailures.append(jump);-
536 }
executed 2176 times by 8 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
2176
537 void append(JumpList& jumpList)-
538 {-
539 m_laterFailures.append(jumpList);-
540 }
executed 2379600 times by 9 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
2379600
541 void append(const DataLabelPtr& returnAddress)-
542 {-
543 m_pendingReturns.append(returnAddress);-
544 }
executed 512 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
512
545 void fallthrough()-
546 {-
547 ASSERT(!m_pendingFallthrough);-
548 m_pendingFallthrough = true;-
549 }
executed 1854 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
1854
550-
551 // These methods clear the backtracking state, either linking to the-
552 // current location, a provided label, or copying the backtracking out-
553 // to a JumpList. All actions may require code generation to take place,-
554 // and as such are passed a pointer to the assembler.-
555 void link(MacroAssembler* assembler)-
556 {-
557 if (m_pendingReturns.size()) {
m_pendingReturns.size()Description
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 1154950 times by 153 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
76-1154950
558 Label here(assembler);-
559 for (unsigned i = 0; i < m_pendingReturns.size(); ++i)
i < m_pendingReturns.size()Description
TRUEevaluated 76 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 76 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
76
560 m_backtrackRecords.append(ReturnAddressRecord(m_pendingReturns[i], here));
executed 76 times by 3 tests: m_backtrackRecords.append(ReturnAddressRecord(m_pendingReturns[i], here));
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
76
561 m_pendingReturns.clear();-
562 }
executed 76 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
76
563 m_laterFailures.link(assembler);-
564 m_laterFailures.clear();-
565 m_pendingFallthrough = false;-
566 }
executed 1154003 times by 153 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1154003
567 void linkTo(Label label, MacroAssembler* assembler)-
568 {-
569 if (m_pendingReturns.size()) {
m_pendingReturns.size()Description
TRUEevaluated 288 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 416 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
288-416
570 for (unsigned i = 0; i < m_pendingReturns.size(); ++i)
i < m_pendingReturns.size()Description
TRUEevaluated 288 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 287 times by 1 test
Evaluated by:
  • tst_ecmascripttests
287-288
571 m_backtrackRecords.append(ReturnAddressRecord(m_pendingReturns[i], label));
executed 286 times by 1 test: m_backtrackRecords.append(ReturnAddressRecord(m_pendingReturns[i], label));
Executed by:
  • tst_ecmascripttests
286
572 m_pendingReturns.clear();-
573 }
executed 287 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
287
574 if (m_pendingFallthrough)
m_pendingFallthroughDescription
TRUEevaluated 108 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 594 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
108-594
575 assembler->jump(label);
executed 108 times by 1 test: assembler->jump(label);
Executed by:
  • tst_ecmascripttests
108
576 m_laterFailures.linkTo(label, assembler);-
577 m_laterFailures.clear();-
578 m_pendingFallthrough = false;-
579 }
executed 704 times by 5 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
704
580 void takeBacktracksToJumpList(JumpList& jumpList, MacroAssembler* assembler)-
581 {-
582 if (m_pendingReturns.size()) {
m_pendingReturns.size()Description
TRUEevaluated 145 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 58 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicktextinput
58-145
583 Label here(assembler);-
584 for (unsigned i = 0; i < m_pendingReturns.size(); ++i)
i < m_pendingReturns.size()Description
TRUEevaluated 146 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 148 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
146-148
585 m_backtrackRecords.append(ReturnAddressRecord(m_pendingReturns[i], here));
executed 147 times by 2 tests: m_backtrackRecords.append(ReturnAddressRecord(m_pendingReturns[i], here));
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
147
586 m_pendingReturns.clear();-
587 m_pendingFallthrough = true;-
588 }
executed 148 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
148
589 if (m_pendingFallthrough)
m_pendingFallthroughDescription
TRUEevaluated 166 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 40 times by 1 test
Evaluated by:
  • tst_ecmascripttests
40-166
590 jumpList.append(assembler->jump());
executed 165 times by 3 tests: jumpList.append(assembler->jump());
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
165
591 jumpList.append(m_laterFailures);-
592 m_laterFailures.clear();-
593 m_pendingFallthrough = false;-
594 }
executed 206 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
206
595-
596 bool isEmpty()-
597 {-
598 return m_laterFailures.empty() && m_pendingReturns.isEmpty() && !m_pendingFallthrough;
executed 2298275 times by 153 tests: return m_laterFailures.empty() && m_pendingReturns.isEmpty() && !m_pendingFallthrough;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
2298275
599 }-
600-
601 // Called at the end of code generation to link all return addresses.-
602 void linkDataLabels(LinkBuffer<JSC::DefaultMacroAssembler>& linkBuffer)-
603 {-
604 ASSERT(isEmpty());-
605 for (unsigned i = 0; i < m_backtrackRecords.size(); ++i)
i < m_backtrackRecords.size()Description
TRUEevaluated 512 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 1150961 times by 153 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
512-1150961
606 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:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
512
607 }
executed 1151131 times by 153 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1151131
608-
609 private:-
610 struct ReturnAddressRecord {-
611 ReturnAddressRecord(DataLabelPtr dataLabel, Label backtrackLocation)-
612 : m_dataLabel(dataLabel)-
613 , m_backtrackLocation(backtrackLocation)-
614 {-
615 }
executed 509 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
509
616-
617 DataLabelPtr m_dataLabel;-
618 Label m_backtrackLocation;-
619 };-
620-
621 JumpList m_laterFailures;-
622 bool m_pendingFallthrough;-
623 Vector<DataLabelPtr, 4> m_pendingReturns;-
624 Vector<ReturnAddressRecord, 4> m_backtrackRecords;-
625 };-
626-
627 // Generation methods:-
628 // ===================-
629-
630 // This method provides a default implementation of backtracking common-
631 // to many terms; terms commonly jump out of the forwards matching path-
632 // on any failed conditions, and add these jumps to the m_jumps list. If-
633 // no special handling is required we can often just backtrack to m_jumps.-
634 void backtrackTermDefault(size_t opIndex)-
635 {-
636 YarrOp& op = m_ops[opIndex];-
637 m_backtrackingState.append(op.m_jumps);-
638 }
executed 2371685 times by 9 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
2371685
639-
640 void generateAssertionBOL(size_t opIndex)-
641 {-
642 YarrOp& op = m_ops[opIndex];-
643 PatternTerm* term = op.m_term;-
644-
645 if (m_pattern.m_multiline) {
m_pattern.m_multilineDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 134 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
20-134
646 const RegisterID character = regT0;-
647-
648 JumpList matchDest;-
649 if (!term->inputPosition)
!term->inputPositionDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
0-20
650 matchDest.append(branch32(Equal, index, Imm32(m_checked)));
executed 20 times by 1 test: matchDest.append(branch32(Equal, index, Imm32(m_checked)));
Executed by:
  • tst_ecmascripttests
20
651-
652 readCharacter((term->inputPosition - m_checked) - 1, character);-
653 matchCharacterClass(character, matchDest, m_pattern.newlineCharacterClass());-
654 op.m_jumps.append(jump());-
655-
656 matchDest.link(this);-
657 } else {
executed 20 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
20
658 // Erk, really should poison out these alternatives early. :-/-
659 if (term->inputPosition)
term->inputPositionDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 126 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
8-126
660 op.m_jumps.append(jump());
executed 8 times by 1 test: op.m_jumps.append(jump());
Executed by:
  • tst_ecmascripttests
8
661 else-
662 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:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
126
663 }-
664 }-
665 void backtrackAssertionBOL(size_t opIndex)-
666 {-
667 backtrackTermDefault(opIndex);-
668 }
executed 154 times by 5 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
154
669-
670 void generateAssertionEOL(size_t opIndex)-
671 {-
672 YarrOp& op = m_ops[opIndex];-
673 PatternTerm* term = op.m_term;-
674-
675 if (m_pattern.m_multiline) {
m_pattern.m_multilineDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 139 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
16-139
676 const RegisterID character = regT0;-
677-
678 JumpList matchDest;-
679 if (term->inputPosition == m_checked)
term->inputPos...n == m_checkedDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
0-16
680 matchDest.append(atEndOfInput());
executed 16 times by 1 test: matchDest.append(atEndOfInput());
Executed by:
  • tst_ecmascripttests
16
681-
682 readCharacter(term->inputPosition - m_checked, character);-
683 matchCharacterClass(character, matchDest, m_pattern.newlineCharacterClass());-
684 op.m_jumps.append(jump());-
685-
686 matchDest.link(this);-
687 } else {
executed 16 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
16
688 if (term->inputPosition == m_checked)
term->inputPos...n == m_checkedDescription
TRUEevaluated 139 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEnever evaluated
0-139
689 op.m_jumps.append(notAtEndOfInput());
executed 139 times by 5 tests: op.m_jumps.append(notAtEndOfInput());
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
139
690 // Erk, really should poison out these alternatives early. :-/-
691 else-
692 op.m_jumps.append(jump());
never executed: op.m_jumps.append(jump());
0
693 }-
694 }-
695 void backtrackAssertionEOL(size_t opIndex)-
696 {-
697 backtrackTermDefault(opIndex);-
698 }
executed 155 times by 5 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
155
699-
700 // Also falls though on nextIsNotWordChar.-
701 void matchAssertionWordchar(size_t opIndex, JumpList& nextIsWordChar, JumpList& nextIsNotWordChar)-
702 {-
703 YarrOp& op = m_ops[opIndex];-
704 PatternTerm* term = op.m_term;-
705-
706 const RegisterID character = regT0;-
707-
708 if (term->inputPosition == m_checked)
term->inputPos...n == m_checkedDescription
TRUEevaluated 224 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 2032 times by 1 test
Evaluated by:
  • tst_ecmascripttests
224-2032
709 nextIsNotWordChar.append(atEndOfInput());
executed 224 times by 1 test: nextIsNotWordChar.append(atEndOfInput());
Executed by:
  • tst_ecmascripttests
224
710-
711 readCharacter((term->inputPosition - m_checked), character);-
712 matchCharacterClass(character, nextIsWordChar, m_pattern.wordcharCharacterClass());-
713 }
executed 2255 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
2255
714-
715 void generateAssertionWordBoundary(size_t opIndex)-
716 {-
717 YarrOp& op = m_ops[opIndex];-
718 PatternTerm* term = op.m_term;-
719-
720 const RegisterID character = regT0;-
721-
722 Jump atBegin;-
723 JumpList matchDest;-
724 if (!term->inputPosition)
!term->inputPositionDescription
TRUEevaluated 247 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 880 times by 1 test
Evaluated by:
  • tst_ecmascripttests
247-880
725 atBegin = branch32(Equal, index, Imm32(m_checked));
executed 247 times by 1 test: atBegin = branch32(Equal, index, Imm32(m_checked));
Executed by:
  • tst_ecmascripttests
247
726 readCharacter((term->inputPosition - m_checked) - 1, character);-
727 matchCharacterClass(character, matchDest, m_pattern.wordcharCharacterClass());-
728 if (!term->inputPosition)
!term->inputPositionDescription
TRUEevaluated 248 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 880 times by 1 test
Evaluated by:
  • tst_ecmascripttests
248-880
729 atBegin.link(this);
executed 248 times by 1 test: atBegin.link(this);
Executed by:
  • tst_ecmascripttests
248
730-
731 // We fall through to here if the last character was not a wordchar.-
732 JumpList nonWordCharThenWordChar;-
733 JumpList nonWordCharThenNonWordChar;-
734 if (term->invert()) {
term->invert()Description
TRUEevaluated 84 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1044 times by 1 test
Evaluated by:
  • tst_ecmascripttests
84-1044
735 matchAssertionWordchar(opIndex, nonWordCharThenNonWordChar, nonWordCharThenWordChar);-
736 nonWordCharThenWordChar.append(jump());-
737 } else {
executed 84 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
84
738 matchAssertionWordchar(opIndex, nonWordCharThenWordChar, nonWordCharThenNonWordChar);-
739 nonWordCharThenNonWordChar.append(jump());-
740 }
executed 1044 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
1044
741 op.m_jumps.append(nonWordCharThenNonWordChar);-
742-
743 // We jump here if the last character was a wordchar.-
744 matchDest.link(this);-
745 JumpList wordCharThenWordChar;-
746 JumpList wordCharThenNonWordChar;-
747 if (term->invert()) {
term->invert()Description
TRUEevaluated 84 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 1044 times by 1 test
Evaluated by:
  • tst_ecmascripttests
84-1044
748 matchAssertionWordchar(opIndex, wordCharThenNonWordChar, wordCharThenWordChar);-
749 wordCharThenWordChar.append(jump());-
750 } else {
executed 84 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
84
751 matchAssertionWordchar(opIndex, wordCharThenWordChar, wordCharThenNonWordChar);-
752 // This can fall-though!-
753 }
executed 1044 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
1044
754-
755 op.m_jumps.append(wordCharThenWordChar);-
756-
757 nonWordCharThenWordChar.link(this);-
758 wordCharThenNonWordChar.link(this);-
759 }
executed 1127 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
1127
760 void backtrackAssertionWordBoundary(size_t opIndex)-
761 {-
762 backtrackTermDefault(opIndex);-
763 }
executed 1127 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
1127
764-
765 void generatePatternCharacterOnce(size_t opIndex)-
766 {-
767 YarrOp& op = m_ops[opIndex];-
768-
769 if (op.m_isDeadCode)
op.m_isDeadCodeDescription
TRUEevaluated 789416 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
FALSEevaluated 1575565 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
789416-1575565
770 return;
executed 789193 times by 5 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
789193
771 -
772 // m_ops always ends with a OpBodyAlternativeEnd or OpMatchFailed-
773 // node, so there must always be at least one more node.-
774 ASSERT(opIndex + 1 < m_ops.size());-
775 YarrOp* nextOp = &m_ops[opIndex + 1];-
776-
777 PatternTerm* term = op.m_term;-
778 UChar ch = term->patternCharacter;-
779-
780 if ((ch > 0xff) && (m_charSize == Char8)) {
(ch > 0xff)Description
TRUEevaluated 782995 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 795117 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
(m_charSize == Char8)Description
TRUEnever evaluated
FALSEevaluated 783007 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-795117
781 // Have a 16 bit pattern character and an 8 bit string - short circuit-
782 op.m_jumps.append(jump());-
783 return;
never executed: return;
0
784 }-
785-
786 const RegisterID character = regT0;-
787 int maxCharactersAtOnce = m_charSize == Char8 ? 4 : 2;
m_charSize == Char8Description
TRUEnever evaluated
FALSEevaluated 1575640 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
0-1575640
788 unsigned ignoreCaseMask = 0;-
789#if CPU(BIG_ENDIAN)-
790 int allCharacters = ch << (m_charSize == Char8 ? 24 : 16);-
791#else-
792 int allCharacters = ch;-
793#endif-
794 int numberCharacters;-
795 int startTermPosition = term->inputPosition;-
796-
797 // For case-insesitive compares, non-ascii characters that have different-
798 // upper & lower case representations are converted to a character class.-
799 ASSERT(!m_pattern.m_ignoreCase || isASCIIAlpha(ch) || isCanonicallyUnique(ch));-
800-
801 if (m_pattern.m_ignoreCase && isASCIIAlpha(ch))
m_pattern.m_ignoreCaseDescription
TRUEevaluated 241 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
FALSEevaluated 1575222 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
isASCIIAlpha(ch)Description
TRUEevaluated 201 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
FALSEevaluated 40 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
40-1575222
802#if CPU(BIG_ENDIAN)-
803 ignoreCaseMask |= 32 << (m_charSize == Char8 ? 24 : 16);-
804#else-
805 ignoreCaseMask |= 32;
executed 201 times by 3 tests: ignoreCaseMask |= 32;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
201
806#endif-
807-
808 for (numberCharacters = 1; numberCharacters < maxCharactersAtOnce && nextOp->m_op == OpTerm; ++numberCharacters, nextOp = &m_ops[opIndex + numberCharacters]) {
numberCharacte...aractersAtOnceDescription
TRUEevaluated 1579245 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
FALSEevaluated 788693 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
nextOp->m_op == OpTermDescription
TRUEevaluated 790063 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
FALSEevaluated 788200 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
788200-1579245
809 PatternTerm* nextTerm = nextOp->m_term;-
810 -
811 if (nextTerm->type != PatternTerm::TypePatternCharacter
nextTerm->type...tternCharacterDescription
TRUEevaluated 1141 times by 4 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
  • tst_qquicktextinput
FALSEevaluated 788846 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
1141-788846
812 || nextTerm->quantityType != QuantifierFixedCount
nextTerm->quan...fierFixedCountDescription
TRUEevaluated 100 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 789342 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
100-789342
813 || nextTerm->quantityCount != 1
nextTerm->quantityCount != 1Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 789416 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
4-789416
814 || nextTerm->inputPosition != (startTermPosition + numberCharacters))
nextTerm->inpu...berCharacters)Description
TRUEevaluated 30 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 789349 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
30-789349
815 break;
executed 1275 times by 4 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
  • tst_qquicktextinput
1275
816-
817 nextOp->m_isDeadCode = true;-
818-
819#if CPU(BIG_ENDIAN)-
820 int shiftAmount = (m_charSize == Char8 ? 24 : 16) - ((m_charSize == Char8 ? 8 : 16) * numberCharacters);-
821#else-
822 int shiftAmount = (m_charSize == Char8 ? 8 : 16) * numberCharacters;
m_charSize == Char8Description
TRUEnever evaluated
FALSEevaluated 788825 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
0-788825
823#endif-
824-
825 UChar currentCharacter = nextTerm->patternCharacter;-
826-
827 if ((currentCharacter > 0xff) && (m_charSize == Char8)) {
(currentCharacter > 0xff)Description
TRUEevaluated 261112 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 528327 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
(m_charSize == Char8)Description
TRUEnever evaluated
FALSEevaluated 261112 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-528327
828 // Have a 16 bit pattern character and an 8 bit string - short circuit-
829 op.m_jumps.append(jump());-
830 return;
never executed: return;
0
831 }-
832-
833 // For case-insesitive compares, non-ascii characters that have different-
834 // upper & lower case representations are converted to a character class.-
835 ASSERT(!m_pattern.m_ignoreCase || isASCIIAlpha(currentCharacter) || isCanonicallyUnique(currentCharacter));-
836-
837 allCharacters |= (currentCharacter << shiftAmount);-
838-
839 if ((m_pattern.m_ignoreCase) && (isASCIIAlpha(currentCharacter)))
(m_pattern.m_ignoreCase)Description
TRUEevaluated 152 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
FALSEevaluated 788566 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
(isASCIIAlpha(...entCharacter))Description
TRUEevaluated 138 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qjsengine
14-788566
840 ignoreCaseMask |= 32 << shiftAmount;
executed 137 times by 3 tests: ignoreCaseMask |= 32 << shiftAmount;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
137
841 }
executed 788656 times by 5 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
788656
842-
843 if (m_charSize == Char8) {
m_charSize == Char8Description
TRUEnever evaluated
FALSEevaluated 1577934 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
0-1577934
844 switch (numberCharacters) {-
845 case 1:
never executed: case 1:
0
846 op.m_jumps.append(jumpIfCharNotEquals(ch, startTermPosition - m_checked, character));-
847 return;
never executed: return;
0
848 case 2: {
never executed: case 2:
0
849 BaseIndex address(input, index, TimesOne, (startTermPosition - m_checked) * sizeof(LChar));-
850 load16Unaligned(address, character);-
851 break;
never executed: break;
0
852 }-
853 case 3: {
never executed: case 3:
0
854 BaseIndex highAddress(input, index, TimesOne, (startTermPosition - m_checked) * sizeof(LChar));-
855 load16Unaligned(highAddress, character);-
856 if (ignoreCaseMask)
ignoreCaseMaskDescription
TRUEnever evaluated
FALSEnever evaluated
0
857 or32(Imm32(ignoreCaseMask), character);
never executed: or32(Imm32(ignoreCaseMask), character);
0
858 op.m_jumps.append(branch32(NotEqual, character, Imm32((allCharacters & 0xffff) | ignoreCaseMask)));-
859 op.m_jumps.append(jumpIfCharNotEquals(allCharacters >> 16, startTermPosition + 2 - m_checked, character));-
860 return;
never executed: return;
0
861 }-
862 case 4: {
never executed: case 4:
0
863 BaseIndex address(input, index, TimesOne, (startTermPosition - m_checked) * sizeof(LChar));-
864 load32WithUnalignedHalfWords(address, character);-
865 break;
never executed: break;
0
866 }-
867 }-
868 } else {
never executed: end of block
0
869 switch (numberCharacters) {-
870 case 1:
executed 789795 times by 5 tests: case 1:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
789795
871 op.m_jumps.append(jumpIfCharNotEquals(ch, term->inputPosition - m_checked, character));-
872 return;
executed 789751 times by 5 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
789751
873 case 2:
executed 788772 times by 5 tests: case 2:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
788772
874 BaseIndex address(input, index, TimesTwo, (term->inputPosition - m_checked) * sizeof(UChar));-
875 load32WithUnalignedHalfWords(address, character);-
876 break;
executed 789302 times by 5 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
789302
877 }-
878 }
executed 789163 times by 5 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
789163
879-
880 if (ignoreCaseMask)
ignoreCaseMaskDescription
TRUEevaluated 148 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
FALSEevaluated 789059 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
148-789059
881 or32(Imm32(ignoreCaseMask), character);
executed 148 times by 3 tests: or32(Imm32(ignoreCaseMask), character);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qjsvalue
148
882 op.m_jumps.append(branch32(NotEqual, character, Imm32(allCharacters | ignoreCaseMask)));-
883 return;
executed 789168 times by 5 tests: return;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicktextinput
789168
884 }-
885 void backtrackPatternCharacterOnce(size_t opIndex)-
886 {-
887 backtrackTermDefault(opIndex);-
888 }
executed 2368455 times by 6 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
2368455
889-
890 void generatePatternCharacterFixed(size_t opIndex)-
891 {-
892 YarrOp& op = m_ops[opIndex];-
893 PatternTerm* term = op.m_term;-
894 UChar ch = term->patternCharacter;-
895-
896 const RegisterID character = regT0;-
897 const RegisterID countRegister = regT1;-
898-
899 move(index, countRegister);-
900 sub32(Imm32(term->quantityCount.unsafeGet()), countRegister);-
901-
902 Label loop(this);-
903 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());-
904-
905 if (m_charSize == Char8)
m_charSize == Char8Description
TRUEnever evaluated
FALSEevaluated 32 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
0-32
906 load8(address, character);
never executed: load8(address, character);
0
907 else-
908 load16(address, character);
executed 32 times by 2 tests: load16(address, character);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
32
909-
910 // For case-insesitive compares, non-ascii characters that have different-
911 // upper & lower case representations are converted to a character class.-
912 ASSERT(!m_pattern.m_ignoreCase || isASCIIAlpha(ch) || isCanonicallyUnique(ch));-
913 if (m_pattern.m_ignoreCase && isASCIIAlpha(ch)) {
m_pattern.m_ignoreCaseDescription
TRUEnever evaluated
FALSEevaluated 32 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
isASCIIAlpha(ch)Description
TRUEnever evaluated
FALSEnever evaluated
0-32
914 or32(TrustedImm32(0x20), character);-
915 ch |= 0x20;-
916 }
never executed: end of block
0
917-
918 op.m_jumps.append(branch32(NotEqual, character, Imm32(ch)));-
919 add32(TrustedImm32(1), countRegister);-
920 branch32(NotEqual, countRegister, index).linkTo(loop, this);-
921 }
executed 32 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
32
922 void backtrackPatternCharacterFixed(size_t opIndex)-
923 {-
924 backtrackTermDefault(opIndex);-
925 }
executed 32 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
32
926-
927 void generatePatternCharacterGreedy(size_t opIndex)-
928 {-
929 YarrOp& op = m_ops[opIndex];-
930 PatternTerm* term = op.m_term;-
931 UChar ch = term->patternCharacter;-
932-
933 const RegisterID character = regT0;-
934 const RegisterID countRegister = regT1;-
935-
936 move(TrustedImm32(0), countRegister);-
937-
938 // Unless have a 16 bit pattern character and an 8 bit string - short circuit-
939 if (!((ch > 0xff) && (m_charSize == Char8))) {
(ch > 0xff)Description
TRUEnever evaluated
FALSEevaluated 242 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
(m_charSize == Char8)Description
TRUEnever evaluated
FALSEnever evaluated
0-242
940 JumpList failures;-
941 Label loop(this);-
942 failures.append(atEndOfInput());-
943 failures.append(jumpIfCharNotEquals(ch, term->inputPosition - m_checked, character));-
944-
945 add32(TrustedImm32(1), countRegister);-
946 add32(TrustedImm32(1), index);-
947 if (term->quantityCount == quantifyInfinite)
term->quantity...antifyInfiniteDescription
TRUEevaluated 112 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 130 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
112-130
948 jump(loop);
executed 112 times by 2 tests: jump(loop);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
112
949 else-
950 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:
  • tst_ecmascripttests
  • tst_qjsengine
130
951-
952 failures.link(this);-
953 }
executed 242 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
242
954 op.m_reentry = label();-
955-
956 storeToFrame(countRegister, term->frameLocation);-
957 }
executed 242 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
242
958 void backtrackPatternCharacterGreedy(size_t opIndex)-
959 {-
960 YarrOp& op = m_ops[opIndex];-
961 PatternTerm* term = op.m_term;-
962-
963 const RegisterID countRegister = regT1;-
964-
965 m_backtrackingState.link(this);-
966-
967 loadFromFrame(term->frameLocation, countRegister);-
968 m_backtrackingState.append(branchTest32(Zero, countRegister));-
969 sub32(TrustedImm32(1), countRegister);-
970 sub32(TrustedImm32(1), index);-
971 jump(op.m_reentry);-
972 }
executed 242 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
242
973-
974 void generatePatternCharacterNonGreedy(size_t opIndex)-
975 {-
976 YarrOp& op = m_ops[opIndex];-
977 PatternTerm* term = op.m_term;-
978-
979 const RegisterID countRegister = regT1;-
980-
981 move(TrustedImm32(0), countRegister);-
982 op.m_reentry = label();-
983 storeToFrame(countRegister, term->frameLocation);-
984 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qjsengine
2
985 void backtrackPatternCharacterNonGreedy(size_t opIndex)-
986 {-
987 YarrOp& op = m_ops[opIndex];-
988 PatternTerm* term = op.m_term;-
989 UChar ch = term->patternCharacter;-
990-
991 const RegisterID character = regT0;-
992 const RegisterID countRegister = regT1;-
993-
994 m_backtrackingState.link(this);-
995-
996 loadFromFrame(term->frameLocation, countRegister);-
997-
998 // Unless have a 16 bit pattern character and an 8 bit string - short circuit-
999 if (!((ch > 0xff) && (m_charSize == Char8))) {
(ch > 0xff)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qjsengine
(m_charSize == Char8)Description
TRUEnever evaluated
FALSEnever evaluated
0-2
1000 JumpList nonGreedyFailures;-
1001 nonGreedyFailures.append(atEndOfInput());-
1002 if (term->quantityCount != quantifyInfinite)
term->quantity...antifyInfiniteDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qjsengine
FALSEnever evaluated
0-2
1003 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:
  • tst_qjsengine
2
1004 nonGreedyFailures.append(jumpIfCharNotEquals(ch, term->inputPosition - m_checked, character));-
1005-
1006 add32(TrustedImm32(1), countRegister);-
1007 add32(TrustedImm32(1), index);-
1008-
1009 jump(op.m_reentry);-
1010 nonGreedyFailures.link(this);-
1011 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qjsengine
2
1012-
1013 sub32(countRegister, index);-
1014 m_backtrackingState.fallthrough();-
1015 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qjsengine
2
1016-
1017 void generateCharacterClassOnce(size_t opIndex)-
1018 {-
1019 YarrOp& op = m_ops[opIndex];-
1020 PatternTerm* term = op.m_term;-
1021-
1022 const RegisterID character = regT0;-
1023-
1024 JumpList matchDest;-
1025 readCharacter(term->inputPosition - m_checked, character);-
1026 matchCharacterClass(character, matchDest, term->characterClass);-
1027-
1028 if (term->invert())
term->invert()Description
TRUEevaluated 647 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 842 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
647-842
1029 op.m_jumps.append(matchDest);
executed 646 times by 2 tests: op.m_jumps.append(matchDest);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
646
1030 else {-
1031 op.m_jumps.append(jump());-
1032 matchDest.link(this);-
1033 }
executed 843 times by 8 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
843
1034 }-
1035 void backtrackCharacterClassOnce(size_t opIndex)-
1036 {-
1037 backtrackTermDefault(opIndex);-
1038 }
executed 1489 times by 8 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
1489
1039-
1040 void generateCharacterClassFixed(size_t opIndex)-
1041 {-
1042 YarrOp& op = m_ops[opIndex];-
1043 PatternTerm* term = op.m_term;-
1044-
1045 const RegisterID character = regT0;-
1046 const RegisterID countRegister = regT1;-
1047-
1048 move(index, countRegister);-
1049 sub32(Imm32(term->quantityCount.unsafeGet()), countRegister);-
1050-
1051 Label loop(this);-
1052 JumpList matchDest;-
1053 if (m_charSize == Char8)
m_charSize == Char8Description
TRUEnever evaluated
FALSEevaluated 292 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicktextinput
0-292
1054 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
1055 else-
1056 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:
  • tst_ecmascripttests
  • tst_qquicktextinput
292
1057 matchCharacterClass(character, matchDest, term->characterClass);-
1058-
1059 if (term->invert())
term->invert()Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 268 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicktextinput
24-268
1060 op.m_jumps.append(matchDest);
executed 24 times by 1 test: op.m_jumps.append(matchDest);
Executed by:
  • tst_ecmascripttests
24
1061 else {-
1062 op.m_jumps.append(jump());-
1063 matchDest.link(this);-
1064 }
executed 270 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qquicktextinput
270
1065-
1066 add32(TrustedImm32(1), countRegister);-
1067 branch32(NotEqual, countRegister, index).linkTo(loop, this);-
1068 }
executed 292 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qquicktextinput
292
1069 void backtrackCharacterClassFixed(size_t opIndex)-
1070 {-
1071 backtrackTermDefault(opIndex);-
1072 }
executed 292 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qquicktextinput
292
1073-
1074 void generateCharacterClassGreedy(size_t opIndex)-
1075 {-
1076 YarrOp& op = m_ops[opIndex];-
1077 PatternTerm* term = op.m_term;-
1078-
1079 const RegisterID character = regT0;-
1080 const RegisterID countRegister = regT1;-
1081-
1082 move(TrustedImm32(0), countRegister);-
1083-
1084 JumpList failures;-
1085 Label loop(this);-
1086 failures.append(atEndOfInput());-
1087-
1088 if (term->invert()) {
term->invert()Description
TRUEevaluated 207 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
FALSEevaluated 1722 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
207-1722
1089 readCharacter(term->inputPosition - m_checked, character);-
1090 matchCharacterClass(character, failures, term->characterClass);-
1091 } else {
executed 208 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicklistview
208
1092 JumpList matchDest;-
1093 readCharacter(term->inputPosition - m_checked, character);-
1094 matchCharacterClass(character, matchDest, term->characterClass);-
1095 failures.append(jump());-
1096 matchDest.link(this);-
1097 }
executed 1722 times by 7 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
1722
1098-
1099 add32(TrustedImm32(1), countRegister);-
1100 add32(TrustedImm32(1), index);-
1101 if (term->quantityCount != quantifyInfinite) {
term->quantity...antifyInfiniteDescription
TRUEevaluated 214 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEevaluated 1718 times by 7 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
214-1718
1102 branch32(NotEqual, countRegister, Imm32(term->quantityCount.unsafeGet())).linkTo(loop, this);-
1103 failures.append(jump());-
1104 } else
executed 215 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qquicktextinput
  • tst_qquickworkerscript
215
1105 jump(loop);
executed 1718 times by 7 tests: jump(loop);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
1718
1106-
1107 failures.link(this);-
1108 op.m_reentry = label();-
1109-
1110 storeToFrame(countRegister, term->frameLocation);-
1111 }
executed 1930 times by 8 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
1930
1112 void backtrackCharacterClassGreedy(size_t opIndex)-
1113 {-
1114 YarrOp& op = m_ops[opIndex];-
1115 PatternTerm* term = op.m_term;-
1116-
1117 const RegisterID countRegister = regT1;-
1118-
1119 m_backtrackingState.link(this);-
1120-
1121 loadFromFrame(term->frameLocation, countRegister);-
1122 m_backtrackingState.append(branchTest32(Zero, countRegister));-
1123 sub32(TrustedImm32(1), countRegister);-
1124 sub32(TrustedImm32(1), index);-
1125 jump(op.m_reentry);-
1126 }
executed 1931 times by 8 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
1931
1127-
1128 void generateCharacterClassNonGreedy(size_t opIndex)-
1129 {-
1130 YarrOp& op = m_ops[opIndex];-
1131 PatternTerm* term = op.m_term;-
1132-
1133 const RegisterID countRegister = regT1;-
1134-
1135 move(TrustedImm32(0), countRegister);-
1136 op.m_reentry = label();-
1137 storeToFrame(countRegister, term->frameLocation);-
1138 }
executed 32 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
32
1139 void backtrackCharacterClassNonGreedy(size_t opIndex)-
1140 {-
1141 YarrOp& op = m_ops[opIndex];-
1142 PatternTerm* term = op.m_term;-
1143-
1144 const RegisterID character = regT0;-
1145 const RegisterID countRegister = regT1;-
1146-
1147 JumpList nonGreedyFailures;-
1148-
1149 m_backtrackingState.link(this);-
1150-
1151 loadFromFrame(term->frameLocation, countRegister);-
1152-
1153 nonGreedyFailures.append(atEndOfInput());-
1154 nonGreedyFailures.append(branch32(Equal, countRegister, Imm32(term->quantityCount.unsafeGet())));-
1155-
1156 JumpList matchDest;-
1157 readCharacter(term->inputPosition - m_checked, character);-
1158 matchCharacterClass(character, matchDest, term->characterClass);-
1159-
1160 if (term->invert())
term->invert()Description
TRUEevaluated 20 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
12-20
1161 nonGreedyFailures.append(matchDest);
executed 20 times by 2 tests: nonGreedyFailures.append(matchDest);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
20
1162 else {-
1163 nonGreedyFailures.append(jump());-
1164 matchDest.link(this);-
1165 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
12
1166-
1167 add32(TrustedImm32(1), countRegister);-
1168 add32(TrustedImm32(1), index);-
1169-
1170 jump(op.m_reentry);-
1171-
1172 nonGreedyFailures.link(this);-
1173 sub32(countRegister, index);-
1174 m_backtrackingState.fallthrough();-
1175 }
executed 32 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
32
1176-
1177 void generateDotStarEnclosure(size_t opIndex)-
1178 {-
1179 YarrOp& op = m_ops[opIndex];-
1180 PatternTerm* term = op.m_term;-
1181-
1182 const RegisterID character = regT0;-
1183 const RegisterID matchPos = regT1;-
1184-
1185 JumpList foundBeginningNewLine;-
1186 JumpList saveStartIndex;-
1187 JumpList foundEndingNewLine;-
1188-
1189 ASSERT(!m_pattern.m_body->m_hasFixedSize);-
1190 getMatchStart(matchPos);-
1191-
1192 saveStartIndex.append(branchTest32(Zero, matchPos));-
1193 Label findBOLLoop(this);-
1194 sub32(TrustedImm32(1), matchPos);-
1195 if (m_charSize == Char8)
m_charSize == Char8Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-8
1196 load8(BaseIndex(input, matchPos, TimesOne, 0), character);
never executed: load8(BaseIndex(input, matchPos, TimesOne, 0), character);
0
1197 else-
1198 load16(BaseIndex(input, matchPos, TimesTwo, 0), character);
executed 8 times by 1 test: load16(BaseIndex(input, matchPos, TimesTwo, 0), character);
Executed by:
  • tst_ecmascripttests
8
1199 matchCharacterClass(character, foundBeginningNewLine, m_pattern.newlineCharacterClass());-
1200 branchTest32(NonZero, matchPos).linkTo(findBOLLoop, this);-
1201 saveStartIndex.append(jump());-
1202-
1203 foundBeginningNewLine.link(this);-
1204 add32(TrustedImm32(1), matchPos); // Advance past newline-
1205 saveStartIndex.link(this);-
1206-
1207 if (!m_pattern.m_multiline && term->anchors.bolAnchor)
!m_pattern.m_multilineDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
term->anchors.bolAnchorDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-8
1208 op.m_jumps.append(branchTest32(NonZero, matchPos));
never executed: op.m_jumps.append(branchTest32(NonZero, matchPos));
0
1209-
1210 ASSERT(!m_pattern.m_body->m_hasFixedSize);-
1211 setMatchStart(matchPos);-
1212-
1213 move(index, matchPos);-
1214-
1215 Label findEOLLoop(this); -
1216 foundEndingNewLine.append(branch32(Equal, matchPos, length));-
1217 if (m_charSize == Char8)
m_charSize == Char8Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-8
1218 load8(BaseIndex(input, matchPos, TimesOne, 0), character);
never executed: load8(BaseIndex(input, matchPos, TimesOne, 0), character);
0
1219 else-
1220 load16(BaseIndex(input, matchPos, TimesTwo, 0), character);
executed 8 times by 1 test: load16(BaseIndex(input, matchPos, TimesTwo, 0), character);
Executed by:
  • tst_ecmascripttests
8
1221 matchCharacterClass(character, foundEndingNewLine, m_pattern.newlineCharacterClass());-
1222 add32(TrustedImm32(1), matchPos);-
1223 jump(findEOLLoop);-
1224-
1225 foundEndingNewLine.link(this);-
1226-
1227 if (!m_pattern.m_multiline && term->anchors.eolAnchor)
!m_pattern.m_multilineDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEnever evaluated
term->anchors.eolAnchorDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-8
1228 op.m_jumps.append(branch32(NotEqual, matchPos, length));
never executed: op.m_jumps.append(branch32(NotEqual, matchPos, length));
0
1229-
1230 move(matchPos, index);-
1231 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
8
1232-
1233 void backtrackDotStarEnclosure(size_t opIndex)-
1234 {-
1235 backtrackTermDefault(opIndex);-
1236 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
8
1237 -
1238 // Code generation/backtracking for simple terms-
1239 // (pattern characters, character classes, and assertions).-
1240 // These methods farm out work to the set of functions above.-
1241 void generateTerm(size_t opIndex)-
1242 {-
1243 YarrOp& op = m_ops[opIndex];-
1244 PatternTerm* term = op.m_term;-
1245-
1246 switch (term->type) {-
1247 case PatternTerm::TypePatternCharacter:
executed 2366048 times by 6 tests: case PatternTerm::TypePatternCharacter:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
2366048
1248 switch (term->quantityType) {-
1249 case QuantifierFixedCount:
executed 2366259 times by 6 tests: case QuantifierFixedCount:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
2366259
1250 if (term->quantityCount == 1)
term->quantityCount == 1Description
TRUEevaluated 2365861 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
FALSEevaluated 32 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
32-2365861
1251 generatePatternCharacterOnce(opIndex);
executed 2365820 times by 6 tests: generatePatternCharacterOnce(opIndex);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
2365820
1252 else-
1253 generatePatternCharacterFixed(opIndex);
executed 32 times by 2 tests: generatePatternCharacterFixed(opIndex);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
32
1254 break;
executed 2367419 times by 6 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
2367419
1255 case QuantifierGreedy:
executed 242 times by 2 tests: case QuantifierGreedy:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
242
1256 generatePatternCharacterGreedy(opIndex);-
1257 break;
executed 242 times by 2 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
242
1258 case QuantifierNonGreedy:
executed 2 times by 1 test: case QuantifierNonGreedy:
Executed by:
  • tst_qjsengine
2
1259 generatePatternCharacterNonGreedy(opIndex);-
1260 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_qjsengine
2
1261 }-
1262 break;
executed 2367526 times by 6 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
2367526
1263-
1264 case PatternTerm::TypeCharacterClass:
executed 3741 times by 9 tests: case PatternTerm::TypeCharacterClass:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
3741
1265 switch (term->quantityType) {-
1266 case QuantifierFixedCount:
executed 1781 times by 8 tests: case QuantifierFixedCount:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
1781
1267 if (term->quantityCount == 1)
term->quantityCount == 1Description
TRUEevaluated 1489 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEevaluated 290 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicktextinput
290-1489
1268 generateCharacterClassOnce(opIndex);
executed 1489 times by 8 tests: generateCharacterClassOnce(opIndex);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
1489
1269 else-
1270 generateCharacterClassFixed(opIndex);
executed 290 times by 2 tests: generateCharacterClassFixed(opIndex);
Executed by:
  • tst_ecmascripttests
  • tst_qquicktextinput
290
1271 break;
executed 1789 times by 8 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
1789
1272 case QuantifierGreedy:
executed 1929 times by 8 tests: case QuantifierGreedy:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
1929
1273 generateCharacterClassGreedy(opIndex);-
1274 break;
executed 1933 times by 8 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
1933
1275 case QuantifierNonGreedy:
executed 32 times by 2 tests: case QuantifierNonGreedy:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
32
1276 generateCharacterClassNonGreedy(opIndex);-
1277 break;
executed 32 times by 2 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
32
1278 }-
1279 break;
executed 3754 times by 9 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
3754
1280-
1281 case PatternTerm::TypeAssertionBOL:
executed 154 times by 5 tests: case PatternTerm::TypeAssertionBOL:
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
154
1282 generateAssertionBOL(opIndex);-
1283 break;
executed 153 times by 5 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
153
1284-
1285 case PatternTerm::TypeAssertionEOL:
executed 155 times by 5 tests: case PatternTerm::TypeAssertionEOL:
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
155
1286 generateAssertionEOL(opIndex);-
1287 break;
executed 155 times by 5 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
155
1288-
1289 case PatternTerm::TypeAssertionWordBoundary:
executed 1127 times by 1 test: case PatternTerm::TypeAssertionWordBoundary:
Executed by:
  • tst_ecmascripttests
1127
1290 generateAssertionWordBoundary(opIndex);-
1291 break;
executed 1128 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
1128
1292-
1293 case PatternTerm::TypeForwardReference:
never executed: case PatternTerm::TypeForwardReference:
0
1294 break;
never executed: break;
0
1295-
1296 case PatternTerm::TypeParenthesesSubpattern:
never executed: case PatternTerm::TypeParenthesesSubpattern:
0
1297 case PatternTerm::TypeParentheticalAssertion:
never executed: case PatternTerm::TypeParentheticalAssertion:
0
1298 RELEASE_ASSERT_NOT_REACHED();-
1299 case PatternTerm::TypeBackReference:
code before this statement never executed: case PatternTerm::TypeBackReference:
never executed: case PatternTerm::TypeBackReference:
0
1300 m_shouldFallBack = true;-
1301 break;
never executed: break;
0
1302 case PatternTerm::TypeDotStarEnclosure:
executed 8 times by 1 test: case PatternTerm::TypeDotStarEnclosure:
Executed by:
  • tst_ecmascripttests
8
1303 generateDotStarEnclosure(opIndex);-
1304 break;
executed 8 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
8
1305 }-
1306 }
executed 2372545 times by 9 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
2372545
1307 void backtrackTerm(size_t opIndex)-
1308 {-
1309 YarrOp& op = m_ops[opIndex];-
1310 PatternTerm* term = op.m_term;-
1311-
1312 switch (term->type) {-
1313 case PatternTerm::TypePatternCharacter:
executed 2366700 times by 6 tests: case PatternTerm::TypePatternCharacter:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
2366700
1314 switch (term->quantityType) {-
1315 case QuantifierFixedCount:
executed 2367519 times by 6 tests: case QuantifierFixedCount:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
2367519
1316 if (term->quantityCount == 1)
term->quantityCount == 1Description
TRUEevaluated 2368124 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
FALSEevaluated 32 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
32-2368124
1317 backtrackPatternCharacterOnce(opIndex);
executed 2367008 times by 6 tests: backtrackPatternCharacterOnce(opIndex);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
2367008
1318 else-
1319 backtrackPatternCharacterFixed(opIndex);
executed 32 times by 2 tests: backtrackPatternCharacterFixed(opIndex);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
32
1320 break;
executed 2368467 times by 6 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
2368467
1321 case QuantifierGreedy:
executed 242 times by 2 tests: case QuantifierGreedy:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
242
1322 backtrackPatternCharacterGreedy(opIndex);-
1323 break;
executed 242 times by 2 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
242
1324 case QuantifierNonGreedy:
executed 2 times by 1 test: case QuantifierNonGreedy:
Executed by:
  • tst_qjsengine
2
1325 backtrackPatternCharacterNonGreedy(opIndex);-
1326 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_qjsengine
2
1327 }-
1328 break;
executed 2368773 times by 6 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qquicklistview
  • tst_qquicktextinput
2368773
1329-
1330 case PatternTerm::TypeCharacterClass:
executed 3739 times by 9 tests: case PatternTerm::TypeCharacterClass:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
3739
1331 switch (term->quantityType) {-
1332 case QuantifierFixedCount:
executed 1780 times by 8 tests: case QuantifierFixedCount:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
1780
1333 if (term->quantityCount == 1)
term->quantityCount == 1Description
TRUEevaluated 1491 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEevaluated 293 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicktextinput
293-1491
1334 backtrackCharacterClassOnce(opIndex);
executed 1491 times by 8 tests: backtrackCharacterClassOnce(opIndex);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
1491
1335 else-
1336 backtrackCharacterClassFixed(opIndex);
executed 292 times by 2 tests: backtrackCharacterClassFixed(opIndex);
Executed by:
  • tst_ecmascripttests
  • tst_qquicktextinput
292
1337 break;
executed 1782 times by 8 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicktextinput
  • tst_qquickworkerscript
1782
1338 case QuantifierGreedy:
executed 1925 times by 8 tests: case QuantifierGreedy:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
1925
1339 backtrackCharacterClassGreedy(opIndex);-
1340 break;
executed 1928 times by 8 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
1928
1341 case QuantifierNonGreedy:
executed 32 times by 2 tests: case QuantifierNonGreedy:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
32
1342 backtrackCharacterClassNonGreedy(opIndex);-
1343 break;
executed 32 times by 2 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
32
1344 }-
1345 break;
executed 3739 times by 9 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
3739
1346-
1347 case PatternTerm::TypeAssertionBOL:
executed 154 times by 5 tests: case PatternTerm::TypeAssertionBOL:
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
154
1348 backtrackAssertionBOL(opIndex);-
1349 break;
executed 154 times by 5 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
154
1350-
1351 case PatternTerm::TypeAssertionEOL:
executed 154 times by 5 tests: case PatternTerm::TypeAssertionEOL:
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
154
1352 backtrackAssertionEOL(opIndex);-
1353 break;
executed 155 times by 5 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
155
1354-
1355 case PatternTerm::TypeAssertionWordBoundary:
executed 1128 times by 1 test: case PatternTerm::TypeAssertionWordBoundary:
Executed by:
  • tst_ecmascripttests
1128
1356 backtrackAssertionWordBoundary(opIndex);-
1357 break;
executed 1127 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
1127
1358-
1359 case PatternTerm::TypeForwardReference:
never executed: case PatternTerm::TypeForwardReference:
0
1360 break;
never executed: break;
0
1361-
1362 case PatternTerm::TypeParenthesesSubpattern:
never executed: case PatternTerm::TypeParenthesesSubpattern:
0
1363 case PatternTerm::TypeParentheticalAssertion:
never executed: case PatternTerm::TypeParentheticalAssertion:
0
1364 RELEASE_ASSERT_NOT_REACHED();-
1365-
1366 case PatternTerm::TypeDotStarEnclosure:
code before this statement never executed: case PatternTerm::TypeDotStarEnclosure:
executed 8 times by 1 test: case PatternTerm::TypeDotStarEnclosure:
Executed by:
  • tst_ecmascripttests
0-8
1367 backtrackDotStarEnclosure(opIndex);-
1368 break;
executed 8 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
8
1369-
1370 case PatternTerm::TypeBackReference:
never executed: case PatternTerm::TypeBackReference:
0
1371 m_shouldFallBack = true;-
1372 break;
never executed: break;
0
1373 }-
1374 }
executed 2373956 times by 9 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
2373956
1375-
1376 void generate()-
1377 {-
1378 // Forwards generate the matching code.-
1379 ASSERT(m_ops.size());-
1380 size_t opIndex = 0;-
1381-
1382 do {-
1383 YarrOp& op = m_ops[opIndex];-
1384 switch (op.m_op) {-
1385-
1386 case OpTerm:
executed 2372202 times by 9 tests: case OpTerm:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
2372202
1387 generateTerm(opIndex);-
1388 break;
executed 2372874 times by 9 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
2372874
1389-
1390 // OpBodyAlternativeBegin/Next/End-
1391 //-
1392 // These nodes wrap the set of alternatives in the body of the regular expression.-
1393 // There may be either one or two chains of OpBodyAlternative nodes, one representing-
1394 // the 'once through' sequence of alternatives (if any exist), and one representing-
1395 // the repeating alternatives (again, if any exist).-
1396 //-
1397 // Upon normal entry to the Begin alternative, we will check that input is available.-
1398 // Reentry to the Begin alternative will take place after the check has taken place,-
1399 // and will assume that the input position has already been progressed as appropriate.-
1400 //-
1401 // Entry to subsequent Next/End alternatives occurs when the prior alternative has-
1402 // successfully completed a match - return a success state from JIT code.-
1403 //-
1404 // Next alternatives allow for reentry optimized to suit backtracking from its-
1405 // preceding alternative. It expects the input position to still be set to a position-
1406 // appropriate to its predecessor, and it will only perform an input check if the-
1407 // predecessor had a minimum size less than its own.-
1408 //-
1409 // In the case 'once through' expressions, the End node will also have a reentry-
1410 // point to jump to when the last alternative fails. Again, this expects the input-
1411 // position to still reflect that expected by the prior alternative.-
1412 case OpBodyAlternativeBegin: {
executed 1148705 times by 153 tests: case OpBodyAlternativeBegin:
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1148705
1413 PatternAlternative* alternative = op.m_alternative;-
1414-
1415 // Upon entry at the head of the set of alternatives, check if input is available-
1416 // to run the first alternative. (This progresses the input position).-
1417 op.m_jumps.append(jumpIfNoAvailableInput(alternative->m_minimumSize));-
1418 // We will reenter after the check, and assume the input position to have been-
1419 // set as appropriate to this alternative.-
1420 op.m_reentry = label();-
1421-
1422 m_checked += alternative->m_minimumSize;-
1423 break;
executed 1148003 times by 153 tests: break;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1148003
1424 }-
1425 case OpBodyAlternativeNext:
executed 206 times by 2 tests: case OpBodyAlternativeNext:
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
206
1426 case OpBodyAlternativeEnd: {
executed 1149995 times by 153 tests: case OpBodyAlternativeEnd:
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1149995
1427 PatternAlternative* priorAlternative = m_ops[op.m_previousOp].m_alternative;-
1428 PatternAlternative* alternative = op.m_alternative;-
1429-
1430 // If we get here, the prior alternative matched - return success.-
1431 -
1432 // Adjust the stack pointer to remove the pattern's frame.-
1433 removeCallFrame();-
1434-
1435 // Load appropriate values into the return register and the first output-
1436 // slot, and return. In the case of pattern with a fixed size, we will-
1437 // not have yet set the value in the first -
1438 ASSERT(index != returnRegister);-
1439 if (m_pattern.m_body->m_hasFixedSize) {
m_pattern.m_bo...m_hasFixedSizeDescription
TRUEevaluated 1148949 times by 153 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
FALSEevaluated 1187 times by 8 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
1187-1148949
1440 move(index, returnRegister);-
1441 if (priorAlternative->m_minimumSize)
priorAlternati...>m_minimumSizeDescription
TRUEevaluated 1050741 times by 6 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
FALSEevaluated 97985 times by 153 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
97985-1050741
1442 sub32(Imm32(priorAlternative->m_minimumSize), returnRegister);
executed 1050772 times by 6 tests: sub32(Imm32(priorAlternative->m_minimumSize), returnRegister);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qquicktextinput
1050772
1443 if (compileMode == IncludeSubpatterns)
compileMode ==...udeSubpatternsDescription
TRUEevaluated 1148591 times by 153 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
FALSEnever evaluated
0-1148591
1444 store32(returnRegister, output);
executed 1148546 times by 153 tests: store32(returnRegister, output);
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1148546
1445 } else
executed 1149696 times by 153 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1149696
1446 getMatchStart(returnRegister);
executed 1188 times by 8 tests: getMatchStart(returnRegister);
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
1188
1447 if (compileMode == IncludeSubpatterns)
compileMode ==...udeSubpatternsDescription
TRUEevaluated 1150881 times by 153 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
FALSEnever evaluated
0-1150881
1448 store32(index, Address(output, 4));
executed 1150981 times by 153 tests: store32(index, Address(output, 4));
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1150981
1449 move(index, returnRegister2);-
1450-
1451 generateReturn();-
1452-
1453 // This is the divide between the tail of the prior alternative, above, and-
1454 // the head of the subsequent alternative, below.-
1455-
1456 if (op.m_op == OpBodyAlternativeNext) {
op.m_op == OpB...lternativeNextDescription
TRUEevaluated 205 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
FALSEevaluated 1150967 times by 153 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
205-1150967
1457 // This is the reentry point for the Next alternative. We expect any code-
1458 // that jumps here to do so with the input position matching that of the-
1459 // PRIOR alteranative, and we will only check input availability if we-
1460 // need to progress it forwards.-
1461 op.m_reentry = label();-
1462 if (alternative->m_minimumSize > priorAlternative->m_minimumSize) {
alternative->m...>m_minimumSizeDescription
TRUEevaluated 68 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 137 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
68-137
1463 add32(Imm32(alternative->m_minimumSize - priorAlternative->m_minimumSize), index);-
1464 op.m_jumps.append(jumpIfNoAvailableInput());-
1465 } else if (priorAlternative->m_minimumSize > alternative->m_minimumSize)
executed 68 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
priorAlternati...>m_minimumSizeDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 118 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
20-118
1466 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:
  • tst_ecmascripttests
20
1467 } else if (op.m_nextOp == notFound) {
executed 206 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
op.m_nextOp == notFoundDescription
TRUEevaluated 98 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
FALSEevaluated 1150257 times by 153 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
98-1150257
1468 // This is the reentry point for the End of 'once through' alternatives,-
1469 // jumped to when the last alternative fails to match.-
1470 op.m_reentry = label();-
1471 sub32(Imm32(priorAlternative->m_minimumSize), index);-
1472 }
executed 98 times by 5 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
98
1473-
1474 if (op.m_op == OpBodyAlternativeNext)
op.m_op == OpB...lternativeNextDescription
TRUEevaluated 205 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
FALSEevaluated 1150700 times by 153 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
205-1150700
1475 m_checked += alternative->m_minimumSize;
executed 206 times by 2 tests: m_checked += alternative->m_minimumSize;
Executed by:
  • tst_ecmascripttests
  • tst_qqmlxmlhttprequest
206
1476 m_checked -= priorAlternative->m_minimumSize;-
1477 break;
executed 1150138 times by 153 tests: break;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1150138
1478 }-
1479-
1480 // OpSimpleNestedAlternativeBegin/Next/End-
1481 // OpNestedAlternativeBegin/Next/End-
1482 //-
1483 // These nodes are used to handle sets of alternatives that are nested within-
1484 // subpatterns and parenthetical assertions. The 'simple' forms are used where-
1485 // we do not need to be able to backtrack back into any alternative other than-
1486 // the last, the normal forms allow backtracking into any alternative.-
1487 //-
1488 // Each Begin/Next node is responsible for planting an input check to ensure-
1489 // sufficient input is available on entry. Next nodes additionally need to-
1490 // jump to the end - Next nodes use the End node's m_jumps list to hold this-
1491 // set of jumps.-
1492 //-
1493 // In the non-simple forms, successful alternative matches must store a-
1494 // 'return address' using a DataLabelPtr, used to store the address to jump-
1495 // to when backtracking, to get to the code for the appropriate alternative.-
1496 case OpSimpleNestedAlternativeBegin:
executed 2344 times by 3 tests: case OpSimpleNestedAlternativeBegin:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
2344
1497 case OpNestedAlternativeBegin: {
executed 165 times by 3 tests: case OpNestedAlternativeBegin:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
165
1498 PatternTerm* term = op.m_term;-
1499 PatternAlternative* alternative = op.m_alternative;-
1500 PatternDisjunction* disjunction = term->parentheses.disjunction;-
1501-
1502 // Calculate how much input we need to check for, and if non-zero check.-
1503 op.m_checkAdjust = alternative->m_minimumSize;-
1504 if ((term->quantityType == QuantifierFixedCount) && (term->type != PatternTerm::TypeParentheticalAssertion))
(term->quantit...ierFixedCount)Description
TRUEevaluated 2363 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 142 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicktextinput
(term->type !=...icalAssertion)Description
TRUEevaluated 2296 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 68 times by 1 test
Evaluated by:
  • tst_ecmascripttests
68-2363
1505 op.m_checkAdjust -= disjunction->m_minimumSize;
executed 2296 times by 3 tests: op.m_checkAdjust -= disjunction->m_minimumSize;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
2296
1506 if (op.m_checkAdjust)
op.m_checkAdjustDescription
TRUEevaluated 228 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 2278 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
228-2278
1507 op.m_jumps.append(jumpIfNoAvailableInput(op.m_checkAdjust));
executed 228 times by 3 tests: op.m_jumps.append(jumpIfNoAvailableInput(op.m_checkAdjust));
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
228
1508-
1509 m_checked += op.m_checkAdjust;-
1510 break;
executed 2508 times by 3 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
2508
1511 }-
1512 case OpSimpleNestedAlternativeNext:
executed 36 times by 1 test: case OpSimpleNestedAlternativeNext:
Executed by:
  • tst_ecmascripttests
36
1513 case OpNestedAlternativeNext: {
executed 343 times by 3 tests: case OpNestedAlternativeNext:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
343
1514 PatternTerm* term = op.m_term;-
1515 PatternAlternative* alternative = op.m_alternative;-
1516 PatternDisjunction* disjunction = term->parentheses.disjunction;-
1517-
1518 // In the non-simple case, store a 'return address' so we can backtrack correctly.-
1519 if (op.m_op == OpNestedAlternativeNext) {
op.m_op == OpN...lternativeNextDescription
TRUEevaluated 345 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 36 times by 1 test
Evaluated by:
  • tst_ecmascripttests
36-345
1520 unsigned parenthesesFrameLocation = term->frameLocation;-
1521 unsigned alternativeFrameLocation = parenthesesFrameLocation;-
1522 if (term->quantityType != QuantifierFixedCount)
term->quantity...fierFixedCountDescription
TRUEnever evaluated
FALSEevaluated 342 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
0-342
1523 alternativeFrameLocation += YarrStackSpaceForBackTrackInfoParenthesesOnce;
never executed: alternativeFrameLocation += 1;
0
1524 op.m_returnAddress = storeToFrameWithPatch(alternativeFrameLocation);-
1525 }
executed 344 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
344
1526-
1527 if (term->quantityType != QuantifierFixedCount && !m_ops[op.m_previousOp].m_alternative->m_minimumSize) {
term->quantity...fierFixedCountDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 368 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
!m_ops[op.m_pr...>m_minimumSizeDescription
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
0-368
1528 // If the previous alternative matched without consuming characters then-
1529 // backtrack to try to match while consumming some input.-
1530 op.m_zeroLengthMatch = branch32(Equal, index, Address(stackPointerRegister, term->frameLocation * sizeof(void*)));-
1531 }
never executed: end of block
0
1532-
1533 // If we reach here then the last alternative has matched - jump to the-
1534 // End node, to skip over any further alternatives.-
1535 //-
1536 // FIXME: this is logically O(N^2) (though N can be expected to be very-
1537 // small). We could avoid this either by adding an extra jump to the JIT-
1538 // data structures, or by making backtracking code that jumps to Next-
1539 // alternatives are responsible for checking that input is available (if-
1540 // we didn't need to plant the input checks, then m_jumps would be free).-
1541 YarrOp* endOp = &m_ops[op.m_nextOp];-
1542 while (endOp->m_nextOp != notFound) {
endOp->m_nextOp != notFoundDescription
TRUEevaluated 840 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 380 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
380-840
1543 ASSERT(endOp->m_op == OpSimpleNestedAlternativeNext || endOp->m_op == OpNestedAlternativeNext);-
1544 endOp = &m_ops[endOp->m_nextOp];-
1545 }
executed 840 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
840
1546 ASSERT(endOp->m_op == OpSimpleNestedAlternativeEnd || endOp->m_op == OpNestedAlternativeEnd);-
1547 endOp->m_jumps.append(jump());-
1548-
1549 // This is the entry point for the next alternative.-
1550 op.m_reentry = label();-
1551-
1552 // Calculate how much input we need to check for, and if non-zero check.-
1553 op.m_checkAdjust = alternative->m_minimumSize;-
1554 if ((term->quantityType == QuantifierFixedCount) && (term->type != PatternTerm::TypeParentheticalAssertion))
(term->quantit...ierFixedCount)Description
TRUEevaluated 369 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_ecmascripttests
(term->type !=...icalAssertion)Description
TRUEevaluated 345 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_ecmascripttests
12-369
1555 op.m_checkAdjust -= disjunction->m_minimumSize;
executed 345 times by 3 tests: op.m_checkAdjust -= disjunction->m_minimumSize;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
345
1556 if (op.m_checkAdjust)
op.m_checkAdjustDescription
TRUEevaluated 64 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 317 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
64-317
1557 op.m_jumps.append(jumpIfNoAvailableInput(op.m_checkAdjust));
executed 64 times by 1 test: op.m_jumps.append(jumpIfNoAvailableInput(op.m_checkAdjust));
Executed by:
  • tst_ecmascripttests
64
1558-
1559 YarrOp& lastOp = m_ops[op.m_previousOp];-
1560 m_checked -= lastOp.m_checkAdjust;-
1561 m_checked += op.m_checkAdjust;-
1562 break;
executed 381 times by 3 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
381
1563 }-
1564 case OpSimpleNestedAlternativeEnd:
executed 2344 times by 3 tests: case OpSimpleNestedAlternativeEnd:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
2344
1565 case OpNestedAlternativeEnd: {
executed 166 times by 3 tests: case OpNestedAlternativeEnd:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
166
1566 PatternTerm* term = op.m_term;-
1567-
1568 // In the non-simple case, store a 'return address' so we can backtrack correctly.-
1569 if (op.m_op == OpNestedAlternativeEnd) {
op.m_op == OpN...AlternativeEndDescription
TRUEevaluated 166 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 2343 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
166-2343
1570 unsigned parenthesesFrameLocation = term->frameLocation;-
1571 unsigned alternativeFrameLocation = parenthesesFrameLocation;-
1572 if (term->quantityType != QuantifierFixedCount)
term->quantity...fierFixedCountDescription
TRUEnever evaluated
FALSEevaluated 165 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
0-165
1573 alternativeFrameLocation += YarrStackSpaceForBackTrackInfoParenthesesOnce;
never executed: alternativeFrameLocation += 1;
0
1574 op.m_returnAddress = storeToFrameWithPatch(alternativeFrameLocation);-
1575 }
executed 164 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
164
1576-
1577 if (term->quantityType != QuantifierFixedCount && !m_ops[op.m_previousOp].m_alternative->m_minimumSize) {
term->quantity...fierFixedCountDescription
TRUEevaluated 142 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicktextinput
FALSEevaluated 2365 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
!m_ops[op.m_pr...>m_minimumSizeDescription
TRUEnever evaluated
FALSEevaluated 142 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicktextinput
0-2365
1578 // If the previous alternative matched without consuming characters then-
1579 // backtrack to try to match while consumming some input.-
1580 op.m_zeroLengthMatch = branch32(Equal, index, Address(stackPointerRegister, term->frameLocation * sizeof(void*)));-
1581 }
never executed: end of block
0
1582-
1583 // If this set of alternatives contains more than one alternative,-
1584 // then the Next nodes will have planted jumps to the End, and added-
1585 // them to this node's m_jumps list.-
1586 op.m_jumps.link(this);-
1587 op.m_jumps.clear();-
1588-
1589 YarrOp& lastOp = m_ops[op.m_previousOp];-
1590 m_checked -= lastOp.m_checkAdjust;-
1591 break;
executed 2508 times by 3 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
2508
1592 }-
1593-
1594 // OpParenthesesSubpatternOnceBegin/End-
1595 //-
1596 // These nodes support (optionally) capturing subpatterns, that have a-
1597 // quantity count of 1 (this covers fixed once, and ?/?? quantifiers). -
1598 case OpParenthesesSubpatternOnceBegin: {
executed 2425 times by 3 tests: case OpParenthesesSubpatternOnceBegin:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
2425
1599 PatternTerm* term = op.m_term;-
1600 unsigned parenthesesFrameLocation = term->frameLocation;-
1601 const RegisterID indexTemporary = regT0;-
1602 ASSERT(term->quantityCount == 1);-
1603-
1604 // Upon entry to a Greedy quantified set of parenthese store the index.-
1605 // We'll use this for two purposes:-
1606 // - To indicate which iteration we are on of mathing the remainder of-
1607 // the expression after the parentheses - the first, including the-
1608 // match within the parentheses, or the second having skipped over them.-
1609 // - To check for empty matches, which must be rejected.-
1610 //-
1611 // At the head of a NonGreedy set of parentheses we'll immediately set the-
1612 // value on the stack to -1 (indicating a match skipping the subpattern),-
1613 // and plant a jump to the end. We'll also plant a label to backtrack to-
1614 // to reenter the subpattern later, with a store to set up index on the-
1615 // second iteration.-
1616 //-
1617 // FIXME: for capturing parens, could use the index in the capture array?-
1618 if (term->quantityType == QuantifierGreedy)
term->quantity...antifierGreedyDescription
TRUEevaluated 130 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicktextinput
FALSEevaluated 2296 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
130-2296
1619 storeToFrame(index, parenthesesFrameLocation);
executed 130 times by 2 tests: storeToFrame(index, parenthesesFrameLocation);
Executed by:
  • tst_ecmascripttests
  • tst_qquicktextinput
130
1620 else if (term->quantityType == QuantifierNonGreedy) {
term->quantity...ifierNonGreedyDescription
TRUEnever evaluated
FALSEevaluated 2296 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
0-2296
1621 storeToFrame(TrustedImm32(-1), parenthesesFrameLocation);-
1622 op.m_jumps.append(jump());-
1623 op.m_reentry = label();-
1624 storeToFrame(index, parenthesesFrameLocation);-
1625 }
never executed: end of block
0
1626-
1627 // If the parenthese are capturing, store the starting index value to the-
1628 // captures array, offsetting as necessary.-
1629 //-
1630 // FIXME: could avoid offsetting this value in JIT code, apply-
1631 // offsets only afterwards, at the point the results array is-
1632 // being accessed.-
1633 if (term->capture() && compileMode == IncludeSubpatterns) {
term->capture()Description
TRUEevaluated 1475 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 950 times by 1 test
Evaluated by:
  • tst_ecmascripttests
compileMode ==...udeSubpatternsDescription
TRUEevaluated 1475 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEnever evaluated
0-1475
1634 int inputOffset = term->inputPosition - m_checked;-
1635 if (term->quantityType == QuantifierFixedCount)
term->quantity...fierFixedCountDescription
TRUEevaluated 1345 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 130 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicktextinput
130-1345
1636 inputOffset -= term->parentheses.disjunction->m_minimumSize;
executed 1344 times by 3 tests: inputOffset -= term->parentheses.disjunction->m_minimumSize;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
1344
1637 if (inputOffset) {
inputOffsetDescription
TRUEevaluated 1367 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 108 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
108-1367
1638 move(index, indexTemporary);-
1639 add32(Imm32(inputOffset), indexTemporary);-
1640 setSubpatternStart(indexTemporary, term->parentheses.subpatternId);-
1641 } else
executed 1370 times by 3 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
1370
1642 setSubpatternStart(index, term->parentheses.subpatternId);
executed 108 times by 3 tests: setSubpatternStart(index, term->parentheses.subpatternId);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
108
1643 }-
1644 break;
executed 2427 times by 3 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
2427
1645 }-
1646 case OpParenthesesSubpatternOnceEnd: {
executed 2428 times by 3 tests: case OpParenthesesSubpatternOnceEnd:
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
2428
1647 PatternTerm* term = op.m_term;-
1648 const RegisterID indexTemporary = regT0;-
1649 ASSERT(term->quantityCount == 1);-
1650-
1651#ifndef NDEBUG-
1652 // Runtime ASSERT to make sure that the nested alternative handled the-
1653 // "no input consumed" check.-
1654 if (term->quantityType != QuantifierFixedCount && !term->parentheses.disjunction->m_minimumSize) {
term->quantity...fierFixedCountDescription
TRUEevaluated 130 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicktextinput
FALSEevaluated 2297 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
!term->parenth...>m_minimumSizeDescription
TRUEnever evaluated
FALSEevaluated 130 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicktextinput
0-2297
1655 Jump pastBreakpoint;-
1656 pastBreakpoint = branch32(NotEqual, index, Address(stackPointerRegister, term->frameLocation * sizeof(void*)));-
1657 breakpoint();-
1658 pastBreakpoint.link(this);-
1659 }
never executed: end of block
0
1660#endif-
1661-
1662 // If the parenthese are capturing, store the ending index value to the-
1663 // captures array, offsetting as necessary.-
1664 //-
1665 // FIXME: could avoid offsetting this value in JIT code, apply-
1666 // offsets only afterwards, at the point the results array is-
1667 // being accessed.-
1668 if (term->capture() && compileMode == IncludeSubpatterns) {
term->capture()Description
TRUEevaluated 1477 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEevaluated 952 times by 1 test
Evaluated by:
  • tst_ecmascripttests
compileMode ==...udeSubpatternsDescription
TRUEevaluated 1478 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
FALSEnever evaluated
0-1478
1669 int inputOffset = term->inputPosition - m_checked;-
1670 if (inputOffset) {
inputOffsetDescription
TRUEevaluated 266 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
FALSEevaluated 1212 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
266-1212
1671 move(index, indexTemporary);-
1672 add32(Imm32(inputOffset), indexTemporary);-
1673 setSubpatternEnd(indexTemporary, term->parentheses.subpatternId);-
1674 } else
executed 266 times by 2 tests: end of block
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
266
1675 setSubpatternEnd(index, term->parentheses.subpatternId);
executed 1212 times by 3 tests: setSubpatternEnd(index, term->parentheses.subpatternId);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
1212
1676 }-
1677-
1678 // If the parentheses are quantified Greedy then add a label to jump back-
1679 // to if get a failed match from after the parentheses. For NonGreedy-
1680 // parentheses, link the jump from before the subpattern to here.-
1681 if (term->quantityType == QuantifierGreedy)
term->quantity...antifierGreedyDescription
TRUEevaluated 130 times by 2 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qquicktextinput
FALSEevaluated 2298 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
130-2298
1682 op.m_reentry = label();
executed 130 times by 2 tests: op.m_reentry = label();
Executed by:
  • tst_ecmascripttests
  • tst_qquicktextinput
130
1683 else if (term->quantityType == QuantifierNonGreedy) {
term->quantity...ifierNonGreedyDescription
TRUEnever evaluated
FALSEevaluated 2296 times by 3 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
0-2296
1684 YarrOp& beginOp = m_ops[op.m_previousOp];-
1685 beginOp.m_jumps.link(this);-
1686 }
never executed: end of block
0
1687 break;
executed 2425 times by 3 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qquicktextinput
2425
1688 }-
1689-
1690 // OpParenthesesSubpatternTerminalBegin/End-
1691 case OpParenthesesSubpatternTerminalBegin: {
executed 12 times by 1 test: case OpParenthesesSubpatternTerminalBegin:
Executed by:
  • tst_ecmascripttests
12
1692 PatternTerm* term = op.m_term;-
1693 ASSERT(term->quantityType == QuantifierGreedy);-
1694 ASSERT(term->quantityCount == quantifyInfinite);-
1695 ASSERT(!term->capture());-
1696-
1697 // Upon entry set a label to loop back to.-
1698 op.m_reentry = label();-
1699-
1700 // Store the start index of the current match; we need to reject zero-
1701 // length matches.-
1702 storeToFrame(index, term->frameLocation);-
1703 break;
executed 11 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
11
1704 }-
1705 case OpParenthesesSubpatternTerminalEnd: {
executed 12 times by 1 test: case OpParenthesesSubpatternTerminalEnd:
Executed by:
  • tst_ecmascripttests
12
1706 YarrOp& beginOp = m_ops[op.m_previousOp];-
1707#ifndef NDEBUG-
1708 PatternTerm* term = op.m_term;-
1709-
1710 // Runtime ASSERT to make sure that the nested alternative handled the-
1711 // "no input consumed" check.-
1712 Jump pastBreakpoint;-
1713 pastBreakpoint = branch32(NotEqual, index, Address(stackPointerRegister, term->frameLocation * sizeof(void*)));-
1714 breakpoint();-
1715 pastBreakpoint.link(this);-
1716#endif-
1717-
1718 // We know that the match is non-zero, we can accept it and-
1719 // loop back up to the head of the subpattern.-
1720 jump(beginOp.m_reentry);-
1721-
1722 // This is the entry point to jump to when we stop matching - we will-
1723 // do so once the subpattern cannot match any more.-
1724 op.m_reentry = label();-
1725 break;
executed 12 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
12
1726 }-
1727-
1728 // OpParentheticalAssertionBegin/End-
1729 case OpParentheticalAssertionBegin: {
executed 68 times by 1 test: case OpParentheticalAssertionBegin:
Executed by:
  • tst_ecmascripttests
68
1730 PatternTerm* term = op.m_term;-
1731-
1732 // Store the current index - assertions should not update index, so-
1733 // we will need to restore it upon a successful match.-
1734 unsigned parenthesesFrameLocation = term->frameLocation;-
1735 storeToFrame(index, parenthesesFrameLocation);-
1736-
1737 // Check -
1738 op.m_checkAdjust = m_checked - term->inputPosition;-
1739 if (op.m_checkAdjust)
op.m_checkAdjustDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tst_ecmascripttests
16-52
1740 sub32(Imm32(op.m_checkAdjust), index);
executed 16 times by 1 test: sub32(Imm32(op.m_checkAdjust), index);
Executed by:
  • tst_ecmascripttests
16
1741-
1742 m_checked -= op.m_checkAdjust;-
1743 break;
executed 68 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
68
1744 }-
1745 case OpParentheticalAssertionEnd: {
executed 68 times by 1 test: case OpParentheticalAssertionEnd:
Executed by:
  • tst_ecmascripttests
68
1746 PatternTerm* term = op.m_term;-
1747-
1748 // Restore the input index value.-
1749 unsigned parenthesesFrameLocation = term->frameLocation;-
1750 loadFromFrame(parenthesesFrameLocation, index);-
1751-
1752 // If inverted, a successful match of the assertion must be treated-
1753 // as a failure, so jump to backtracking.-
1754 if (term->invert()) {
term->invert()Description
TRUEevaluated 40 times by 1 test
Evaluated by:
  • tst_ecmascripttests
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_ecmascripttests
28-40
1755 op.m_jumps.append(jump());-
1756 op.m_reentry = label();-
1757 }
executed 40 times by 1 test: end of block
Executed by:
  • tst_ecmascripttests
40
1758-
1759 YarrOp& lastOp = m_ops[op.m_previousOp];-
1760 m_checked += lastOp.m_checkAdjust;-
1761 break;
executed 68 times by 1 test: break;
Executed by:
  • tst_ecmascripttests
68
1762 }-
1763-
1764 case OpMatchFailed:
executed 92 times by 4 tests: case OpMatchFailed:
Executed by:
  • tst_ecmascripttests
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
92
1765 removeCallFrame();-
1766 move(TrustedImmPtr((void*)WTF::notFound), returnRegister);-
1767 move(TrustedImm32(0), returnRegister2);-
1768 generateReturn();-
1769 break;
executed 92 times by 4 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
92
1770 }-
1771-
1772 ++opIndex;-
1773 } while (opIndex < m_ops.size());
executed 4680815 times by 153 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
opIndex < m_ops.size()Description
TRUEevaluated 3531719 times by 153 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
FALSEevaluated 1150127 times by 153 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1150127-4680815
1774 }
executed 1150025 times by 153 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1150025
1775-
1776 void backtrack()-
1777 {-
1778 // Backwards generate the backtracking code.-
1779 size_t opIndex = m_ops.size();-
1780 ASSERT(opIndex);-
1781-
1782 do {-
1783 --opIndex;-
1784 YarrOp& op = m_ops[opIndex];-
1785 switch (op.m_op) {-
1786-
1787 case OpTerm:
executed 2372176 times by 9 tests: case OpTerm:
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
2372176
1788 backtrackTerm(opIndex);-
1789 break;
executed 2373967 times by 9 tests: break;
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmlxmlhttprequest
  • tst_qquicklistview
  • tst_qquicktextinput
  • tst_qquickworkerscript
2373967
1790-
1791 // OpBodyAlternativeBegin/Next/End-
1792 //-
1793 // For each Begin/Next node representing an alternative, we need to decide what to do-
1794 // in two circumstances:-
1795 // - If we backtrack back into this node, from within the alternative.-
1796 // - If the input check at the head of the alternative fails (if this exists).-
1797 //-
1798 // We treat these two cases differently since in the former case we have slightly-
1799 // more information - since we are backtracking out of a prior alternative we know-
1800 // that at least enough input was available to run it. For example, given the regular-
1801 // expression /a|b/, if we backtrack out of the first alternative (a failed pattern-
1802 // character match of 'a'), then we need not perform an additional input availability-
1803 // check before running the second alternative.-
1804 //-
1805 // Backtracking required differs for the last alternative, which in the case of the-
1806 // repeating set of alternatives must loop. The code generated for the last alternative-
1807 // will also be used to handle all input check failures from any prior alternatives --
1808 // these require similar functionality, in seeking the next available alternative for-
1809 // which there is sufficient input.-
1810 //-
1811 // Since backtracking of all other alternatives simply requires us to link backtracks-
1812 // to the reentry point for the subsequent alternative, we will only be generating any-
1813 // code when backtracking the last alternative.-
1814 case OpBodyAlternativeBegin:
executed 1149916 times by 153 tests: case OpBodyAlternativeBegin:
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1149916
1815 case OpBodyAlternativeNext: