+2017-09-27 Mark Lam <mark.lam@apple.com>
+
+ Yarr::Parser::tryConsumeGroupName() should check for the end of the pattern.
+ https://bugs.webkit.org/show_bug.cgi?id=177423
+ <rdar://problem/34621320>
+
+ Reviewed by Keith Miller.
+
+ * stress/regress-177423.js: Added.
+
2017-09-27 Yusuke Suzuki <utatane.tea@gmail.com>
Add Above/Below comparisons for UInt32 patterns
+2017-09-27 Mark Lam <mark.lam@apple.com>
+
+ Yarr::Parser::tryConsumeGroupName() should check for the end of the pattern.
+ https://bugs.webkit.org/show_bug.cgi?id=177423
+ <rdar://problem/34621320>
+
+ Reviewed by Keith Miller.
+
+ * yarr/YarrParser.h:
+ (JSC::Yarr::Parser::tryConsumeGroupName):
+
2017-09-27 Yusuke Suzuki <utatane.tea@gmail.com>
Unreviewed, fix x86 breaking due to exhausted registers
/*
- * Copyright (C) 2009, 2014-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2009-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
std::optional<String> tryConsumeGroupName()
{
ParseState state = saveState();
+ StringBuilder identifierBuilder;
- int ch = tryConsumeIdentifierCharacter();
-
- if (isIdentifierStart(ch)) {
- StringBuilder identifierBuilder;
-
- do {
- identifierBuilder.append(ch);
- ch = tryConsumeIdentifierCharacter();
- if (ch == '>') {
+ while (!atEndOfPattern()) {
+ int ch = tryConsumeIdentifierCharacter();
+ if (ch == '>') {
+ if (identifierBuilder.length())
return std::optional<String>(identifierBuilder.toString());
- break;
- }
- if (!isIdentifierPart(ch))
- break;
- } while (!atEndOfPattern());
+ break;
+ }
+ if (!isIdentifierPart(ch))
+ break;
+
+ identifierBuilder.append(ch);
}
restoreState(state);