Summary: | [JSC] Add Intl.Segmenter | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> | ||||||||||||
Component: | JavaScriptCore | Assignee: | Yusuke Suzuki <ysuzuki> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | annulen, benjamin, cdumez, cmarcelo, ews-watchlist, gyuyoung.kim, keith_miller, mark.lam, msaboff, ross.kirsling, ryuan.choi, saam, sergio, tzagallo, webkit-bug-importer | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
Bug Depends on: | |||||||||||||||
Bug Blocks: | 213425 | ||||||||||||||
Attachments: |
|
Description
Yusuke Suzuki
2020-06-25 21:18:05 PDT
Created attachment 404895 [details]
Patch
Created attachment 404896 [details]
Patch
Comment on attachment 404896 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=404896&action=review r=me. I'm sad that we don't have test262 tests yet, but it's behind a flag, so we can keep tweaking things. > Source/JavaScriptCore/runtime/IntlSegmenter.cpp:180 > + result->putDirect(vm, vm.propertyNames->isWordLike, jsBoolean(!(ruleStatus >= UBRK_WORD_NONE && ruleStatus <= UBRK_WORD_NONE_LIMIT))); Seems like DeMorgan's rule wouldn't make this less clear? jsBoolean(ruleStatus < UBRK_WORD_NONE || ruleStatus > UBRK_WORD_NONE_LIMIT) Comment on attachment 404896 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=404896&action=review Thanks! >> Source/JavaScriptCore/runtime/IntlSegmenter.cpp:180 >> + result->putDirect(vm, vm.propertyNames->isWordLike, jsBoolean(!(ruleStatus >= UBRK_WORD_NONE && ruleStatus <= UBRK_WORD_NONE_LIMIT))); > > Seems like DeMorgan's rule wouldn't make this less clear? > jsBoolean(ruleStatus < UBRK_WORD_NONE || ruleStatus > UBRK_WORD_NONE_LIMIT) I think that the current one is clear than < || > form since it is saying rulesStatus is not in this range. Created attachment 405242 [details]
Rebaseline, test262
Update according to https://github.com/tc39/proposal-intl-segmenter/pull/128 Comment on attachment 405242 [details] Rebaseline, test262 View in context: https://bugs.webkit.org/attachment.cgi?id=405242&action=review > JSTests/test262/expectations.yaml:1688 > +test/intl402/Segmenter/prototype/segment/segment-grapheme.js: > + default: 'Test262Error: Expected SameValue(«0», «undefined») to be true' > + strict mode: 'Test262Error: Expected SameValue(«0», «undefined») to be true' > +test/intl402/Segmenter/prototype/segment/segment-sentence.js: > + default: 'Test262Error: Expected SameValue(«0», «undefined») to be true' > + strict mode: 'Test262Error: Expected SameValue(«0», «undefined») to be true' > +test/intl402/Segmenter/prototype/segment/segment-tostring.js: > + default: 'Test262Error: Expected segment "undefined", found "undefined" for arguments Expected SameValue(«undefined», «undefined») to be true' > + strict mode: 'Test262Error: Expected segment "undefined", found "undefined" for arguments Expected SameValue(«undefined», «undefined») to be true' > +test/intl402/Segmenter/prototype/segment/segment-word.js: > + default: 'Test262Error: Expected SameValue(«0», «undefined») to be true' > + strict mode: 'Test262Error: Expected SameValue(«0», «undefined») to be true' test262 will be fixed in https://github.com/tc39/test262/pull/2714 Created attachment 405243 [details]
Rebaseline + update
Created attachment 405769 [details]
Patch
Rebaseline
Committed r266032: <https://trac.webkit.org/changeset/266032> |