Open MadProbe opened 3 years ago
I've been looking at totally replacing our implementation of RegExp prototype methods - frankly I think they're all a mess.
There are 4 interrelated problems:
u
flag lone surrogates get inappropriately matched.-ES6RegexPrototypeProperties
-ES6RegexSymbols
I opened issue #6390 to track all work to solve these points.
But I found the more I looked at it the bigger the issue it was. I was considering re-implementing all of the RegExp methods as self-hosted javascript to make them simpler to maintain (this is probably still my preference) so we can just replace all of the mess but it's slipped down my priorities list - if you want to give it a stab feel free (and feel free to ask me for any help you need) but just be warned it's big and messy.
Version
1.12.0-master
Flags
-ES6Experimental
Test code
Excepted result
Actual result
Possible solution
It seems like that JavascriptRegExp::EntrySymbolSearch doesn't perform some checks needed by spec. https://github.com/chakra-core/ChakraCore/blob/e6c8f78f505cb332538425b7a9309aee217869ef/lib/Runtime/Library/JavascriptRegularExpression.cpp#L812-L819 Possibly i will open a pr after #6610 is merged and it will also fix #5388