[webkit-changes] [WebKit/WebKit] 825b9e: [JSC] Align RegExp V Flags Syntax errors with V8

Michael Saboff noreply at github.com
Thu Mar 23 08:27:25 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 825b9eb20878e31d5064ef2961973ab432af3055
      https://github.com/WebKit/WebKit/commit/825b9eb20878e31d5064ef2961973ab432af3055
  Author: Michael Saboff <msaboff at apple.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M JSTests/stress/regexp-vflag-property-of-strings.js
    M Source/JavaScriptCore/yarr/YarrParser.h

  Log Message:
  -----------
  [JSC] Align RegExp V Flags Syntax errors with V8
https://bugs.webkit.org/show_bug.cgi?id=254313
rdar://107116409

Reviewed by Yusuke Suzuki.

Updated syntax error tests after comparing to the types of errors that V8 throws.
The changes in errors are either from "invalid class set character" to "invalid operation in class set"
or the opposite, from "invalid operation in class set" to "invalid class set character".

Found and fixed one case where we weren't throwing an "invalid class set character" syntax error when
three dashes appear in a row, e.g. /a---x/v.

* JSTests/stress/regexp-vflag-property-of-strings.js:
* Source/JavaScriptCore/yarr/YarrParser.h:
(JSC::Yarr::Parser::consumeAndCheckIfValidClassSetCharacter):
(JSC::Yarr::Parser::parseClassSet):

Canonical link: https://commits.webkit.org/262017@main




More information about the webkit-changes mailing list