RESOLVED FIXED 161997
Use character class table in URLParser
https://bugs.webkit.org/show_bug.cgi?id=161997
Summary Use character class table in URLParser
Alex Christensen
Reported 2016-09-14 15:57:01 PDT
Use character class table in URLParser
Attachments
Patch (13.50 KB, patch)
2016-09-14 15:57 PDT, Alex Christensen
no flags
Patch (13.51 KB, patch)
2016-09-15 11:44 PDT, Alex Christensen
no flags
Alex Christensen
Comment 1 2016-09-14 15:57:35 PDT
Chris Dumez
Comment 2 2016-09-14 16:14:57 PDT
Comment on attachment 288878 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=288878&action=review > Source/WebCore/ChangeLog:8 > + No change in behavior except a performance improvement. Do you have performance numbers? > Source/WebCore/platform/URLParser.cpp:308 > +template<typename CharacterType> static bool isTabOrNewline(CharacterType character) { return character <= 0xD && character >= 0x9 && character != 0xB && character != 0xC; } Could this be "character >= 0x9 && (character < 0xB || character == 0xD)"? > Source/WebCore/platform/URLParser.cpp:310 > +template<typename CharacterType> static bool isInDefaultEncodeSet(CharacterType character) { return character > 0x7E || characterClassTable[character] & Default; } what if character > 255? > Source/WebCore/platform/URLParser.cpp:311 > +template<typename CharacterType> static bool isInUserInfoEncodeSet(CharacterType character) { return character > 0x7E || characterClassTable[character] & UserInfo; } what if character > 255?
Chris Dumez
Comment 3 2016-09-14 16:16:32 PDT
Comment on attachment 288878 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=288878&action=review Ok, i hope the perf win is worth the extra complexity. >> Source/WebCore/platform/URLParser.cpp:310 >> +template<typename CharacterType> static bool isInDefaultEncodeSet(CharacterType character) { return character > 0x7E || characterClassTable[character] & Default; } > > what if character > 255? Oh never mind, this is an || >> Source/WebCore/platform/URLParser.cpp:311 >> +template<typename CharacterType> static bool isInUserInfoEncodeSet(CharacterType character) { return character > 0x7E || characterClassTable[character] & UserInfo; } > > what if character > 255? Oh never mind, this is an ||
Alex Christensen
Comment 4 2016-09-15 11:44:22 PDT
Alex Christensen
Comment 5 2016-09-15 11:51:06 PDT
Note You need to log in before you can comment on or make changes to this bug.