Changeset 221160 in webkit for trunk/Source/JavaScriptCore/yarr/YarrJIT.cpp
- Timestamp:
- Aug 24, 2017, 2:14:43 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/yarr/YarrJIT.cpp
r221111 r221160 1170 1170 JumpList matchDest; 1171 1171 readCharacter(m_checkedOffset - term->inputPosition, character); 1172 matchCharacterClass(character, matchDest, term->characterClass); 1173 1174 if (term->invert()) 1175 op.m_jumps.append(matchDest); 1176 else { 1177 op.m_jumps.append(jump()); 1178 matchDest.link(this); 1179 } 1180 1172 // If we are matching the "any character" builtin class we only need to read the 1173 // character and don't need to match as it will always succeed. 1174 if (term->invert() || term->characterClass != m_pattern.anyCharacterClass()) { 1175 matchCharacterClass(character, matchDest, term->characterClass); 1176 1177 if (term->invert()) 1178 op.m_jumps.append(matchDest); 1179 else { 1180 op.m_jumps.append(jump()); 1181 matchDest.link(this); 1182 } 1183 } 1181 1184 #ifdef JIT_UNICODE_EXPRESSIONS 1182 1185 if (m_decodeSurrogatePairs) { … … 1216 1219 JumpList matchDest; 1217 1220 readCharacter(m_checkedOffset - term->inputPosition - term->quantityMaxCount, character, countRegister); 1218 matchCharacterClass(character, matchDest, term->characterClass); 1219 1220 if (term->invert()) 1221 op.m_jumps.append(matchDest); 1222 else { 1223 op.m_jumps.append(jump()); 1224 matchDest.link(this); 1221 // If we are matching the "any character" builtin class we only need to read the 1222 // character and don't need to match as it will always succeed. 1223 if (term->invert() || term->characterClass != m_pattern.anyCharacterClass()) { 1224 matchCharacterClass(character, matchDest, term->characterClass); 1225 1226 if (term->invert()) 1227 op.m_jumps.append(matchDest); 1228 else { 1229 op.m_jumps.append(jump()); 1230 matchDest.link(this); 1231 } 1225 1232 } 1226 1233 … … 1264 1271 JumpList matchDest; 1265 1272 readCharacter(m_checkedOffset - term->inputPosition, character); 1266 matchCharacterClass(character, matchDest, term->characterClass); 1267 failures.append(jump()); 1273 // If we are matching the "any character" builtin class we only need to read the 1274 // character and don't need to match as it will always succeed. 1275 if (term->characterClass != m_pattern.anyCharacterClass()) { 1276 matchCharacterClass(character, matchDest, term->characterClass); 1277 failures.append(jump()); 1278 } 1268 1279 matchDest.link(this); 1269 1280 } … … 1366 1377 JumpList matchDest; 1367 1378 readCharacter(m_checkedOffset - term->inputPosition, character); 1368 matchCharacterClass(character, matchDest, term->characterClass); 1369 1370 if (term->invert()) 1371 nonGreedyFailures.append(matchDest); 1372 else { 1373 nonGreedyFailures.append(jump()); 1374 matchDest.link(this); 1379 // If we are matching the "any character" builtin class we only need to read the 1380 // character and don't need to match as it will always succeed. 1381 if (term->invert() || term->characterClass != m_pattern.anyCharacterClass()) { 1382 matchCharacterClass(character, matchDest, term->characterClass); 1383 1384 if (term->invert()) 1385 nonGreedyFailures.append(matchDest); 1386 else { 1387 nonGreedyFailures.append(jump()); 1388 matchDest.link(this); 1389 } 1375 1390 } 1376 1391 … … 1407 1422 JumpList saveStartIndex; 1408 1423 JumpList foundEndingNewLine; 1424 1425 if (m_pattern.dotAll()) { 1426 move(TrustedImm32(0), matchPos); 1427 setMatchStart(matchPos); 1428 move(length, index); 1429 return; 1430 } 1409 1431 1410 1432 ASSERT(!m_pattern.m_body->m_hasFixedSize);
Note:
See TracChangeset
for help on using the changeset viewer.