Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: be68a2f3be90effbaeec1117e802f7eb0e3d5b12
https://github.com/WebKit/WebKit/commit/be68a2f3be90effbaeec1117e802f7eb0e3d5b12
Author: Tetsuharu Ohzeki <[email protected]>
Date: 2025-02-20 (Thu, 20 Feb 2025)
Changed paths:
M Source/JavaScriptCore/yarr/YarrParser.h
M Source/JavaScriptCore/yarr/YarrPattern.cpp
M Source/JavaScriptCore/yarr/YarrSyntaxChecker.cpp
Log Message:
-----------
[JSC] Use C++ concepts to constrain `Delegate` type parameter for
`Yarr::parse()`
https://bugs.webkit.org/show_bug.cgi?id=287079
Reviewed by Yusuke Suzuki.
This replace a comment for advice for implementation
with compile-time restriction by C++'s concept.
* Source/JavaScriptCore/yarr/YarrParser.h:
Introduce `YarrSyntaxCheckable` concept.
(JSC::Yarr::requires):
(JSC::Yarr::Parser::Parser):
(JSC::Yarr::Parser::parse):
If we add `YarrSyntaxCheckable` as type constraint to `Yarr::parse()`,
the compiler says that some methods visiblity on `Yarr::Parser` are not
properly. We need to mark them as public.
* Source/JavaScriptCore/yarr/YarrPattern.cpp:
Check the class implements the concept properly by static_assert.
* Source/JavaScriptCore/yarr/YarrSyntaxChecker.cpp:
Check the class implements the concept properly by static_assert.
Canonical link: https://commits.webkit.org/290702@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes