Skip to content
Permalink
Browse files
IntlCollator can be shrunk by 16 bytes
https://bugs.webkit.org/show_bug.cgi?id=195503

Reviewed by Darin Adler.

* runtime/IntlCollator.h:


Canonical link: https://commits.webkit.org/209849@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Robin Morisset committed Mar 11, 2019
1 parent d5384e9 commit fca69ff480a6c05b7e8dee356550497259ab4769
Showing 2 changed files with 15 additions and 6 deletions.
@@ -1,3 +1,12 @@
2019-03-11 Robin Morisset <rmorisset@apple.com>

IntlCollator can be shrunk by 16 bytes
https://bugs.webkit.org/show_bug.cgi?id=195503

Reviewed by Darin Adler.

* runtime/IntlCollator.h:

2019-03-11 Robin Morisset <rmorisset@apple.com>

IntlNumberFormat can be shrunk by 16 bytes
@@ -59,9 +59,9 @@ class IntlCollator final : public JSDestructibleObject {
static void visitChildren(JSCell*, SlotVisitor&);

private:
enum class Usage { Sort, Search };
enum class Sensitivity { Base, Accent, Case, Variant };
enum class CaseFirst { Upper, Lower, False };
enum class Usage : uint8_t { Sort, Search };
enum class Sensitivity : uint8_t { Base, Accent, Case, Variant };
enum class CaseFirst : uint8_t { Upper, Lower, False };

struct UCollatorDeleter {
void operator()(UCollator*) const;
@@ -72,13 +72,13 @@ class IntlCollator final : public JSDestructibleObject {
static ASCIILiteral sensitivityString(Sensitivity);
static ASCIILiteral caseFirstString(CaseFirst);

Usage m_usage;
String m_locale;
String m_collation;
Sensitivity m_sensitivity;
CaseFirst m_caseFirst;
WriteBarrier<JSBoundFunction> m_boundCompare;
std::unique_ptr<UCollator, UCollatorDeleter> m_collator;
Usage m_usage;
Sensitivity m_sensitivity;
CaseFirst m_caseFirst;
bool m_numeric;
bool m_ignorePunctuation;
bool m_initializedCollator { false };

0 comments on commit fca69ff

Please sign in to comment.